July 29, 2026 by Faith Xu
In VS Code, we’re working to help you get more done with AI-assisted coding while making every token count. That means improving the entire experience, from the models we use to the product and infrastructure behind them, so you have options that fit different workflows, performance needs, and budgets. In The Coding Harness Behind GitHub Copilot in VS Code, we explained how VS Code's coding harness connects the model, tools, and editor experience to help the model work most effectively.
In this post, we look at how specifically training models for VS Code's harness can further improve quality and efficiency. The model we focus on is MAI-Code-1-Flash, Microsoft's lightweight coding model built for the fast, iterative coding tasks developers perform every day in GitHub Copilot. Since the model's introduction at Build, it has been running in production alongside leading coding models, giving us an early look at how it performs in real developer workflows.
The results show that pairing MAI-Code-1-Flash with the VS Code coding harness delivers strong coding quality with lower token usage, helping developers get more from their usage limits.
Quality and efficiency in production
When evaluating coding models, quality and efficiency matter. A model that uses fewer tokens lowers cost, but those savings are more valuable if developers can still accomplish their tasks effectively. The goal is to strike the right balance: strong coding quality while using tokens efficiently.
To understand how MAI-Code-1-Flash performs in that tradeoff, we analyzed aggregate data from developers who selected each model in VS Code Copilot Chat. We looked at both the quality of the generated code and how efficiently developers reached a durable result. For quality, we measured whether developers accepted generated suggestions and whether that code remained after active editing and at commit. For efficiency, we measured the median number of tokens generated per conversation turn and the median number of turns needed to reach a commit.
The results suggest that MAI-Code-1-Flash strikes an effective balance between quality and efficiency. It outperforms Claude Haiku 4.5 and GPT-5.4 Mini on quality. Larger-sized GPT-5.6 Luna and Kimi K2.7 Code achieve quality advantages, but require 67% to 94% more tokens per turn as well as more turns per commit.
| Model | Code survival rate | Commit survival rate | Accept rate | Tokens per turn | Turns per commit |
|---|---|---|---|---|---|
| MAI-Code-1-Flash | Baseline (0%) | Baseline (0%) | Baseline (0%) | Baseline (0%) | Baseline (0%) |
| Claude Haiku 4.5 | -2% | -8% | -10% | -10% | +28% |
| GPT 5.4 Mini | -3% | -8% | -7% | +7% | +17% |
| GPT 5.6 Luna | +3% | +3% | +4% | +67% | +17% |
| Kimi K2.7 Code | +4% | +6% | -6% | +94% | +11% |
Data from users who selected each model in VS Code Copilot Chat between 6/2/26 and 7/24/26. Metric definitions: Code survival rate = percentage of AI-generated code retained after 10 minutes of active editing. Commit survival rate = percentage of AI-generated code retained at Git commit. Accept rate = percentage of AI-generated suggestions accepted by the user. Tokens per turn = median number of tokens generated by the model per conversation turn (a single request-response exchange). Turns per commit = median number of conversation turns a user completes before reaching a Git commit.
Validating the results with Auto flights
As another way to validate the aggregated usage data, we ran A/B flights through the Auto model experience in VS Code Copilot Chat. Auto assigns models without requiring developers to select one, helping us isolate the model’s impact from differences in who chooses each model or the tasks they use it for. We then looked at engagement and repeat usage as signals of whether developers found the experience useful enough to keep using.
The results reinforced the same story. MAI-Code-1-Flash drove stronger engagement while remaining more token efficient than other lightweight models. Users were 6% more likely to return within two days than with GPT-5.4 Mini and 11% more likely than with Claude Haiku 4.5. Despite higher engagement, median token usage was 13% lower than GPT-5.4 Mini and 11% lower than Claude Haiku 4.5. In other words, people used MAI-Code-1-Flash more, and it still cost less to run.
| Comparison | User-initiated turns | 2-day repeat usage | 4-day repeat usage | Total tokens |
|---|---|---|---|---|
| Claude Haiku 4.5 | -5% | -11% | -37% | +11% |
| GPT 5.4 Mini | No statistically significant difference | -6% | -13% | +13% |
Taken together, the production metrics and Auto flights highlight the role MAI-Code-1-Flash is designed to play: delivering strong results on simple coding tasks while using tokens efficiently. To close, let's take a closer look at the model and the workflows it was built to support.
Designed for the way developers work
MAI-Code-1-Flash was developed to work closely with the VS Code coding harness and the real-world workflows it supports. It's particularly well-suited for lightweight, iterative work such as exploring code, making incremental changes, generating or refining tests, and fixing bugs. Its adaptive solution length keeps responses concise for simple requests and goes deeper only when needed. This means it delivers useful output faster, while also improving token efficiency.
The model was trained from scratch using clean, traceable data, without distillation from third-party models. The model will continue to improve over time based on aggregated usage signals from consumer plans, while Copilot Business and Copilot Enterprise customer data is not used for training.
Try it today, help shape what's next
MAI-Code-1-Flash is available today in GitHub Copilot. Try it alongside your current go-to model, see how it feels in your workflow, and share what works well or what you'd like to see improve in the Community Discussion, where the team is actively listening.
Your feedback also helps shape what's next. MAI-Code-1-Flash is just the first step in the MAI coding model journey. Larger MAI coding models coming later this year will extend the family to more complex tasks, with greater intelligence, deeper reasoning, and quality designed to compete with the strongest frontier models.
Happy coding! 💙
Facts Only
* MAI-Code-1-Flash is Microsoft's lightweight coding model.
* The model was introduced at Build.
* The model operates within the VS Code coding harness.
* Evaluation involved aggregate data from developers selecting models in VS Code Copilot Chat between June 2, 2026, and July 24, 2026.
* Metrics assessed include code survival rate, commit survival rate, accept rate, tokens per turn, and turns per commit.
* MAI-Code-1-Flash outperformed Claude Haiku 4.5 and GPT-5.4 Mini on code quality.
* Larger models (GPT-5.6 Luna and Kimi K2.7 Code) provided higher quality but required 67% to 94% more tokens per turn and more turns per commit.
* Auto flights showed MAI-Code-1-Flash drove stronger engagement and was more token efficient than other lightweight models.
* MAI-Code-1-Flash is trained from scratch using clean, traceable data without distillation from third-party models for consumer plans.
Executive Summary
The MAI-Code-1-Flash model, designed for lightweight, iterative coding tasks in VS Code, demonstrates a balance between coding quality and efficiency when integrated with the coding harness. When compared to other models, MAI-Code-1-Flash achieved strong results, outperforming Claude Haiku 4.5 and GPT-5.4 Mini in terms of code quality. Larger models like GPT-5.6 Luna and Kimi K2.7 Code offered superior quality but incurred significantly higher token usage, with costs ranging from 67% to 94% more tokens per turn and extra turns per commit.
Validation through user selection data and A/B flights confirmed these findings. In aggregate usage, MAI-Code-1-Flash drove stronger developer engagement while remaining more token-efficient than competitors. Specifically, users were 13% to 11% more likely to return within two or four days compared to Claude Haiku 4.5 and GPT-5.4 Mini, respectively, despite consuming fewer tokens overall. The model is specifically designed for lightweight work like bug fixing and incremental changes, offering concise yet useful output by adapting its response length based on need.
Full Take
The structure of the results establishes a clear tension between peak performance quality and operational efficiency in AI tooling. The core finding is that for the specific context of real-time developer iteration facilitated by the VS Code harness, a middle ground—MAI-Code-1-Flash—is optimal. This suggests that simply maximizing raw intelligence (as seen with larger frontier models) does not equate to achieving superior real-world utility; the efficiency gain translates directly into greater user satisfaction and retention metrics. The methodology deliberately isolates token cost against outcome quality, implying a pattern where constrained resources yield higher perceived value in specific workflows.
The development philosophy, training from scratch without third-party distillation for consumer data, signals an intent to control the feedback loop, ensuring that improvements are anchored to the specific interaction with the VS Code harness rather than generalized, potentially conflicting, external datasets. The focus on lightweight, iterative tasks positions this model not as a general reasoning engine, but as a highly specialized agent designed for workflow augmentation. The implication is that future development should explore scaling complexity (as noted by the planned larger MAI coding models) while maintaining this efficiency floor to ensure that increased intelligence does not come at the expense of practical developer economics and experience.
What assumptions underpin the idea that token efficiency directly correlates with user satisfaction? Does favoring a model that maximizes retention risk long-term, even if current token metrics are slightly worse, when those short-term gains mask long-term cost escalation or context fragmentation? What happens when the definition of "efficient" shifts from token count to cognitive load reduction?
Sentinel — Human
The article presents specific, technical performance metrics derived from real developer workflows, suggesting it is based on internal testing or closely sourced results rather than pure synthetic generation.
