Tmax: Open RL Recipe for Terminal Agents Beats Larger Models at 27%
Terminal-based coding agents are everywhere — Claude Code, Codex CLI, Cursor, OpenCode. But academic research on training these agents has lagged behind. The benchmarks are limited, training data is scarce, and there’s no reproducible RL baseline.
Tmax from Allen AI and University of Washington changes this. It’s a simple, open reinforcement learning recipe that trains a 9B model to 27% on Terminal-Bench 2.0, outperforming several much larger open models.
What Tmax Does
Tmax is a complete pipeline for building terminal agents:
| Stage | What it does |
|---|---|
| Data generation | Synthesizes diverse terminal tasks with controlled difficulty |
| Agent | LiteLLM-based agent with format-error recovery and output truncation |
| Training | SFT + DPPO reinforcement learning (open-instruct fork) |
| Evaluation | Terminal-Bench, TB-Lite, SWE-bench via Harbor framework |
The key insight: you don’t need exotic techniques. Tmax achieves frontier performance with a straightforward recipe — the right data, basic RL, and proper difficulty scaling.
The Data Strategy
Most RL training fails because data is either too easy (no learning signal) or too hard (reward hacking). Tmax controls this with three axes:
1. Task Difficulty — Tasks range from simple file operations to complex multi-step workflows
2. User Personas — Different prompting styles (terse vs verbose, expert vs novice)
3. Verification Diversity — Multiple ways to check correctness (file diff, command output, state checks)
The result: TMax-15K, one of the largest publicly available datasets for terminal agents — 2.5× larger than previous open datasets.
Results
On Terminal-Bench 2.0:
| Model | Size | Score |
|---|---|---|
| Tmax-9B | 9B | 27.2% |
| Qwen 3.5 72B | 72B | 24.1% |
| Llama 3.3 70B | 70B | 19.8% |
A 9B model beating 70B+ models isn’t magic — it’s evidence that terminal-agent performance is bottlenecked by training recipe, not model size.
Quick Start
Tmax runs on uv:
# Clone and install
git clone https://github.com/hamishivi/tmax
cd tmax && uv sync
# Generate a small task corpus
NUM_TASKS=10 OUT_DIR=rl_data/output/tasks_smoke \
bash rl_data/scripts/generate_tasks/run_generate_tasks.sh
# Solve tasks with an LLM agent at pass@k
TASKS_DIR=rl_data/output/tasks_smoke \
bash rl_data/scripts/generate_solutions/run_generate_solutions.sh
For evaluation, serve the model with vLLM and run Harbor:
# Serve model
uvx vllm==0.19.1 serve allenai/tmax-9b \
--served-model-name tmax-9b \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--tensor-parallel-size 8 --port 8008
# Run Terminal-Bench 2.0
uv run harbor run \
--dataset [email protected] \
--env daytona \
--agent-import-path Vanillux2Agent:Vanillux2Agent \
--model openai/tmax-9b \
--agent-kwarg api_base=http://localhost:8008/v1
Why This Matters
Terminal agents are the new frontier. Unlike chat-based coding, they operate in persistent environments — running commands, checking results, iterating. This is closer to how humans actually work.
But training them is hard. You need:
- Environments that don’t break (containerized, reproducible)
- Verifiers that check correctness programmatically
- Difficulty curves that provide learning signal throughout training
Tmax provides all three, open source.
The 15K task dataset is particularly valuable. Each task ships as a self-contained Harbor environment with a programmatic verifier — you can evaluate any model on it immediately, no regeneration needed.
Frequently Asked Questions
What is Tmax?
Tmax is an open reinforcement learning recipe for training terminal-based coding agents. Developed by Allen AI and University of Washington, it achieves 27% on Terminal-Bench 2.0 with a 9B parameter model.
What is Terminal-Bench 2.0?
Terminal-Bench 2.0 is a benchmark for evaluating agents that operate in terminal environments. It tests tasks like file manipulation, system configuration, and multi-step command sequences.
How does Tmax compare to larger models?
Tmax-9B (9 billion parameters) outperforms Qwen 3.5 72B and Llama 3.3 70B on Terminal-Bench 2.0, demonstrating that training recipe matters more than model size for terminal agents.
What is the TMax-15K dataset?
TMax-15K is one of the largest publicly available datasets for terminal agents — 15,000 tasks with programmatic verifiers, 2.5× larger than previous open datasets. It’s available in Harbor format for immediate evaluation.
What makes Tmax’s training approach effective?
Tmax controls task difficulty, varies user personas, and diversifies verification methods. This creates a broad range of terminal environments with appropriate learning signals throughout training.
Can I use Tmax to train my own terminal agent?
Yes. The entire pipeline is open source under Apache 2.0 — data generation, training (SFT + DPPO), and evaluation. You need GPUs for training and either Docker or Daytona for sandboxed evaluation.
Links: