Terminal-Bench Leaderboard: Best CLI Coding Agents

Terminal-Bench 2.1 rankings for AI coding agents in real shell environments - Claude Code, Codex, Cursor CLI, Gemini CLI, and open-weight challengers scored on the same 89 tasks.

Terminal-Bench Leaderboard: Best CLI Coding Agents

Every coding agent claims it can "work like an engineer." Terminal-Bench is the benchmark built to check that claim against something other than a chat transcript: a real Linux shell, a real Docker sandbox, and a task that only counts as done when an automated test suite says so. No multiple choice, no LLM judge scoring vibes - just a headless terminal and a clock.

Built by Stanford and the Laude Institute, Terminal-Bench has become the reference point for CLI coding agents the way SWE-Bench is for GitHub issue resolution and WebArena is for browser agents. It measures a different skill than either: not "can you patch this repo" or "can you click through a checkout flow," but "can you compile this, configure that, and get a server running without a human in the loop." That skill is exactly what tools like Claude Code, Codex CLI, Cursor, and Gemini CLI are sold on.

TL;DR

  • Claude Code paired with Fable 5 leads the official, third-party-tracked Terminal-Bench 2.1 leaderboard at 83.8%, though OpenAI's self-reported GPT-5.6 Sol Ultra score of 91.9% (a four-agent parallel configuration) hasn't yet appeared on the independently verified board
  • Harness matters as much as the model: the exact same Fable 5 model scores 83.8% wrapped in Claude Code but only 80.4% in the neutral Terminus 2 scaffold - a 3.4-point swing from tooling alone, before you change a single model weight
  • Best value pick: GLM-5.2 is MIT-licensed, self-reports 81.0-82.7% depending on harness, and undercuts every frontier closed model's per-token price by 4x or more

What Terminal-Bench Actually Tests

Terminal-Bench evaluates whether an AI agent can complete real command-line work: compiling software, configuring a database, writing and running a training script, patching a security vulnerability, or standing up a web server. Each of the 89 tasks in the current version (2.1) ships with a unique Docker environment, a natural-language instruction, a human-written reference solution, and an automated test suite that checks the end state of the sandbox - not the agent's chat log.

That last detail is what separates Terminal-Bench from a lot of agentic evals. The agent gets one tool: a headless terminal. It runs Bash commands, reads the output, and iterates until it either passes the tests or runs out of budget. There's no partial credit for a plausible-sounding plan that never executes.

A laptop displaying a code editor with syntax-highlighted terminal output on a desk Terminal-Bench strips agentic coding down to one tool: a real shell, judged only by whether the sandbox ends up in the right state. Source: unsplash.com

Two Harnesses, Two Very Different Questions

This is the part that trips people up when they first read the leaderboard. Terminal-Bench scores come from two distinct kinds of submission:

  • Terminus 2 is the benchmark's own neutral scaffold - a single bash tool, the same system prompt, the same parser, and no model-specific tricks. It exists to compare raw model capability with the tooling held constant.
  • Production harnesses - Claude Code, Codex CLI, Cursor CLI, Gemini CLI, mini-SWE-agent - bring their own prompting, retry logic, sub-agent orchestration, and context management. These numbers tell you what a developer actually gets when they install the tool, not what the underlying model can do in isolation.

Both appear side by side on the official tbench.ai leaderboard, and conflating them is the single most common mistake in "which model is best at coding" arguments.

Version History and Known Limitations

