TermiGen: High-Fidelity Environment and Robust Trajectory Synthesis for Terminal Agents
Executing complex terminal tasks remains a significant challenge for open-weight LLMs, constrained by two fundamental limitations. First, high-fidelity, executable training environments are scarce: environments synthesized from real-world repositories are not diverse and scalable, while trajectories synthesized by LLMs suffer from hallucinations. Second, standard instruction tuning uses expert trajectories that rarely exhibit simple mistakes common to smaller models. This creates a distributional mismatch, leaving student models ill-equipped to recover from their own runtime failures. To bridge these gaps, we introduce TermiGen, an end-to-end pipeline for synthesizing verifiable environments and resilient expert trajectories. Termi-Gen first generates functionally valid tasks and Docker containers via an iterative multi-agent refinement loop. Subsequently, we employ a Generator-Critic protocol that actively injects errors during trajectory collection, synthesizing data rich in error-correction cycles. Fine-tuned on this TermiGen-generated dataset, our TermiGen-Qwen2.5-Coder-32B achieves a 31.3% pass rate on TerminalBench. This establishes a new open-weights state-of-the-art, outperforming existing baselines and notably surpassing capable proprietary models such as o4-mini. Dataset is avaiable at https://github.com/ucsb-mlsec/terminal-bench-env.
698abbae1b2dc6b37d61b0f3
Kaijie Zhu
claimed_verified
2026-03-19T13:05:05.351Z
641fb3733c49fc33cedb4429
/avatars/3577bca726282ed4b26009f3a2d5e87d.svg
Kaijie Zhu
March07
user
March07
698abbae1b2dc6b37d61b0f4
Yuzhou Nie
698abbae1b2dc6b37d61b0f5
Yijiang Li
claimed_verified
2026-02-11T11:18:54.946Z
6419309f22270b3ccf177c77
https://cdn-avatars.huggingface.co/v1/production/uploads/6419309f22270b3ccf177c77/KQa1586iBBKqucUlfpuPp.jpeg
William Li
williamium
user
williamium
698abbae1b2dc6b37d61b0f6
Yiming Huang
698abbae1b2dc6b37d61b0f7
Jialian Wu
698abbae1b2dc6b37d61b0f8
Jiang Liu
698abbae1b2dc6b37d61b0f9
Ximeng Sun
698abbae1b2dc6b37d61b0fa
Zhenfei Yin
698abbae1b2dc6b37d61b0fb
Lun Wang
claimed_verified
2026-02-23T09:47:14.164Z
699b731eac17ddf87e6f65b1
/avatars/c5e2b8973d2d3e5d149a7eea3ad040a6.svg
Lun Wang
lunwang1996
user
lunwang1996
698abbae1b2dc6b37d61b0fc
Zicheng Liu
698abbae1b2dc6b37d61b0fd
Emad Barsoum
698abbae1b2dc6b37d61b0fe
William Yang Wang
698abbae1b2dc6b37d61b0ff
Wenbo Guo
TermiGen: High-Fidelity Environment and Robust Trajectory Synthesis for Terminal Agents
Executing complex terminal tasks remains a significant challenge for open-weight LLMs, constrained by two fundamental limitations. First, high-fidelity, executable training environments are scarce: environments synthesized from real-world repositories are not diverse and scalable, while trajectories synthesized by LLMs suffer from hallucinations. Second, standard instruction tuning uses expert trajectories that rarely exhibit simple mistakes common to smaller models. This creates a distributional mismatch, leaving student models ill-equipped to recover from their own runtime failures. To bridge these gaps, we introduce TermiGen, an end-to-end pipeline for synthesizing verifiable environments and resilient expert trajectories. Termi-Gen first generates functionally valid tasks and Docker containers via an iterative multi-agent refinement loop. Subsequently, we employ a Generator-Critic protocol that actively injects errors during trajectory collection, synthesizing data rich in error-correction cycles. Fine-tuned on this TermiGen-generated dataset, our TermiGen-Qwen2.5-Coder-32B achieves a 31.3% pass rate on TerminalBench. This establishes a new open-weights state-of-the-art, outperforming existing baselines and notably surpassing capable proprietary models such as o4-mini. Dataset is avaiable at https://github.com/ucsb-mlsec/terminal-bench-env.
TermiGen introduces a pipeline for generating verifiable terminal environments and resilient trajectories to improve open-weight LLMs' ability to execute complex tasks and recover from runtime errors.
instruction tuning expert trajectories distributional mismatch multi-agent refinement loop Generator-Critic protocol error-correction cycles TerminalBench pass rate