Back Home

AI代理與訓練資料

Terminal-Universe Reconstructs 37,000 Executable Training Environments from Agent Interaction Logs

The Qwen and Tsinghua teams no longer treat terminal-agent trajectories merely as one-off demonstrations. Instead, they reverse file operations, restore dependencies, and reconstruct workspaces that can be queried repeatedly. Fine-tuning Qwen3.5-27B on the resulting data improved two terminal-agent benchmark scores by 11.9 and 13.8 points, respectively, though the tasks, solutions, and verifiers may share biases from the same teacher model.

Comyu · CC BY-SA 3.0 · Image source
zh-Hant

Terminal-based coding agents leave behind extensive trajectories of commands, file reads and writes, and patches, but conventional supervised fine-tuning treats each trajectory as a single fixed answer. Terminal-Universe attempts to recover a more valuable asset underlying these trajectories: executable environments. The system replays file operations in reverse, restoring agent-modified files to their pre-modification states to create incomplete workspaces. A completion agent then fills in missing files and dependencies, after which a task-sufficiency judge filters out environments that cannot support the original request.

The researchers reconstructed 68,263 candidate environments from public terminal and software-engineering trajectories. With deterministic replay alone, only 40.2% of terminal workspaces and 20.1% of software-engineering workspaces were sufficient. After agent-based completion, those rates rose to 93.5% and 77.1%, respectively. Following contamination filtering, repository-level deduplication, and sufficiency checks, 37,273 environments remained. The system also expands the data in two ways: by combining interdependent workspaces into cross-repository tasks, and by using simulated users to add follow-up requirements that extend single-turn problems into multi-turn modifications.

The team used this dataset for supervised fine-tuning of Qwen3.5-27B. The paper reports an 11.9-point improvement on Terminal-Bench 2.1 for single-turn tasks and a 13.8-point improvement in multi-turn MT@4 on EvoCode-Bench v2. The technical significance is that existing agent logs may be more than training answers: they can also be converted into a library of environments that can be executed repeatedly, used to generate new tasks, and provide verification feedback.

However, successful reconstruction does not guarantee environmental fidelity. The completion agent may generate files or dependencies that never existed in the original project, while models from the same lineage could produce mutually consistent errors if they are used to write the tasks, solutions, and verifiers, allowing flawed outputs to pass the tests. The data is also predominantly Python, at 84.7%, and cross-language generalization has yet to be demonstrated. Future work should release more environments and generation code, use independent teacher models and human spot audits, and measure whether deduplication and contamination checks can withstand subtler forms of benchmark leakage.

Sources

  1. Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments
  2. Terminal-Universe paper page
  3. Terminal-Bench