Back to AI Research

AI Research

Terminal-Universe: Turning Agent Trajectories into... | AI Research

Key Takeaways

  • Terminal-Universe is a framework designed to solve the scarcity of realistic, executable environments for training terminal-based code agents.
  • 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.
  • 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.
  • On this recovered workspace, we both reconstruct the original intent task and synthesize entirely new ones.
Paper AbstractExpand

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 is a framework designed to solve the scarcity of realistic, executable environments for training terminal-based code agents. While agent trajectories—the recorded history of an agent's actions—are abundant, they are "frozen" demonstrations that cannot be interacted with or verified. Terminal-Universe addresses this by "inverting" the process: it uses the tool-execution history within existing trajectories to reconstruct the original workspaces, turning them into reusable, verifiable environments where agents can be trained to solve new tasks.

Reconstructing Environments from History

The framework reconstructs environments in three distinct stages. First, it performs a deterministic replay of the file operations recorded in a trajectory, restoring files to their state before the agent modified them. Because this initial workspace is often incomplete, a "completion agent" is used to supply missing files and dependencies. Finally, the system filters these workspaces, retaining only those that provide enough context for an agent to successfully perform a task. This approach allows the researchers to generate thousands of task-sufficient environments without needing to build them from scratch or rely on manual curation. The ai agents story also surfaces in Google AI Introduces EnvHarness for Adaptive..., adding another angle.

Scaling Tasks Through Breadth and Depth

Once an environment is recovered, Terminal-Universe scales the utility of that workspace by generating new tasks along two axes. For "breadth," the framework identifies dependency relationships between different environments to create cross-workspace tasks, requiring an agent to navigate and integrate code across multiple projects—a common real-world development scenario. For "depth," it extends single-turn tasks into multi-round sessions. In these sessions, a user agent provides iterative feedback, introduces new requirements, or requests bug fixes based on test failures. This forces the coding agent to handle evolving requirements and learn from its own mistakes. The same ai evaluation question is explored in StarHarness, which adds a research perspective.

Empirical Performance

The researchers applied Terminal-Universe to publicly available terminal agent trajectories, resulting in 37.3k task-sufficient environments. To validate the framework, they used this data to fine-tune the Qwen3.5-27B model. The results showed significant improvements: the model’s performance on the Terminal-Bench 2.1 benchmark increased by 11.9 points for single-round tasks, and its performance on the multi-round EvoCode-Bench v2 improved by 13.8 points. These findings suggest that re-solving tasks in reconstructed environments is a highly effective strategy for training capable code agents compared to simply imitating raw trajectories. The same ai evaluation question is explored in TransMeme, which adds a research perspective. as detailed in the full paper on Arxiv

Comments (0)

No comments yet

Be the first to share your thoughts!