head-to-head
| Metric | Claude Opus 4.8 | Claude Sonnet 5 |
|---|---|---|
| SWE-bench Verified | 88.6% | 85.2% |
| SWE-bench Pro | 69.2% | 63.2% |
| Terminal-Bench | ~82.7% (TB2.1) | 80.4% (TB2.1) |
| Input $ / 1M | $5 | $2 |
| Output $ / 1M | $25 | $10 |
| Context | 1M | 1M |
| Open weights | No | No |
| Access | API · Claude Code · claude.ai (Max) | API · Claude Code · claude.ai (Free/Pro default) |
| Maker | Anthropic | Anthropic |
what do the benchmarks actually say?
On SWE-bench Verified — real, human-validated GitHub issues resolved end-to-end — Claude Opus 4.8 posts 88.6% against 85.2% for Claude Sonnet 5, a 3.4-point gap. Verified is the closest public proxy for "can it fix a real bug in a real repo without help", which is why it anchors our ranking.
SWE-bench Pro is the harder, less-saturated test — bigger repos, multi-file changes, no memorized answers. Here Claude Opus 4.8 leads with 69.2% to 63.2%, a 6-point margin. On Terminal-Bench (agentic terminal work) it's Claude Opus 4.8 at ~82.7% (TB2.1) versus Claude Sonnet 5 at 80.4% (TB2.1).
A few points either way is real but not decisive: within that band, the agent scaffolding around the model — how it retrieves files, runs tests, and retries — often matters as much as the base model. Treat the gap as a lean, not a verdict.
which is cheaper to run?
Claude Sonnet 5 is the cheaper model: $2 per 1M input tokens ($10 output) versus $5 ($25 output) for Claude Opus 4.8 — roughly 2.5× less on input. Coding workloads are output-heavy — agents write diffs, tests and retries — so weight the output rate more than the input rate when you estimate a monthly bill.
when to pick each
The hardest agentic refactors and long, autonomous multi-file tasks where every point of accuracy saves a human review cycle.
The best closed-model value — near-Opus scores at ~2.5× less, and the default daily driver for most developers.
how were these scores verified?
We only print a number once it's confirmed against a primary source or an independent evaluation, and each row on our leaderboard records which kind it is:
- Claude Opus 4.8: Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 88.6% ±1.42. Corrected Jul 17, 2026: we previously printed Anthropic's own "~86%" and claimed independent evals tracked it within ~1 point, which was wrong — the independent number is 2.6 points higher, and our methodology is to prefer the independent one. Run through the Claude Code harness instead of the bare bash agent, vals.ai measures 85.8%, a reminder that the harness moves these numbers as much as the model does. SWE-bench Pro 69.2% is Anthropic-reported.
- Claude Sonnet 5: Vendor-reported (Anthropic), on Anthropic's own scaffold. Independent comparison: vals.ai's bash-only harness measures Sonnet 5 at 79.6% ±1.80, 5.6 points lower — a gap that reflects the harness as much as the model, so treat the 85.2% as a best-case number. Intro pricing $2/$10 per 1M through Aug 31, 2026, then $3/$15.
Full reviewsClaude Sonnet 5, decoded
Ranked on our AI Coding Leaderboard, updated 2026-07-17. Scores are confirmed against primary sources; prices are per 1M input tokens and can change.
- Anthropicvals.ai — SWE-bench Verified (independent) — Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 88.6% ±1.42. Corrected Jul 17, 2026: we previously printed Anthropic's own "~86%" and claimed independent evals tracked it within ~1 point, which was wrong — the independent number is 2.6 points higher, and our methodology is to prefer the independent one. Run through the Claude Code harness instead of the bare bash agent, vals.ai measures 85.8%, a reminder that the harness moves these numbers as much as the model does. SWE-bench Pro 69.2% is Anthropic-reported.
- AnthropicGENZ TECH — Claude Sonnet 5, decoded — Vendor-reported (Anthropic), on Anthropic's own scaffold. Independent comparison: vals.ai's bash-only harness measures Sonnet 5 at 79.6% ±1.80, 5.6 points lower — a gap that reflects the harness as much as the model, so treat the 85.2% as a best-case number. Intro pricing $2/$10 per 1M through Aug 31, 2026, then $3/$15.
- BenchmarkSWE-bench — the real-GitHub-issue benchmark