Terminal-Bench 1.0 was the original 2025 release. Terminal-Bench 2.0 expanded and hardened the task set; 2.1, released in mid-2026, patched 28 of the original 89 tasks after auditors found external dependencies that had drifted, resource budgets too tight for valid solutions to finish, and a handful of instruction/test mismatches (one task's instructions asked for PostgreSQL while its tests expected Spark SQL).

Even at 2.1, the maintainers are candid about the ceiling: 89 tasks is small enough that aggregate scores carry wide confidence intervals, and a handful of idiosyncratic tasks can swing a model's rank. Every result on this page is reported with its published margin of error - treat differences smaller than about 2 points as noise, not a real capability gap.

The benchmark has also had to deal with outright cheating. An April 2026 integrity review found one submitter (OB-1/OpenBlock) had modified task timeouts and hard-coded encrypted solutions into its agent binary, another (Pilot/QuantFlow) had accidentally uploaded the hidden test folder with its submission, and a third agent (ForgeCode) was caught curling reference solutions from the open internet and stuffing them into its own context file. All were removed and rescored to zero on the affected trials. The maintainers now run an agent-judge over every passing trial and are open-sourcing that judge so submitters can self-check before publishing. It's a useful reminder that goes beyond this one benchmark - see our coverage of Berkeley's finding that every major agent benchmark can be gamed for the wider pattern.


Rankings: Terminal-Bench 2.1 (Official, Tracked Leaderboard)

These are the third-party-verified scores from tbench.ai as of mid-July 2026, each run at least five times per model/harness pair.

Screenshot of the official Terminal-Bench 2.1 leaderboard website showing ranked agent and model submissions The official tbench.ai leaderboard tracks Agent, Model, Effort, Accuracy, and a "Hacks" column that flags reward-hacking violations - context that gets lost in most secondhand summaries of these scores. Source: tbench.ai

RankAgentModelAccuracyProvider
1Claude CodeFable 583.8% ± 1.2%Anthropic
2CodexGPT-5.583.1% ± 1.1%OpenAI
3Terminus 2Fable 580.4% ± 1.2%Anthropic
4Cursor CLIGrok 4.579.3% ± 1.5%xAI/Cursor
5Claude CodeOpus 4.878.9% ± 1.3%Anthropic
6CodexGPT-5.6 Terra78.4% ± 1.3%OpenAI
7Terminus 2GPT-5.578.0% ± 1.2%OpenAI
8mini-SWE-agentMuse Spark 1.176.2% ± 1.2%Meta
9CodexGPT-5.6 Luna75.7% ± 1.3%OpenAI
10Claude CodeSonnet 574.6% ± 1.6%Anthropic
11Terminus 2Gemini 3 Pro73.9% ± 1.3%Google
12Claude CodeOpus 4.768.9% ± 1.4%Anthropic
13Terminus 2Opus 4.766.1% ± 1.4%Anthropic
14Gemini CLIGemini 3.1 Pro65.8% ± 1.7%Google
15Terminus 2Gemini 3.1 Pro65.6% ± 1.7%Google
16Claude CodeGLM-5.158.7% ± 1.2%Zhipu/Z.ai

Confidence intervals as published by tbench.ai. Rows within ~2 points of each other are not meaningfully different given the benchmark's 89-task sample size.

Self-Reported Scores Not Yet on the Tracked Board

OpenAI's GPT-5.6 launch claims put base Sol at 88.8% and "Sol Ultra" at 91.9% - a four-agent parallel configuration that trades token spend for a higher ceiling - putting it ahead of everything in the table above. Independent measurement from Artificial Analysis puts Sol at a lower 88.0-89.5% depending on reasoning effort, and today neither Sol nor Sol Ultra appears as a verified row on tbench.ai's own tracked board. Until a result clears third-party verification, treat OpenAI's number as a vendor claim, not a leaderboard position - exactly the gap the integrity review above exists to catch.

Open-Weight Models (Self-Reported, Mostly Terminal-Bench 2.0)

Open-weight labs mostly benchmark against the older Terminal-Bench 2.0 task set, so these scores aren't directly comparable to the 2.1 table above - but they show where the open-weight field stands.

ModelTerminal-Bench ScoreHarnessLicense
GLM-5.282.7% (TB 2.1, Claude Code harness) / 81.0% (Terminus 2)Self-reported by Z.aiMIT
Kimi K2.666.7% (TB 2.0)Terminus 2Modified MIT
Qwen3.6-Plus61.6% (TB 2.0)Terminus 2Proprietary (API-only)

GLM-5.2's jump is the standout: Z.ai's own card shows a 17.5-point gain over GLM-5.1's 63.5% self-reported score on the same harness - one of the largest single-generation gains anyone has posted on this benchmark. It's worth flagging that all three of these numbers come from vendor benchmark cards rather than the tbench.ai tracked board, so apply the same skepticism here that the integrity review earned for closed models.


Key Takeaways

The Harness Is Not a Rounding Error

Look at rows 1 and 3 in the official table: the same Fable 5 model scores 83.8% inside Claude Code and 80.4% inside the neutral Terminus 2 scaffold. Same weights, same API endpoint, 3.4-point gap - purely from prompting, retry policy, and how the harness manages context across a long session. The same pattern repeats for GPT-5.5 (83.1% in Codex vs. 78.0% in Terminus 2) and Opus 4.7 (68.9% vs. 66.1%). If you're assessing "is Model X good at agentic coding," the honest answer is that the question is underspecified without naming the harness too.

Gemini CLI Is Winding Down Mid-Ranking

Gemini CLI's 65.8% with Gemini 3.1 Pro puts it mid-table, comfortably ahead of the open-weight tier but well behind Claude Code and Codex. That result is now somewhat moot for new users: Google is retiring free access to Gemini CLI for the closed-source Antigravity CLI, after the open-source tool had taken in more than 6,000 community pull requests. Anyone benchmarking Gemini CLI today should treat the score as historical rather than a live recommendation.

Reasoning Effort Is a Hidden Variable

The tbench.ai table includes an effort column that this summary collapses for readability, but it matters: Claude Code with Fable 5 tops the board running at "xhigh" effort, and Terminus 2 with the same model drops from "xhigh" to "high" en route to its lower score. Several vendors, including OpenAI with GPT-5.6's Sol/Sol Ultra split, now ship multiple reasoning-effort tiers of the same model specifically because Terminal-Bench-style evals reward spending more inference compute per task. Comparing scores without checking the effort setting is comparing different products.

Open-Weight Is Genuinely Competitive at the Top, Thin Underneath

GLM-5.2's self-reported 81-82% would rank second on the official 2.1 table if it clears independent verification - a serious result for a MIT-licensed model. But the rest of the open-weight field is still catching up: Kimi K2.6 and Qwen3.6-Plus sit in the 60s on the older 2.0 task set, below even Claude Code with GLM-5.1 on the harder 2.1 suite. "Open-weight has caught up in coding" is true at the very top and not yet true across the tier.


Practical Guidance

Highest raw score, verified: Claude Code with Fable 5 (83.8%) or Codex with GPT-5.5 (83.1%) - functionally tied given the confidence intervals. Pick based on which ecosystem you're already in.

Best price-to-performance among frontier options: Codex CLI with GPT-5.6 Terra (78.4%, roughly half GPT-5.5's per-token price) is a reasonable default if you don't need the absolute top score. Claude Sonnet 5 in Claude Code (74.6% at $3/$15 per million tokens) is the cheaper Anthropic option for teams that find Fable 5 or Opus 4.8 too expensive for routine work.

Best open-weight / self-hosted pick: GLM-5.2, once its self-reported score clears independent tracking - MIT license, no per-seat cost beyond compute, and the only open-weight model currently claiming a spot near the top of the table. Until that verification lands, Kimi K2.6 is the safer bet with an officially tracked (if lower) Terminal-Bench 2.0 result and a well-documented model card.

Skip for new deployments: Gemini CLI, given Google's announced sunset. If you want Gemini's models in a terminal workflow, evaluate whatever replaces it (Antigravity CLI) on its own merits rather than assuming Gemini CLI's Terminal-Bench score carries over.

If you're choosing between CLI tools generally rather than just chasing the top score, see our comparison of Claude Code, Cursor, and Codex for feature and workflow differences this benchmark doesn't capture - things like IDE integration, cloud agent support, and how each tool handles multi-file refactors outside a sandboxed task.


FAQ

What's the difference between Terminal-Bench and SWE-Bench?

SWE-Bench tests whether an agent can resolve real GitHub issues by patching a repository. Terminal-Bench tests broader shell competency - compiling, configuring, training, securing - independent of any specific codebase or issue tracker.

Why do the same model and harness sometimes get different scores in different sources?

Reasoning effort settings (medium/high/xhigh), benchmark version (2.0 vs 2.1), and self-reported vendor numbers versus third-party-verified tbench.ai numbers all diverge. Always check which of these apply before comparing two numbers.

Is a 2-3 point gap between two rows meaningful?

Not usually. With only 89 tasks, tbench.ai's published confidence intervals run about ±1.1 to ±1.7 points, so gaps under 2-3 points are within noise.

Has anyone been caught cheating on Terminal-Bench?

Yes. An April 2026 integrity review found three cases of submitted agents gaming the benchmark, including one that hard-coded solutions and one that fetched answers from the open internet. All were rescored to zero and removed.


Sources:

✓ Last verified July 15, 2026

James Kowalski
About the author AI Benchmarks & Tools Analyst

James is a software engineer turned tech writer who spent six years building backend systems at a fintech startup in Chicago before pivoting to full-time analysis of AI tools and infrastructure.