Integrates Terminal-Bench and Harbor for benchmarking AI agent performance and failure analysis.
Install
mkdir -p .claude/skills/tbench && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8589" && unzip -o skill.zip -d .claude/skills/tbench && rm skill.zipInstalls to .claude/skills/tbench
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Terminal-Bench integration for Mux agent benchmarking and failure analysisKey capabilities
- →Run full benchmark suites for agent evaluation
- →Execute specific benchmark tasks
- →Run benchmarks with specific models and thinking levels
- →Utilize Daytona cloud sandboxes for parallel execution
- →Analyze failure rates of agents
- →Configure global timeouts for benchmark runs
How it works
It integrates with Terminal-Bench 2.0 and Harbor to execute benchmark suites for agent evaluation, allowing configuration of tasks, models, and execution environments. It also provides tools for analyzing the results.
Inputs & outputs
When to use tbench
- →Run benchmark suite
- →Analyze agent performance
- →Use cloud sandboxes for faster testing
About this skill
Terminal-Bench Integration
This directory contains the mux agent adapter for Terminal-Bench 2.0, using Harbor as the evaluation harness.
Quick Start
When user asks to run a tbench, generally assume they mean in CI via workflow_dispatch.
# Run full benchmark suite
make benchmark-terminal
# Run specific tasks
make benchmark-terminal TB_TASK_NAMES="hello-world chess-best-move"
# Run with specific model and xhigh thinking
MUX_RUN_ARGS="--thinking xhigh" make benchmark-terminal TB_ARGS="--agent-kwarg model_name=anthropic/claude-opus-5"
# Run on Daytona cloud (high parallelism)
TB_ENV=daytona TB_CONCURRENCY=48 make benchmark-terminal
Daytona Cloud Sandboxes
For faster benchmarks, use Daytona cloud sandboxes instead of local Docker:
# Set API key (get from https://app.daytona.io)
export DAYTONA_API_KEY="your-api-key"
# Run with 48 concurrent cloud sandboxes (~6x faster than local)
make benchmark-terminal TB_ENV=daytona TB_CONCURRENCY=48
# Run specific tasks on Daytona
make benchmark-terminal TB_ENV=daytona TB_CONCURRENCY=48 TB_TASK_NAMES="chess-best-move stockfish-elo"
Account limits (Tier 3): Pool of 250 vCPU / 500GB RAM. Most tasks require 1 vCPU / 2GB RAM, with a few needing up to 4 vCPU / 8GB RAM. Harbor automatically requests the correct per-task resources.
Speed comparison:
| Environment | Concurrency | Full suite time |
|---|---|---|
| Local Docker | 4 | ~90 min |
| Daytona Cloud | 48 | ~10-15 min |
Configuration
Environment Variables
TB_DATASET: Dataset to use (default:[email protected])TB_CONCURRENCY: Number of concurrent tasks (default: 4)TB_TIMEOUT: Global timeout in seconds (default: 1800 = 30 minutes)TB_ENV: Environment to run in (localordaytona)TB_TASK_NAMES: Space-separated task names to run (default: all tasks)TB_ARGS: Additional arguments passed to harborMUX_RUN_ARGS: CLI flags passed directly tomux runinside the container (e.g.,--thinking high --use-1m --budget 5.00). This is the primary mechanism for allmux runflags — avoids per-flag plumbing.MUX_RUN_AS_GOAL: When set to1, runs each task instruction as a strictmux run --goalobjective while still piping the instruction to stdin. UseMUX_RUN_ARGSfor goal limits such as--goal-turnsand--goal-budget. Incomplete strict-goal exits are left scoreable so Harbor can verify the workspace.
Timeout Handling
The benchmark uses Harbor's global timeout applied to all tasks. The default is 30 minutes (1800 seconds), which provides sufficient time for most tasks while catching genuinely stuck agents. The mux runner does not wrap the command in GNU timeout; Harbor must classify task timeouts as AgentTimeoutError so the workflow can distinguish timeout/infra cases from mux process failures.
Design Rationale:
Based on analysis of Oct 30, 2025 nightly runs:
- Longest successful task:
blind-maze-explorer-algorithm.hardat 20 minutes - 95th percentile: ~15 minutes
- Mean duration: ~6 minutes
The 30-minute default provides comfortable headroom for complex tasks without excessive wait times for failed attempts.
Override timeout:
# Run with 60 minute timeout for very complex tasks
TB_TIMEOUT=3600 make benchmark-terminal
# Run with shorter 10 minute timeout for quick iteration
TB_TIMEOUT=600 make benchmark-terminal TB_SAMPLE_SIZE=5
Note: We prefer global timeout defaults over per-task configuration to avoid complexity and maintenance burden. If you find tasks consistently timing out, increase TB_TIMEOUT rather than adding per-task configuration.
Agent Configuration
The agent adapter accepts a few Harbor kwargs (passed via --agent-kwarg):
model_name: Model to use (e.g.,anthropic/claude-opus-5,openai/gpt-5.6-sol)experiments: Experiments to enable, comma-separated (e.g.,programmatic-tool-calling)
All other mux run CLI flags (thinking level, mode, runtime, budget, etc.) are passed via MUX_RUN_ARGS — no per-flag plumbing needed.
CI dispatch (primary method):
# Run with model, thinking, and 1M context
gh workflow run terminal-bench.yml \
-f model_name=anthropic/claude-opus-5 \
-f mux_run_args="--thinking high --use-1m"
# Run GPT-5.6 Sol with budget cap and high thinking
gh workflow run terminal-bench.yml \
-f model_name=openai/gpt-5.6-sol \
-f mux_run_args="--thinking high --budget 5.00"
Strict goal-mode runs:
# Run a single task as a strict CLI Goal Run
MUX_RUN_AS_GOAL=1 \
MUX_RUN_ARGS="--thinking high --goal-turns 30 --goal-budget 10.00" \
make benchmark-terminal TB_TASK_NAMES="chess-best-move"
# CI dispatch
gh workflow run terminal-bench.yml \
-f model_name=anthropic/claude-sonnet-4-5 \
-f task_names=chess-best-move \
-f mux_run_as_goal=true \
-f mux_run_args="--thinking high --goal-turns 30 --goal-budget 10.00"
Local runs:
# Pass flags via MUX_RUN_ARGS env var
MUX_RUN_ARGS="--thinking high --use-1m" make benchmark-terminal
# Model and experiments via TB_ARGS
MUX_RUN_ARGS="--thinking high" make benchmark-terminal TB_ARGS="--agent-kwarg model_name=openai/gpt-5.6-sol --agent-kwarg experiments=programmatic-tool-calling"
Monitoring local benchmark output
Local Terminal-Bench runs can be long and log-driven. If you intentionally run one locally instead of dispatching CI, start it as a monitored background bash so Mux wakes on terminal benchmark failure/completion lines instead of requiring parent-side polling.
bash({
script: 'make benchmark-terminal TB_TASK_NAMES="hello-world"',
display_name: "Terminal-Bench Local",
run_in_background: true,
timeout_secs: 7200,
monitor: {
filter: "FAILED|ERROR|Traceback|AgentTimeoutError|results saved|Results saved|pass rate|score",
cooldown_ms: 1000,
max_events: 5,
},
});
Use this only for line-oriented local process output. For GitHub workflow dispatch status, use a bounded background task/workflow monitor that polls gh/GitHub state.
Results
Results are saved to runs/YYYY-MM-DD__HH-MM-SS/:
results.json: Aggregate results with pass/fail ratesrun_metadata.json: Run configuration and metadata<task-id>/: Per-task directories containing:sessions/agent.log: Full agent execution logsessions/agent.cast: Asciinema recording of agent sessionsessions/tests.log: Test execution outputresults.json: Per-trial results
CI/CD Integration
Querying Results from BigQuery
Mux Terminal-Bench results are uploaded to BigQuery after CI runs. Query via bq CLI after authenticating with gcloud auth login and setting project to mux-benchmarks.
Table: mux-benchmarks.benchmarks.tbench_results
Schema: run_id (STRING), task_id (STRING), model_name (STRING), thinking_level (STRING: off/low/medium/high), mode (STRING: plan/exec), dataset (STRING), experiments (STRING), passed (BOOL), score (FLOAT), n_input_tokens (INT), n_output_tokens (INT), github_run_id (INT), github_sha (STRING), ingested_at (TIMESTAMP).
See .github/workflows/terminal-bench.yml and .github/workflows/nightly-terminal-bench.yml for GitHub Actions integration.
Nightly workflow runs both Claude and GPT models on the full task suite, uploading results as artifacts.
Leaderboard Submission
To submit mux results to the Terminal-Bench 2.0 leaderboard:
Step 1: Prepare Submission
The leaderboard computes pass@k from multiple attempts per task. Provide multiple runs so each becomes its own job folder inside the submission.
# Download latest 5 successful nightly runs (recommended for submission)
python3 benchmarks/terminal_bench/prepare_leaderboard_submission.py --n-runs 5
# Use specific run IDs (each becomes a separate job folder)
python3 benchmarks/terminal_bench/prepare_leaderboard_submission.py --run-id 111 222 333 444 555
# Use multiple existing artifact directories
python3 benchmarks/terminal_bench/prepare_leaderboard_submission.py --artifacts-dir ./run1 ./run2
# Download latest single run (quick iteration)
python3 benchmarks/terminal_bench/prepare_leaderboard_submission.py
# Only prepare specific models
python3 benchmarks/terminal_bench/prepare_leaderboard_submission.py --n-runs 5 --models anthropic/claude-opus-5
This creates a properly structured submission folder at leaderboard_submission/ containing:
submissions/terminal-bench/2.0/Mux__<model>/
metadata.yaml # Agent and model info
<job-folder-1>/ # Results from run 1
config.json
result.json
<trial-1>/
config.json
result.json
agent/
verifier/
...
<job-folder-2>/ # Results from run 2
...
Step 2: Submit via HuggingFace Python API
The hf upload CLI tends to timeout on large submissions due to LFS file handling.
Use the Python API with an extended timeout instead:
# Install huggingface_hub (via uv or pip)
pip install huggingface_hub
# Authenticate (one-time setup)
hf auth login
import httpx
from huggingface_hub import HfApi
from huggingface_hub.utils import configure_http_backend
configure_http_backend(
backend_factory=lambda: httpx.Client(timeout=httpx.Timeout(300.0, connect=60.0))
)
api = HfApi()
api.upload_folder(
repo_id="alexgshaw/terminal-bench-2-leaderboard",
folder_path="./leaderboard_submission/submissions",
path_in_repo="submissions",
repo_type="dataset",
create_pr=True,
commit_message="Add Mux + <Model> submission",
commit_description="- Agent: Mux (Coder)\n- Model: <model>\n- <N> tasks × <K> attempts",
)
The PR will be automatically validated by the leaderboard bot. Once merged, results appear on the leaderboard.
Tips from past submissions:
- The prepare script already
Content truncated.
When not to use it
- →When the task requires a per-task timeout configuration instead of a global one
Limitations
- →The default global timeout is 30 minutes, which may not be sufficient for all tasks.
- →The skill prefers global timeout defaults over per-task configuration.
- →The analysis script requires `bq CLI` for Mux results and `git` for leaderboard data.
How it compares
This skill automates and standardizes agent benchmarking using specific tools and configurations, offering a structured approach compared to ad-hoc testing.
Compared to similar skills
tbench side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| tbench (this skill) | 0 | 2mo | Review | Intermediate |
| chaos-scenario | 0 | 2mo | Review | Advanced |
| omnidocbench-eval-helper | 0 | 3mo | Review | Advanced |
| mlops-engineer | 3 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by coder
View all by coder →You might also like
chaos-scenario
petercort
Use when authoring, running, or reviewing chaos engineering experiments in this monorepo. Covers steady-state hypothesis, fault injection (service kill, latency, network partition, overload), result recording to CSV, and cleanup/restore. Triggers: "add chaos scenario", "new chaos test", "inject faul
omnidocbench-eval-helper
opendatalab
Help users deploy, validate, run, and parse OmniDocBench evaluations. Use this skill whenever the user mentions OmniDocBench, document parsing/OCR benchmark scoring, MinerU or other model evaluation on OmniDocBench, CDM formula metrics, end2end/md2md configs, Docker/conda deployment, remote SSH/H-cl
mlops-engineer
sickn33
Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.
senior-devops
davila7
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.
log-analyzer
mikopbx
Анализ логов Docker контейнера для диагностики проблем и мониторинга здоровья системы. Использовать при отладке ошибок, отслеживании процессов воркеров, исследовании проблем API или мониторинге поведения системы после тестов.
server-management
davila7
Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.