Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments
Jie Wu, Zhenru Zhang, Beichen Zhang, Xuwu Wang, Yuhui Su, Mouxiang Chen, Peng Wang, Zhihai Wang, Que Shen, Hao Zhou, An Yang, Fei Huang, Yujiu Yang, Dayiheng Liu
arXiv:2609.04148 · 2026-09-04 공개 · arXiv · PDF
code-generation terminal-bench task-synthesis terminal-agents qwen3-5-27b evocode-bench trajectory-reconstruction code-environments
Abstract
As terminal-based code agents become prevalent, agent trajectories have accumulated at scale, while realistic, executable environments remain scarce. However, environments are what agent post-training actually requires: each can be re-queried into many verifiable tasks and provides execution feedback, whereas a trajectory is a single frozen demonstration. Rather than generating environments from scratch, we observe that the tool-execution history in existing trajectories exposes the structure and contents of the environments in which they ran, making it possible to reconstruct those environments from the trajectories themselves. Thus, we introduce Terminal-Universe, a framework which turns each trajectory into a reusable environment and explores it for synthesizing new tasks and continued interactions. Specifically, Terminal-Universe replays the file operations recorded in a trajectory to restore each file before the agent modified it, yielding a partial workspace; a completion agent then supplies the missing files and dependencies. On this recovered workspace, we both reconstruct the original intent task and synthesize entirely new ones. Besides, we also scale the tasks along two complementary axes: breadth and depth. For breadth, we mine directional dependency relations between related environments and synthesize cross-workspace queries spanning multiple codebases, as developers routinely do in real-world development. For depth, we extend the initial single-turn query into a multi-round session that captures iterative user feedback and requirement refinement via a user agent. Applied to public terminal agent trajectories, Terminal-Universe produces 37.3k task-sufficient environments. Supervised fine-tuning of Qwen3.5-27B on this corpus improves single-round performance on Terminal-Bench 2.1 by 11.9 points and multi-round performance on EvoCode-Bench v2 MT@4 by 13.8 points.
한국어 요약
한 줄 요약
Terminal-Universe는 기존 에이전트 트레이잭토리에서 실행 가능한 환경을 재구성하고 새로운 작업을 합성하여 터미널 기반 코드 에이전트의 학습을 확장하는 프레임워크이다.
핵심 기여도
- 기존 트레이잭토리에서 실행 가능한 환경을 재구성하여 37.3k개의 작업-충분한 환경을 생성.
- 두 가지 축(가로: cross-workspace, 세로: multi-round)을 통해 작업을 확장.
- Qwen3.5-27B 모델의 Terminal-Bench 2.1 성능을 11.9점, EvoCode-Bench v2 MT@4 성능을 13.8점 개선.
- Deterministic replay와 agentic completion을 결합한 환경 재구성 방식 제시.
핵심 아이디어
기존 터미널 에이전트 트레이잭토리는 단일 실행 기록에 불과하지만, Terminal-Universe는 이 트레이잭토리 내의 파일 조작 기록을 재생함으로써 실행 가능한 환경을 복원한다. 이는 기존 작업을 재구성하고, 새로운 작업을 합성하는 데 활용된다. 구체적으로, 파일 조작을 재생하여 부분적인 작업 공간을 복원한 후, Completion Agent가 누락된 파일과 의존성을 자동으로 보완한다. 이 방식은 기존 작업 공간을 기반으로 하기 때문에, 실제 개발 환경에 가까운 작업을 생성할 수 있다. 또한, 가로 축에서는 여러 코드베이스를 아우르는 cross-workspace 작업을, 세로 축에서는 사용자 피드백을 반영하는 multi-round 작업을 생성하여 실제 개발 시나리오를 모방한다.
기술적 접근법
- **Deterministic Replay**: 트레이잭토리 내의 파일 조작 기록을 재생하여 작업 공간을 복원.
- **Agentic Completion**: 누락된 파일과 의존성을 Completion Agent가 보완.
- **Breadth Expansion**: 관련 환경 간의 의존 관계를 분석하여 cross-workspace 작업 생성.
- **Depth Expansion**: 단일 라운드 작업을 Multi-Round 세션으로 확장, User Agent를 통해 반복 피드백 반영.
- **Verifier Filtering**: 생성된 작업은 컨테이너 내 Agent가 작성한 Verifier를 통해 검증, 모든 테스트가 통과한 트레이잭토리만 유지.
주요 결과
- Terminal-Universe는 공개된 트레이잭토리에서 37.3k개의 작업-충분한 환경을 생성.
- Qwen3.5-27B 모델의 Terminal-Bench 2.1 성능은 11.9점 개선 (베이스라인 대비).
- Multi-Round 성능은 EvoCode-Bench v2 MT@4에서 13.8점 개선.
- 환경 재구성 후 재해결 작업이 원본 트레이잭토리 학습보다 훨씬 우수한 성능을 보임.
의의 및 한계
Terminal-Universe는 기존 트레이잭토리를 기반으로 환경을 재구성함으로써, 수작업으로만 구축되던 실행 가능한 환경을 대규모로 생성할 수 있는 새로운 패러다임을 제시한다. 특히, Deterministic Replay와 Agentic Completion의 결합은 실제 개발 환경에 가까운 작업을 생성하는 데 기여하며, Cross-Workspace와 Multi-Round 작업 생성은 실제 개발 시나리오를 반영한다. 그러나 모든 작업 공간에 Ubuntu 24.04 컨테이너를 사용하기 때문에, 특수한 시스템 의존성이나 복잡한 빌드 과정이 필요한 경우 정확도가 떨어질 수 있다. 또한, 생성된 작업의 범위는 수집된 트레이잭토리의 분포에 제한된다.
실용적 활용
Terminal-Universe는 터미널 기반 코드 에이전트의 학습 데이터를 대규모로 생성할 수 있어, 소프트웨어 개발, DevOps 자동화, 코드 생성 및 검증 분야에서 활용 가능하다. 특히, 실제 개발 환경과 유사한 작업을 생성함으로써, 에이전트의 실용성과 신뢰도를 높이는 데 기여할 수 있다.