Blog
Best LLM for coding: AI models ranked by bugs in real code
How to pick an AI model for coding with Bug Bench, which ranks models by the bugs code review finds in the code they write.
Alex Mercer
By bug rate, the best LLM for coding on cubic's Bug Bench is GPT-5.6 Sol, with a relative bug rate of 0.65, or 35% fewer counted bugs than average. It is first of 7 ranked models, and no other model is statistically tied with it. Claude Fable 5.1 is second at 1.09, statistically tied with GPT-6 Astra, GPT-6.1 Sol and Claude Sonnet 5.5, so none of those four is clearly ahead of the others.
Bug Bench counts the bugs our code review finds in code that teams wrote with each model, per line, and compares each model's rate with the rate across all AI-written code.
GPT-5.6 Sol is now rare in the code we review. It wrote 0.7% of the AI-written code in the week of Oct 5, down from 35.0% in the week of Aug 17, as usage moved to newer models. Claude Opus 5.5 wrote 60.5% that week and ranks last of the seven. Which AI is best for coding on your team also depends on your coding agent: inside Claude Code, which wrote 78.1% of the AI-written code that week, Claude Fable 5.1 has the lowest rate, statistically tied with Claude Sonnet 5.5.
Best LLMs for coding, ranked by bug rate
A model is ranked once enough of its code has been reviewed across many organizations, and seven models qualify in the current window. Usage shares are measured on AI-attributed added lines in merged pull requests we reviewed in the week of Oct 5, the last complete week of the window.
Rank | Model | Relative bug rate | Statistically tied with | Share of AI-written code, week of Oct 5 |
|---|---|---|---|---|
1 | 0.65 (35% fewer counted bugs than average) | None | 0.7% | |
2 | 1.09 (9% more) | GPT-6 Astra, GPT-6.1 Sol, Claude Sonnet 5.5 | 4.1% | |
3 | 1.13 (13% more) | Claude Fable 5.1, GPT-6.1 Sol, Claude Sonnet 5.5 | 7.9% | |
4 | 1.23 (23% more) | Claude Fable 5.1, GPT-6 Astra, Claude Sonnet 5.5, Claude Opus 5 | 8.5% | |
5 | 1.27 (27% more) | Claude Fable 5.1, GPT-6 Astra, GPT-6.1 Sol, Claude Opus 5 | 3.5% | |
6 | 1.33 (33% more) | GPT-6.1 Sol, Claude Sonnet 5.5 | 1.8% | |
7 | 1.50 (50% more) | None | 60.5% |
Source: the live ranking on Bug Bench.
GPT-5.6 Sol is the only ranked model below average. The other six had 9% to 50% more counted bugs than average. Ranks 2 to 5 form one statistical tie, since every pair among Claude Fable 5.1, GPT-6 Astra, GPT-6.1 Sol and Claude Sonnet 5.5 is tied. GPT-6.1 Sol and Sonnet 5.5 are also tied with Claude Opus 5 in sixth.
All 10 models Bug Bench tracks come from Anthropic or OpenAI, so it has no rate for any Gemini model or any open-weight model. Three of the 10 are unranked. Claude Haiku 5.5, released Oct 7, is listed but doesn't have enough reviewed code to rank yet, and two older models dropped out of the ranking after their usage fell.
How Bug Bench differs from benchmark leaderboards
Most best-LLM-for-coding lists rank models by pass rates on a fixed set of test problems, which shows whether a model can solve a task under test conditions. Bug Bench counts the bugs review finds in code that teams wrote with each model, so the two kinds of ranking measure different things and can put the same models in a different order.
How to read a relative bug rate
The relative bug rate is counted bugs per AI-attributed line in code reviewed by cubic, divided by the rate across all AI-attributed lines in the window.
1.00 is average, and lower is better. GPT-5.6 Sol's 0.65 means 35% fewer counted bugs than average, and Claude Opus 5.5's 1.50 means 50% more.
A counted bug is a review finding on AI-written code that a developer upvoted or an AI coding agent addressed. Findings nobody upvoted or addressed don't count.
The average covers every AI-attributed line in the window, including unranked and unspecified models, so it isn't the average of the seven ranked models' rates.
"Statistically tied" means the two models' 95% confidence intervals overlap, so neither is clearly ahead on this measure.
To put two models side by side, use the compare page, which pairs every ranked model with every other. The full method is in the Bug Bench methodology.
What a bug rate can't tell you
Bug Bench is observational, not causal. Teams choose their models, so a rate reflects the code each model was used for as well as the model. If one model mostly gets hard migrations and another mostly gets small fixes, their rates can differ for reasons the model didn't cause.
The rate only counts bugs per line, so it says nothing about speed, cost or whether a task got finished. The data covers the code we review, and usage shares describe that code, not every team writing code with AI.
It's too early for trends on the newest models. Bug Bench needs six published weekly rates before it says whether a model is getting worse, and a model first seen in the last five weeks of the window can't have that many yet (trends).
Best AI model for each coding agent
Bug Bench also rates each model inside each coding agent against the same overall average, so these numbers sit on the same scale as the main ranking. For the agents themselves, see the best AI coding tools and agents, with Bug Bench data.
Coding agent | Share of AI-written code, week of Oct 5 | Lowest rate | Statistically tied with it | Other ranked models |
|---|---|---|---|---|
78.1% | Claude Fable 5.1 (1.09) | Claude Sonnet 5.5 (1.24) | Claude Opus 5 (1.33, tied with Sonnet 5.5), Claude Opus 5.5 (1.49) | |
18.8% | GPT-5.6 Sol (0.62) | None | GPT-6 Astra (1.13) and GPT-6.1 Sol (1.22), tied with each other | |
1.6% | Claude Opus 5 (1.28) | GPT-5.6 Sol (1.52) | None |
These shares describe the code we review, not the whole market. Claude Code's share peaked at 78.1% in the week of Oct 5, while Codex was down from its peak of 38.4% in the week of Aug 24. OpenCode wrote 0.7% in the week of Oct 5 and isn't ranked yet (all coding agents).
Claude Code
Every model ranked inside Claude Code is above the overall average. Claude Fable 5.1 is lowest at 1.09, statistically tied with Claude Sonnet 5.5 at 1.24. Claude Opus 5.5, the most-used model in the week of Oct 5, rates 1.49 there and isn't tied with any of the other three (Claude Opus 5.5 vs Claude Sonnet 5.5).
Neither Fable model is the account-type default on any plan or provider, so you pick one yourself. Run /model fable (or the full name, /model claude-fable-5-1) to switch in a session, or /model alone to open the picker (Claude Code model configuration). A pick made with /model also becomes your default for new sessions. To switch for one session only, open the picker and press s on the model's row.
Codex
GPT-5.6 Sol leads inside Codex at 0.62, with no tie, and it's the only model below average in any of the three agents. GPT-6 Astra (1.13) and GPT-6.1 Sol (1.22) are tied with each other. As of October 12, 2026, OpenAI's model guide recommends GPT-6.1 Sol for complex coding and agentic workflows, and says GPT-5.6 Sol remains available while the newer models roll out.
To choose the active model in Codex, type /model, press Enter and pick from the list, then run /status to confirm the change. The picker only shows models available to your account and workspace (Codex developer commands).
Cursor
Claude Opus 5 (1.28) and GPT-5.6 Sol (1.52) are statistically tied inside Cursor, and both point estimates are above the overall average. Cursor is the smallest sample of the three: 1.6% of the AI-written code we reviewed in the week of Oct 5, down from a peak of 10.4% in the week of Aug 17.
Models that dropped out of the ranking
Claude Opus 4.8 and Claude Fable 5 led earlier weeks but are no longer ranked, because each now writes under 0.5% of AI-attributed lines. Bug Bench still tracks both.
In the week of Jun 22, the first week of the window, Claude Opus 4.8 wrote 60.9% of AI-attributed lines. Claude Fable 5 peaked at 29.2% in the week of Jul 6, Claude Opus 5 at 47.1% in the week of Aug 3 and GPT-5.6 Sol at 35.0% in the week of Aug 17. By the week of Oct 5, Opus 4.8 and Fable 5 were down to 0.2% each, and Claude Opus 5.5, first seen in the week of Sep 21, wrote 60.5%. Bug Bench's AI coding statistics page has the latest shares, refreshed every day.
In Bug Bench's September 2026 edition, GPT-5.6 Sol also had the lowest rate, at 0.72. Still, treat any model ranking, Bug Bench's included, as a snapshot. New releases show up on the launches page with their release date, first week in the data and first rate.
How to choose the best AI model for coding
Start with the coding agent your team already runs, and look at the models ranked inside it. In Claude Code, Claude Fable 5.1 has the lowest rate, tied with Claude Sonnet 5.5. In Codex, GPT-5.6 Sol has the lowest rate, with no tie.
Read each vendor's guidance next to the rates. Anthropic's guide to choosing a model says most workloads start with Claude Opus 5.5, and OpenAI's model guide recommends GPT-6.1 Sol for complex coding. On Bug Bench, Opus 5.5 ranks last of seven and GPT-6.1 Sol is statistically tied with four other models. Vendor guides describe what each model is built for; Bug Bench counts what review found in the code teams wrote with it.
Check how much history a rate has. Claude Sonnet 5.5 and GPT-6.1 Sol were first seen in the week of Sep 28 and Claude Opus 5.5 in the week of Sep 21, so their rates cover only the last two or three weeks of the window, against 14 weeks for GPT-5.6 Sol.
When two models are statistically tied, neither is clearly ahead on bug rate, so price and speed can decide. Claude Fable 5.1 and Claude Sonnet 5.5 are tied inside Claude Code, and Sonnet 5.5's API list prices for input and output are a fifth of Fable 5.1's (Anthropic pricing). The two ranked models with the highest list prices, Fable 5.1 and GPT-6 Astra, both rate above average (bug rate vs price).
Test in your own stack. The rates pool every language, so try your top two models on real tickets in your main language for a couple of weeks and compare what review finds. For Java, type-safe Java with AI shows how to set up a build that fails on raw types, unchecked casts and possible null dereferences.
Re-check every month. Bug Bench publishes monthly editions, and two models that led earlier weeks have already dropped out of the ranking.
Keep reviewing the code. Every ranked model had counted bugs in the window, GPT-5.6 Sol included. On GitHub, cubic reviews each pull request with context from your repository, docs and tickets, and Bug Bench is built from those reviews. Our guide to AI code review explains how it works and what it catches. For what to check in agent-written code, see how to review AI-generated code and why AI code fails differently.
More model comparisons
Claude Opus 5.5 vs Claude Sonnet 5.5: the newest Opus and Sonnet models side by side on Bug Bench.
Claude Fable 5.1 vs GPT-5.6 Sol: the best-ranked Claude and GPT models side by side on Bug Bench.
All head-to-head comparisons: every pair of ranked models side by side on bug rate, list price and usage.
Best Claude models for coding: Anthropic's models ranked by bug rate on Bug Bench.
Best OpenAI models for coding: OpenAI's models ranked by bug rate on Bug Bench.
FAQ
Is there any LLM better than Claude for coding?
On Bug Bench, yes. GPT-5.6 Sol had 40% fewer counted bugs per line than Claude Fable 5.1, the best-ranked Claude model, and 57% fewer than Claude Opus 5.5. OpenAI's newer GPT-6 Astra and GPT-6.1 Sol are statistically tied with Fable 5.1 and Claude Sonnet 5.5, and both have lower rates than Opus 5.5 without a tie.
Which GPT is best for coding?
GPT-5.6 Sol, by bug rate. It ranks first overall and first inside Codex, and it had 47% fewer counted bugs per line than GPT-6.1 Sol, the Sol model OpenAI now recommends for complex coding. GPT-6.1 Sol was first seen in the week of Sep 28, so its rate covers only the last two weeks of the window. GPT-6 Astra, which OpenAI describes as its most capable model for complex work, rates 1.13, statistically tied with GPT-6.1 Sol.
Which LLM subscription is best for coding?
Bug Bench ranks models, so it can't compare subscription plans. It can tell you which model to select inside the agent your plan includes, and some selections cost extra. In Claude Code, depending on your plan and seat tier, Fable usage can bill to usage credits instead of your plan's included limits, and the /model picker shows "Requires usage credits" on the Fable row when it does (Claude Code model configuration). If you pay per token through an API, the bug rate vs price page lists each model's price next to its rate.
What is the most powerful local LLM for coding?
Bug Bench can't answer that. None of the models it tracks is a local or open-weight model, and it ranks a model only once enough of its code has been reviewed across many organizations. To compare local models, run each on the same kind of tickets for a few weeks and count the review findings your team acts on per line of AI-written code, which is close to the measure Bug Bench uses.
