AI Tools Models

Cognition’s SWE-2 Coding Model: Near the Frontier at a Lower Price

Cognition's SWE-2 nearly matches Fable 5.1 on FrontierCode at 64% lower cost, but trails on Terminal-Bench 4.

Abstract visualization representing the SWE-2 coding model's code analysis process
AI-generated editorial illustration.

Cognition, the company behind the Devin coding agent, released its SWE-2 coding model on September 10, 2026. The pitch is price. On Cognition’s own FrontierCode benchmark, SWE-2 scores within one point of Anthropic’s Fable 5.1 while costing 64% less.

SWE-2 is not trained from scratch. It is built on Kimi K3, a 2.8-trillion-parameter open model from Moonshot AI that had already been trained heavily for coding agents. Cognition then applied its own reinforcement learning on top. The company says this added five to six points on many benchmarks.

How SWE-2 Compares

Cognition published results on four coding benchmarks. The picture is strong on three of them and weaker on the fourth.

  • FrontierCode 1.1 Main: SWE-2 scores 50.0%, against 50.9% for Fable 5.1, 53.3% for GPT-6 Astra and 44.2% for the Kimi K3 base model.
  • DeepSWE 1.1: 73.0%, just behind GPT-6 Astra at 74.1% and ahead of Fable 5.1 at 67.4%.
  • Terminal-Bench 2.1: 92.8%, the highest score in Cognition’s table.
  • Terminal-Bench 4: 27.3%, far behind Fable 5.1 at 55.8% and GPT-6 Astra at 57.9%.

Cognition summarizes this as matching GPT-5.6 Sol and Fable 5 and 5.1 “at a fraction of their price,” and coming within a few points of GPT-6 Astra at a quarter of the cost. The Terminal-Bench 4 gap shows that “near the frontier” does not hold for every kind of task. FrontierCode is also Cognition’s own benchmark.

Less Wandering, Earlier Edits

The more interesting claims are about behavior. Users had complained that the previous model, SWE-1.7, explored too much and overthought simple tasks. Cognition says SWE-2 is better at judging which parts of a codebase matter.

The numbers it gives are large. On FrontierCode, SWE-2 at medium effort scores higher than SWE-1.7 while taking 58% fewer turns and costing 81% less on average. It makes its first real code edit after a median of 18 steps, compared with 48 for SWE-1.7.

From internal testing, Cognition also describes three habits. SWE-2 writes tests that check a feature end to end. When the obvious path is blocked, it looks for another route within the user’s limits; in one case, when an MCP connection was unavailable, it rebuilt the data from Slack history it already had access to. And when challenged, it re-checks its conclusions instead of simply agreeing with the user.

How Cognition Trained It

SWE-2 has several effort levels, such as medium, high and max. Higher effort means more planning and checking, and more cost. Most labs train these levels in complicated ways; Cognition says Kimi K3, for example, trains a separate expert per domain and effort level and then merges them.

Cognition instead trains all effort levels in one reinforcement learning run. The reward is simple: success minus a penalty for cost, where cost mixes the price of inference and the time a run takes. The size of the penalty for each effort level is tuned to match the base model’s existing trade-off between cost and success. The goal is to improve the whole range of cost and quality options at once, not just the top score.

Other changes were on the engineering side. Cognition tripled the number of training environments and used earlier versions of SWE-2 to make its automatic checkers stricter over time. It also sped up training with a draft model that proposes several tokens at once and with lower-precision number formats. It says this kept memory use down despite the base model having almost three times the parameters of the one behind SWE-1.7.

Availability

SWE-2 is available in Devin Desktop and the Devin command-line tool, and is rolling out to Devin Web and Fusion. The announcement does not list a separate public API or per-token prices, so the cost comparisons are Cognition’s own estimates on its benchmark.

Questions Before Switching

  • Do the team’s tasks look more like FrontierCode or like Terminal-Bench 4, where SWE-2 trails?
  • Which effort level gives the best cost and quality balance for everyday work?
  • Is using SWE-2 inside Devin acceptable, or does the team need the model in its own tools?

SWE-2 shows how fast open base models plus targeted training are closing in on the top closed models for coding. Independent tests will show whether the savings Cognition reports hold outside its own benchmark.

Sources