Terminal-Bench: Evaluating AI Agents | Stanford CS329Z Guest Lecture with Alex Shaw & Ryan Marten
Stanford Online
Software becomes less legible 0:05
The lecture starts by tracing software from machine code to assembly and then to high-level languages like Fortran. The point is simple: early software was written as exact instructions you could read, and people thought coding and debugging might almost disappear. That old style made the program’s behavior something you could work out from the text itself. The speaker contrasts that with today’s shift toward systems whose behavior is less transparent.
Models and agents 5:02
Machine learning changed the process by starting from data and outputs instead of fixed rules. The speaker describes the move from deductive software to inductive systems, where you train on examples, test on new cases, and adjust through experiments. Large language models and agents push this further. You now get code and actions from learned systems, and the best way to understand them is increasingly through evaluation of what they do, not inspection of how they were written.
Terminal tasks and tools 16:31
Alex says housing-price prediction has obvious training and test data, but automating dental front-office work does not. Ryan picks up from there and says Terminal Bench turns that problem into a benchmark for agents. Bash matters because it is text-based, can call any program, and often replaces many clicks with one command. The benchmark has spread widely, appears on model cards, and has been run over 7 million times.
How Harbor structures evals 21:01
Terminal Bench grew from the K Prize work on SWE-bench, where the team asked why an agent task had to stay inside GitHub issues and pull requests. They moved toward any computer task, with an instruction, an environment such as a Docker file, and tests or judges. Harbor packages that approach. It keeps tasks agent-agnostic, declarative, portable, and self-contained, with instruction, configuration, environment, solution, and verifier.
Environment trade-offs 33:31
Keeping the environment open has clear costs. Internet access makes runs less stable because the web changes every time, and it can also create contamination and safety problems. People also try to reduce flakiness by deciding what must be downloaded at run time and what can be baked into the image before the task starts. The example here uses Terminal Bench to reverse engineer a poster from input images and recover an editable version.
Verifier design and maintenance 41:31
Verifier design is the hardest part. A verifier should match the instructions one to one, or an agent can satisfy the task and still miss the reward, or get reward for the wrong thing. Programmatic checks are reliable, but fuzzy tasks may need a model judge, which adds randomness. Reward hacking is a constant risk, so task creators look for task-specific hacks and use QA, solutions, and red teaming to find broken rules, bad configuration, and other hidden failures.
Task fixes and versioning 51:01
Broken packages, false negatives, reward hacks, and task flakiness are treated as signals to patch the benchmark. The team uses semantic versioning for tasks so a verifier fix can be applied and old agent trials regraded without rerunning them. If the change is only in the oracle or other task details, old runs stay valid. But if the prompt, environment, data, or tools change in an agent-facing way, you must rerun the trials.
Results and realism 54:02
The leaderboard is updated on a cadence, not every day, so results can be compared across releases. Historical scores stay available, and model cards still report other models’ numbers. The website also moves beyond a single static score by showing full trial traces, per-step actions, timing, cost, and logs from the agent harness and evaluation system. The same setup can model a user in the environment, including multiple networked containers, but human-like simulation adds randomness and another model to tune.
Verifier design matters 1:08:01
The hardest and most valuable part is the verifier. You can observe a task, capture some state, and turn it into an offline eval, but one data point is not enough. The best use of your effort is to draw the right decision boundary, then let automated trials hill climb toward it.
Show traces, not scores 1:12:00
A single score hides too much. Full traces let people spot reward hacks, odd behavior, and even things like the size of the deliverable. With that data, you can ask questions that a simple sixty versus fifty-five score can never answer.
AI-generated summary. It can be wrong or incomplete - check anything that matters against the original.

