# SWE-2: The New Frontier in Autonomous Coding Agents
## A Major Leap in Code Generation Capability
A leading AI lab has unveiled SWE-2, its most advanced coding model yet, marking a significant milestone in autonomous software engineering. The model builds on the foundation of its predecessor and introduces several architectural and training innovations that push the boundaries of what AI agents can accomplish in real-world development workflows.
### The Training Breakthrough
At the heart of SWE-2’s performance is a novel reinforcement learning pipeline. Rather than training each reasoning configuration separately, the model was fine-tuned in a single RL run that simultaneously optimized three distinct effort levels—medium, high, and max. This unified training approach represents a departure from conventional methods, where each level typically requires its own dedicated training process.
The reward function is carefully constructed using a Pareto-informed cost penalty structure. By setting the penalty parameter for each effort tier to match the local slope of the base model’s performance curve, the training ensures that improvements in either solve rate or cost efficiency automatically benefit all effort levels at once. This elegant formulation means the entire cost-performance frontier shifts upward during training rather than being forced into trade-offs.
### Base Model and Architecture
SWE-2 was built on top of a substantially larger foundation than its predecessor, utilizing a base model with nearly three times the parameter count. The researchers found that scaling reinforcement learning into the multi-trillion-parameter regime still yields significant gains, adding 5 to 6 percentage points across many standard coding benchmarks. This suggests that even at enormous scale, there remains considerable headroom for RL-based post-training to unlock new capabilities.
Several engineering innovations were layered into the training pipeline. A speculative decoding system was employed during rollout generation, with a draft model retrained specifically for longer acceptance lengths. Quantization-aware training using NVFP4 and FP8 kernels kept memory consumption manageable while maintaining alignment between training and inference behavior. Additionally, a prefetching delay mechanism batched incoming requests more efficiently, boosting throughput per GPU by 10 to 20 percent.
The training data was also significantly expanded, with three times as many reinforcement learning environments compared to previous iterations. Instruction-following overlays were added, and a feedback loop was established where earlier model checkpoints were used to identify and correct false positives and negatives in automated verification systems.
### Benchmark Performance
SWE-2 demonstrates strong performance across a range of coding evaluations:
| Benchmark | SWE-2 | Base Model | Previous Version |
|———–|——-|————|——————|
| FrontierCode 1.1 Main | 50.0% | 44.2% | 42.0% |
| DeepSWE 1.1 | 73.0% | 68.5% | 37.7% |
| Terminal-Bench 2.1 | 92.8% | 88.3% | 81.5% |
| Terminal-Bench 4 | 27.3% | 21.5% | 7.6% |
The model leads on Terminal-Bench 2.1, one of the most rigorous coding agent evaluations available, and outperforms its base model on every benchmark measured. It approaches the performance of the top-scoring models in the field while operating at a fraction of the computational cost—estimated at roughly one-quarter of what competing systems require to reach similar scores.
However, SWE-2 does show a notable gap on Terminal-Bench 4, where it trails the top performers by a significant margin. This area remains an active challenge for autonomous coding agents and points to where future improvements may be focused.
### Smarter, More Focused Behavior
One of the most striking improvements in SWE-2 is the reduction in unnecessary exploration during task execution. The predecessor model tended to wander through excessive steps even on straightforward coding challenges. SWE-2 introduces what the researchers describe as a “focused exploration” strategy that dramatically reduces wasted effort.
On the FrontierCode 1.1 Main benchmark, the medium effort setting of SWE-2 outperforms the previous generation model while using 58 percent fewer turns and costing 81 percent less. The median number of steps before making the first meaningful code edit drops from 48 in the prior version to just 18 in SWE-2’s medium configuration. Mean steps per run fall from 127 to 53 at the medium level, 80 at high, and 98 at maximum.
The team also observed three behavioral improvements worth noting: stronger end-to-end test coverage, more resourceful problem-solving when standard tools are unavailable, and a greater willingness to independently verify conclusions rather than simply restating initial claims.
### Availability and Access
SWE-2 is not available as a standalone model or through a public API. It currently operates exclusively within the Devin agent platform, accessible through both Desktop and CLI interfaces. Web-based access and additional deployment options are expected to roll out in the future.
The model is available to subscribers of the agent’s Pro, Max, and Teams plans at no additional cost through October 10, 2026.
### Safety and Reliability
The researchers conducted trustworthiness evaluations following the same methodology used in prior open-source studies. On a set of 145 politically sensitive questions related to China, the model achieved a 98.0 percent overall accuracy rate—99.8 percent in English, 95.2 percent in Simplified Chinese, and 99.1 percent in Traditional Chinese. In a separate context-dependent vulnerability assessment, no particular framing of a question produced a statistically significant shift in the model’s behavior.
—
## Frequently Asked Questions
**Q: What makes SWE-2 different from previous coding agent models?**
A: SWE-2 introduces a unified training approach where all three reasoning effort levels—medium, high, and max—are optimized simultaneously in a single reinforcement learning run. It also features a Pareto-informed cost penalty system that balances solve rate and computational expense, along with significantly reduced step counts during task execution compared to earlier models.
**Q: Can I download SWE-2 and run it locally?**
A: No. SWE-2 does not have open weights and is not available as a standalone API. It currently runs only within the Devin agent ecosystem, specifically through its Desktop and CLI interfaces.
**Q: How much does SWE-2 cost to use?**
A: SWE-2 is included at no extra charge for users subscribed to the Pro, Max, and Teams tiers. The model is also estimated to operate at roughly 64 percent lower cost than competing top-tier models that achieve similar benchmark scores.
**Q: Why does SWE-2 perform poorly on Terminal-Bench 4?**
A: SWE-2 trails leading models by approximately 30 percentage points on this specific benchmark, which tests a particular subset of terminal-based coding tasks. The research team acknowledges this as a weak spot and an area where further development is needed.
**Q: What is meant by “selectable reasoning effort levels”?**
A: Users can choose how much computational effort the model should invest in solving a given task. The three options—medium, high, and max—represent different points on the cost-performance curve, with higher effort generally producing better results at increased computational expense.
**Q: Has the model been tested for reliability and bias?**
A: Yes. The research team conducted trustworthiness evaluations using politically sensitive prompts and context-dependent vulnerability tests. Results showed strong consistency across different languages and no significant behavioral shift in response to different framing techniques.
**Q: How does the length-weighted reward baseline work?**
A: During reinforcement learning training, gradient magnitudes tend to correlate with rollout length. To prevent the model from exploiting this by simply generating longer rollouts, Cognition weights the group baseline by token count. This means each rollout’s contribution is normalized by its length, keeping inference-to-training divergence lower and stabilizing training without additional compute overhead.
—
## Conclusion
SWE-2 represents a meaningful advancement in autonomous coding agents, delivering stronger benchmark performance, more efficient task execution, and a more practical training methodology. The ability to optimize multiple reasoning effort tiers simultaneously in a single training run is a particularly noteworthy innovation that could influence how future models are developed.
While the model is not yet available for independent deployment and shows room for improvement on certain benchmarks, its performance-to-cost ratio and behavioral improvements signal genuine progress in the field. As the agent platform continues to expand with web access and fusion capabilities, SWE-2’s capabilities will become accessible to an increasingly broad audience of developers and engineering teams.
Thank you for reading



