把AI干过的活变成能反复练手的考场
AI写代码的助手越来越多,它们干活留下的记录也堆成了山。但训练下一个AI,真正缺的不是这些记录,而是能反复试错的“考场”——一条记录只是一次演示,看一遍就没了;一个考场却能生成无数道题,还能告诉你每一步对不对。这篇的思路是反着来的:不凭空造考场,而是从AI干活的历史里把考场“挖”出来——它改过哪些文件,就先把文件恢复到改之前的样子,再让另一个AI把缺的依赖补上,一个能用的工作台就复原了。在这个工作台上,不仅能重出原来的题,还能编新题,甚至把多个代码库串起来出跨库的题,模拟真实开发里东改西改的场景。用这套方法从公开记录里造出了3.7万个考场,拿这些数据去微调一个27B的模型,单轮任务成绩涨了11.9分,多轮对话任务涨了13.8分。它不是你明天能直接用的工具,但它指了一个方向:AI的成长不一定靠更多数据,靠的是把旧数据变成能反复摔打的新场地。
📄 原文摘要(英文)
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.