Prerequisites
- Docker must be installed and running. Terminal-Bench executes each task inside a dedicated Docker container.
uvis available in the nixdevShell(provided viaflake.nix), or install it manually from docs.astral.sh/uv.- Standard provider API keys (e.g.
ANTHROPIC_API_KEY,OPENAI_API_KEY) should be exported so Mux can stream responses.
Running Terminal-Bench
All commands below should be run from the repository root.Quick smoke test (single task)
Full dataset
make:
TB_DATASET defaults to terminal-bench-core==0.1.1, but can be overridden (e.g. make benchmark-terminal TB_DATASET=terminal-bench-core==head).
Use --agent-kwarg mode=plan to exercise the plan/execute workflow—the CLI will gather a plan first, then automatically approve it and switch to execution. Leaving the flag off (or setting mode=exec) skips the planning phase.
Use TB_CONCURRENCY=<n> to control --n-concurrent (number of concurrently running tasks) and TB_LIVESTREAM=1 to stream log output live instead of waiting for the run to finish. These map to Terminal-Bench’s --n-concurrent and --livestream flags.
How the Adapter Works
The adapter lives inbenchmarks/terminal_bench/mux_agent.py. For each task it:
- Copies the Mux repository (package manifests +
src/) into/tmp/mux-appinside the container. - Ensures Bun exists, then runs
bun install --frozen-lockfile. - Launches
mux run(src/cli/run.ts) to prepare workspace metadata and stream the instruction, storing state underMUX_CONFIG_ROOT(default/root/.mux).
MUX_MODEL accepts either the Mux colon form (anthropic:claude-sonnet-4-5) or the Terminal-Bench slash form (anthropic/claude-sonnet-4-5); the adapter normalises whichever you provide.
Troubleshooting
command not found: bun– ensure the container can reach Bun’s install script, or pre-install Bun in your base image. The adapter aborts if the install step fails.- Workspace creation errors – set
MUX_PROJECT_PATHto the project directory inside the task container if auto-discovery misses it. - Task timeouts – pass
--n-tasks 1while iterating on fixes, or setTB_TIMEOUT=180when usingmake benchmark-terminal. The runner intentionally avoids GNUtimeoutso Harbor can classify task limits asAgentTimeoutError.