TerminalWorld: A World Model for Terminal Agent Training
Tracking issue: marin-community/marin#5866 · Branch:
AlienKevin/marin@terminalworld
What this is
A research project on whether a learned simulator of a Linux terminal can serve as the training environment for a coding agent — in place of a real Docker container behind every rollout. Two models, don’t confuse them:
- Agent: the policy that issues bash commands. This is what gets benchmarked on SWE-bench Verified / Terminal-Bench 2.0.
- Simulator: a separate model that emits terminal outputs given a command + prior session state. Used as a training-time stand-in for the real shell.
Where to start
- Literature review — prior work in four areas (neural world models, terminal agents, model-based RL for LLMs, policy↔simulator co-training).
- Phase 0 — SWE-ZERO derisk — a clean loss-mask decomposition on identical data: (a) assistant-only / (b) full-transcript / (c) user-only, where (a) ⊕ (c) = (b). On SWE-bench pass@1, assistant-only (a) is the slightly better agent (7/9/11 at 10K/100K/1M vs full-transcript’s 5/8/6, the 1M a 3-rep mean).
- World-model probe (env PPL) — but standard SFT is the worse world model, and gets worse with scale (it forgets terminal-output prediction), while full-transcript SFT preserves it and matches a purpose-built simulator. Pass@1 and world-model fidelity point in opposite directions.
- Phase 0.5 — closed-loop validation — what it would actually cost to run an agent against the simulator end-to-end. Bottleneck is simulator quality, not serving throughput.
- Evaluation methods — the three-tier protocol (intrinsic fidelity → probe-set diagnostics → downstream Terminal-Bench 2.0 transfer) the simulator gets graded against.
- Risks & gap — known failure modes and what’s new about this project relative to prior work.
Reproducibility
Every experiment’s scripts, checkpoints, and datasets are linked from a Reproduce section on its page — each pinned to an exact commit on the terminalworld branch of AlienKevin/marin. Training/eval/probe code under experiments/ and scripts/; checkpoints under gs://marin-us-east5/checkpoints/; eval datasets on HuggingFace (SWE-ZERO-{10K,100K,1M}-Qwen3-1.7B-Base{,-ECHO}-eval).