Terminal-Universe:將代理軌跡轉化為可擴展的終端環境

Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments

September 3, 2026
作者: 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
cs.AI

摘要

隨著終端式程式碼智能體日益普及,智能體軌跡已大規模累積,然而真實且可執行的環境仍然稀缺。然而,環境才是智能體後訓練實際上所需要的:每個環境都能被反覆查詢以產生多個可驗證任務,並提供執行回饋;而一條軌跡只是單一且固定的示範。與其從零生成環境,我們觀察到,現有軌跡中的工具執行歷史會揭露其運行環境的結構與內容,因此有可能直接從軌跡本身重建這些環境。為此,我們提出 Terminal-Universe——一個將每條軌跡轉化為可重用環境,並對其進行探索以合成新任務和延續性互動的框架。具體而言,Terminal-Universe 會重播軌跡中記錄的檔案操作,將每個檔案還原到智能體修改之前的狀態,從而得到一個部分工作區;接著由一個補全智能體補齊缺失的檔案與依賴項。在此復原的工作區上,我們既重建原始意圖任務,也合成全新的任務。此外,我們還沿著兩個互補的軸向擴展任務:廣度與深度。在廣度方面,我們挖掘相關環境之間的方向性依賴關係,並合成橫跨多個程式碼庫的跨工作區查詢,正如開發者在真實開發中經常進行的工作。在深度方面,我們將初始的單輪查詢延伸為多輪會話,透過使用者智能體捕捉疊代式的使用者回饋與需求精化。將 Terminal-Universe 應用於公開的終端智能體軌跡,可產生 3.73 萬個足以承載任務的環境。在此語料庫上對 Qwen3.5-27B 進行監督式微調,使 Terminal-Bench 2.1 上的單輪效能提升 11.9 個百分點,並使 EvoCode-Bench v2 MT@4 上的多輪效能提升 13.8 個百分點。
English
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.
PDF2130September 5, 2026