head-to-head

MetricClaude Opus 4.8Grok 4.5
SWE-bench Verified88.6%86.6%
SWE-bench Pro69.2%64.7%
Terminal-Bench~82.7% (TB2.1)83.3% (TB2.1)
Input $ / 1M$5$2
Output $ / 1M$25$6
Context1M
Open weightsNoNo
AccessAPI · Claude Code · claude.ai (Max)API · SpaceXAI console · Grok Build · Cursor (all plans); not in EU yet
MakerAnthropicSpaceXAI (xAI)

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 86.6% for Grok 4.5, a 2-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 64.7%, a 4.5-point margin. On Terminal-Bench (agentic terminal work) it's Claude Opus 4.8 at ~82.7% (TB2.1) versus Grok 4.5 at 83.3% (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?

Grok 4.5 is the cheaper model: $2 per 1M input tokens ($6 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

Pick Claude Opus 4.8 if

The hardest agentic refactors and long, autonomous multi-file tasks where every point of accuracy saves a human review cycle.

Pick Grok 4.5 if

The best value at the top of the board: it solves a SWE-bench Verified task for about $2.31 of input, less than half what the two models above it cost, and it is the fastest of the leaders.

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.
  • Grok 4.5: Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 86.6% ±1.52. Verified Jul 17, 2026 — it launched Jul 8 with no Verified score and we had it unranked as "Opus-class, unproven"; the independent number now backs the Opus-class claim, landing it 2 points under Claude Opus 4.8 at 40% of the input price. On our price-per-solved-task metric that is ~$2.31 against $5.64 for Opus 4.8 and $10.53 for Fable 5, the cheapest of any model scoring above 85%. It is also quick: 199.6s mean latency per task versus 566.9s for Opus 4.8. SWE-bench Pro 64.7% and Terminal-Bench 2.1 83.3% remain SpaceXAI-reported. Priced $2/$6 per 1M. Still not available in the EU.

Full reviewsGrok 4.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.

Primary sources
  • 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.
  • SpaceXAI (xAI)vals.ai — SWE-bench Verified (independent) — Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 86.6% ±1.52. Verified Jul 17, 2026 — it launched Jul 8 with no Verified score and we had it unranked as "Opus-class, unproven"; the independent number now backs the Opus-class claim, landing it 2 points under Claude Opus 4.8 at 40% of the input price. On our price-per-solved-task metric that is ~$2.31 against $5.64 for Opus 4.8 and $10.53 for Fable 5, the cheapest of any model scoring above 85%. It is also quick: 199.6s mean latency per task versus 566.9s for Opus 4.8. SWE-bench Pro 64.7% and Terminal-Bench 2.1 83.3% remain SpaceXAI-reported. Priced $2/$6 per 1M. Still not available in the EU.
  • BenchmarkSWE-bench — the real-GitHub-issue benchmark