Advanced Coding Intelligence

Cognition released SWE-2 today, its most capable model for automated coding tasks to date. This model arrives after the company successfully scaled reinforcement learning to the multi-trillion-parameter regime. By building upon the infrastructure of SWE-1.7, the developers created a system that balances complex reasoning with operational efficiency. On the FrontierCode 1.1 Main benchmark, the model achieves a 50.0% success rate. This puts it within one point of Fable 5.1 while costing 64% less to run.

Engineers trained SWE-2 using Kimi K3 as a base. The post-training process involved a new approach to reinforcement learning where all reasoning effort levels are trained in a single pass. This method aims to advance the entire cost-performance frontier rather than focusing on a single point. Data improvements include tripling the number of available reinforcement learning environments and refining instruction-following capabilities to ensure the model maintains context over long-running tasks.

Refined Decision Logic

Behavioral improvements in SWE-2 stem from stronger engineering judgment. The model explores codebases with more focus, moving past the tendency to over-analyze simple files. On the FrontierCode 1.1 benchmark, the model makes its first substantive edit after a median of 18 steps, a significant speed increase compared to the 48 steps required by its predecessor. This intelligence allows the agent to distinguish between relevant and irrelevant code modules earlier in the task.

Verification plays a larger role in this version. Rather than accepting user hypotheses at face value, the agent re-derives conclusions and runs artifacts to gather evidence. This discipline helps prevent regressions and ensures that the agent catches edge cases during implementation. The model also shows resourcefulness within user-defined boundaries; if a specific integration is unavailable, it often finds alternative ways to reconstruct the necessary data from accessible history.

Cost-Informed Training Methodology

The team applied Pareto-informed cost penalties during the training process to manage the tradeoff between intelligence and inference expense. They used a reward function where cost penalties are tuned to the local slope of the model's performance frontier. This ensures that the model does not sacrifice solve rates to save money in ways that degrade the overall utility of the software.

A length-weighted reward baseline stabilizes the training process. By approximating the optimal baseline with rollout length, the team reduced gradient variance without requiring extra computation during the backward pass. This approach keeps the inference-training KL divergence low, maintaining numerical stability as the model learns to prioritize shorter, successful solution paths.

Infrastructure and Deployment

System efficiency gains come from a mix of architectural and scheduling updates. The team implemented a prefill delayer in the GPU scheduler to batch requests, improving throughput per request by 10 to 20 percent. They also integrated online draft-model training for speculative decoding, which ensures the draft model remains synchronized with the policy model as it updates. Using NVFP4 and FP8 kernels for memory management allows the system to pack more rollouts into the available hardware memory.

The resulting model is now live for users. It is accessible through the desktop and CLI versions of Devin, as well as via the web interface and the Fusion environment. By lowering the cost of high-quality agentic code generation, Cognition aims to push the industry toward more accessible, high-performance automated development.