Terminal-Bench is an open benchmark that evaluates how well AI agents complete real tasks in a command-line terminal, such as compiling software, configuring servers, fixing broken environments or training a small model. Each task runs in an isolated container and is scored by automated tests that check the final state of the system. In AI for coding, it has become a widely reported measure of agentic coding ability alongside repository-level benchmarks.
The benchmark was introduced in 2025 by researchers at Stanford University and the Laude Institute. It deliberately goes beyond writing a single function: an agent must plan, run commands, read output and recover from errors over many steps, which is how developers and system administrators actually work in a shell.
How Terminal-Bench tasks are built
Every Terminal-Bench task is a self-contained package that defines what the agent must achieve and how success is verified. The agent receives only a natural-language instruction and access to a terminal; it never sees the tests.
The table below lists the components that each task contains.
| Component | Purpose | Visible to the agent |
|---|---|---|
| Instruction | Describes the goal in plain English | Yes |
| Docker environment | Provides the operating system, files and tools | Yes, through the shell |
| Test script | Checks the final container state | No |
| Reference solution | Proves the task is solvable | No |
| Time limit | Bounds how long the agent may work | Indirectly |
Because tests inspect outcomes rather than transcripts, an agent may solve a task in any order and with any commands. This outcome-based grading rewards working results and avoids penalizing unusual but valid approaches, while a hidden reference solution confirms that each task is feasible and correctly specified.
What the agent is asked to do
Terminal-Bench covers a broad range of terminal work, from routine administration to research-grade engineering. Tasks are contributed and reviewed by humans, and many take an experienced engineer anywhere from minutes to several hours.
| Category | Example task | Skill tested |
|---|---|---|
| Software engineering | Build a legacy C project from source | Dependency and build debugging |
| System administration | Configure a web server with TLS | Service setup and configuration |
| Security | Recover a password from a hash file | Tool use and reasoning |
| Data science | Clean a dataset and train a model | Scripting and verification |
| Games and puzzles | Solve an interactive text task | Planning under feedback |
Agents interact with the shell through a terminal multiplexer session, so they can run long processes, use interactive programs and read partial output. Handling interactive tools, timeouts and noisy logs is a large part of what separates strong agents from weak ones.
Scoring, versions and the evaluation harness
The headline metric is the task resolution rate, the percentage of tasks in which all tests pass. Results are reported for a combination of a language model and an agent scaffold, because the same model can score very differently depending on the harness that drives it.
The first public core set contained roughly eighty tasks. Terminal-Bench 2.0, released in late 2025, replaced it with a harder and more carefully verified set of 89 tasks and a new evaluation framework called Harbor. The project also provides Terminus, a deliberately minimal reference agent that lets researchers compare models under one neutral scaffold.
Scores from different versions are not directly comparable. Version 2.0 removed tasks that were ambiguous or easy to game, so a lower number on the newer set does not mean that a model became weaker.
Because agents are nondeterministic, careful evaluations run each task several times and report the mean resolution rate with a confidence interval. Reporting a single lucky run overstates ability, so published comparisons should state the number of trials, the model version, the scaffold and any time or token budget applied during the run.
Terminal-Bench compared with other coding benchmarks
Terminal-Bench complements rather than replaces earlier coding benchmarks. Its distinctive focus is end-to-end work in an operating system, not code generation in isolation.
| Benchmark | Unit of work | Main interface | What it measures |
|---|---|---|---|
| Terminal-Bench | Open-ended terminal task | Shell in a container | Multi-step agentic competence |
| SWE-bench | Real GitHub issue | Repository edits | Bug fixing in Python projects |
| MBPP | Short function | Code completion | Basic program synthesis |
| LiveCodeBench | Contest problem | Code submission | Algorithmic reasoning without contamination |
| BigCodeBench | Library-heavy function | Code completion | Practical API usage |
A model that excels at function-level benchmarks can still fail Terminal-Bench, because the benchmark also requires environment awareness, reading error messages and deciding when a task is truly finished. For this reason, vendors of agentic coding tools often cite both Terminal-Bench and SWE-bench results.
Limitations and how to read results
Like every benchmark, Terminal-Bench measures a sample of tasks, not general engineering ability. Several caveats apply when interpreting published scores.
- Scaffold dependence: leaderboard positions mix model quality with agent design, prompts and tool settings.
- Limited sample size: with fewer than one hundred tasks, a difference of a few points may fall within run-to-run variance.
- Possible contamination: public tasks can leak into training data, which is why curated and held-out sets matter.
- Cost and time not ranked: two agents with equal scores may differ greatly in tokens, runtime and number of commands.
Teams choosing an agent should therefore treat Terminal-Bench as one signal among several and repeat a small evaluation on tasks from their own environment before adopting a tool.
The idea in brief
Many computer jobs are done by typing commands into a text window called a terminal. Terminal-Bench is a set of practical tests for AI helpers that work in that window.
Each test gives the AI a job, such as installing a program or fixing a broken setup. The AI must type the commands itself. Afterward, hidden checks look at the computer and decide whether the job is really done. The final score is simple: the share of jobs finished correctly.
A practical scenario
A platform engineering team at a mid-sized software company wants to let an AI agent handle routine build and environment fixes. Two candidate agents look similar in demos, so the team compares their published Terminal-Bench 2.0 results and finds a gap of about ten percentage points.
Before deciding, the team writes twelve internal tasks in the same format, each with a Docker image of their own build system and a hidden test script. The higher-ranked agent resolves nine of the twelve tasks, while the other resolves five and twice stalls on an interactive prompt. The team adopts the stronger agent for supervised use, requires human review of every change, and reruns the internal set whenever the vendor releases a new model.