Table of Contents
Fetching ...

Large-Scale Terminal Agentic Trajectory Generation from Dockerized Environments

Siwei Wu, Yizhi Li, Yuyang Song, Wei Zhang, Yang Wang, Riza Batista-Navarro, Xian Yang, Mingjie Tang, Bryan Dai, Jian Yang, Chenghua Lin

TL;DR

This work tackles the challenge of training terminal-based agents with long-horizon, execution-grounded trajectories. It introduces TerminalTraj, a scalable pipeline that auto-curates Docker-enabled repositories, builds executable environments, and generates tasks with executable validation, producing tens of thousands of verified trajectories across diverse domains. Training with TerminalTraj data yields consistent improvements on TerminalBench across model sizes, with strong test-time scaling and state-of-the-art performance among sub-100B-parameter models. The findings demonstrate that large-scale, execution-grounded, and domain-diverse data substantially enhances terminal agent capabilities and their scaling behavior, suggesting significant practical impact for automated software engineering and system tasks. These results advocate for further RL integration and broader ecosystem releases to advance robust, safe terminal agents.

Abstract

Training agentic models for terminal-based tasks critically depends on high-quality terminal trajectories that capture realistic long-horizon interactions across diverse domains. However, constructing such data at scale remains challenging due to two key requirements: \textbf{\emph{Executability}}, since each instance requires a suitable and often distinct Docker environment; and \textbf{\emph{Verifiability}}, because heterogeneous task outputs preclude unified, standardized verification. To address these challenges, we propose \textbf{TerminalTraj}, a scalable pipeline that (i) filters high-quality repositories to construct Dockerized execution environments, (ii) generates Docker-aligned task instances, and (iii) synthesizes agent trajectories with executable validation code. Using TerminalTraj, we curate 32K Docker images and generate 50,733 verified terminal trajectories across eight domains. Models trained on this data with the Qwen2.5-Coder backbone achieve consistent performance improvements on TerminalBench (TB), with gains of up to 20\% on TB~1.0 and 10\% on TB~2.0 over their respective backbones. Notably, \textbf{TerminalTraj-32B} achieves strong performance among models with fewer than 100B parameters, reaching 35.30\% on TB~1.0 and 22.00\% on TB~2.0, and demonstrates improved test-time scaling behavior. All code and data are available at https://github.com/Wusiwei0410/TerminalTraj.

Large-Scale Terminal Agentic Trajectory Generation from Dockerized Environments

TL;DR

This work tackles the challenge of training terminal-based agents with long-horizon, execution-grounded trajectories. It introduces TerminalTraj, a scalable pipeline that auto-curates Docker-enabled repositories, builds executable environments, and generates tasks with executable validation, producing tens of thousands of verified trajectories across diverse domains. Training with TerminalTraj data yields consistent improvements on TerminalBench across model sizes, with strong test-time scaling and state-of-the-art performance among sub-100B-parameter models. The findings demonstrate that large-scale, execution-grounded, and domain-diverse data substantially enhances terminal agent capabilities and their scaling behavior, suggesting significant practical impact for automated software engineering and system tasks. These results advocate for further RL integration and broader ecosystem releases to advance robust, safe terminal agents.

Abstract

Training agentic models for terminal-based tasks critically depends on high-quality terminal trajectories that capture realistic long-horizon interactions across diverse domains. However, constructing such data at scale remains challenging due to two key requirements: \textbf{\emph{Executability}}, since each instance requires a suitable and often distinct Docker environment; and \textbf{\emph{Verifiability}}, because heterogeneous task outputs preclude unified, standardized verification. To address these challenges, we propose \textbf{TerminalTraj}, a scalable pipeline that (i) filters high-quality repositories to construct Dockerized execution environments, (ii) generates Docker-aligned task instances, and (iii) synthesizes agent trajectories with executable validation code. Using TerminalTraj, we curate 32K Docker images and generate 50,733 verified terminal trajectories across eight domains. Models trained on this data with the Qwen2.5-Coder backbone achieve consistent performance improvements on TerminalBench (TB), with gains of up to 20\% on TB~1.0 and 10\% on TB~2.0 over their respective backbones. Notably, \textbf{TerminalTraj-32B} achieves strong performance among models with fewer than 100B parameters, reaching 35.30\% on TB~1.0 and 22.00\% on TB~2.0, and demonstrates improved test-time scaling behavior. All code and data are available at https://github.com/Wusiwei0410/TerminalTraj.
Paper Structure (86 sections, 1 equation, 7 figures, 8 tables)

This paper contains 86 sections, 1 equation, 7 figures, 8 tables.

Figures (7)

  • Figure 1: Data Curation Pipeline. The left part illustrates data source collection, the top-right part shows Docker image curation, and the bottom-right part presents instance generation.
  • Figure 2: Instance quality evaluation results.
  • Figure 3: pass@$k$ (line) and average accuracy (bar) across different sampling budgets $k$ for multiple code models. Each panel corresponds to a different model configuration.
  • Figure 4: The ablation study results of merging different specific domains' data on TB 1.0 and TB 2.0.
  • Figure 5: Performance of models trained with different trajectory verification strategies on TB 1.0.
  • ...and 2 more figures