🤗 Upvotes: 23 | cs.AI, cs.CL
Authors:
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
Title:
Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments
Arxiv:
http://arxiv.org/abs/2609.04148v1
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.
We update every weekday to discuss highest-voted papers from Huggingface Daily Paper (https://huggingface.co/papers). Both the podcast scripts and audio are generated by AI. Feedback and suggestions are welcome! Email us: dailypapercast.ai@gmail.com
Creator:
Jingwen Liang, 3D ML, https://www.linkedin.com/in/jingwen-liang/
Gengyu Wang, LLM ML, http://wanggengyu.com
Listen on:
Spotify: https://open.spotify.com/show/21nrhmdaA8qoBiH8q03NXL
Apple Podcast: https://podcasts.apple.com/us/podcast/daily-paper-cast/id1777620236
Cover Image by Kawen Kuang https://kawen.art
Evan: Welcome to Daily Paper Cast.
Ashley: Today's paper comes from the Hugging Face daily paper list of September 4, 2026, and it has received 23 upvotes.
Evan: The title of the paper is 'Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments.'
Ashley: The first two authors are Jie Wu and Zhenru Zhang, with the corresponding author being Dayiheng Liu.
They're from the Qwen Team at Alibaba Group and Tsinghua University.
Evan: Alright, let’s dive into the Introduction.
Can you give us some background, Ashley?
Ashley: Evan.
So, as terminal-based code agents see growing usage, the trajectories they generate are accumulating at scale.
However, realistic, executable environments, which are needed post-training, remain scarce.
Evan: That does sound like a big gap.
Why is having executable environments so critical?
Ashley: Great question.
A trajectory is essentially a single, fixed demonstration created by a policy model.
Its quality is limited because it doesn't allow for repeated or varied interactions.
An environment, on the other hand, can be repeatedly queried to provide verifiable tasks and execution feedback, which is much more flexible and useful for fine-tuning models.
Evan: So, the environments are what actually help in refining the models continuously, right?
Ashley: Exactly.
Environments allow the same tasks to be tackled multiple times by stronger models or checked against our own tests.
However, constructing and scaling environments manually is resource-intensive and limited.
The paper addresses the need for realistic, scalable environments without requiring manual curation.
Evan: Interesting.
So, how does the paper propose to solve this problem?
Ashley: The authors introduce 'Terminal-Universe,' a framework designed to reconstruct executable environments from agent trajectories.
Essentially, it leverages the tool-execution histories contained within these trajectories.
By replaying file operations recorded in a trajectory, the framework restores each file's state to what it was before any agent modifications.
Evan: Can you break that down for us a bit more?
How does the reconstruction actually happen?
Ashley: Sure.
The reconstruction process involves two stages.
First, there's deterministic replay, which recovers the initial file states and creates a partial workspace by replaying the read, write, and edit operations recorded in a trajectory.
These operations reveal both the file contents and the structure of the workspace.
Evan: I see, so it starts by replaying the changes step by step.
What's the next stage?
Ashley: The second stage is called agentic completion.
Here, a completion agent fills in any missing files and dependencies to make the workspace executable.
This process doesn’t leak the solution but ensures that the environment is ready for task execution.
Evan: Once the environment is reconstructed, what can it be used for?
Ashley: The reconstructed environments are versatile.
They can be used to revisit and solve the original task intents or to generate entirely new tasks.
The framework also scales tasks along two axes: breadth and depth.
Breadth refers to creating complex cross-workspace queries that mirror real-world development patterns.
Depth involves extending single-round queries into multi-round sessions that consider iterative user feedback.
Evan: That sounds comprehensive.
Are there any numbers to show the effectiveness of this approach?
Ashley: Yes.
The paper reports that Terminal-Universe produced 37,300 task-sufficient environments using publicly available terminal agent trajectories.
Furthermore, fine-tuning a 27-billion parameter model, Qwen3.5-27B, on this data improved single-round performance on the Terminal-Bench 2.1 benchmark by 11.9 points and multi-round performance on EvoCode-Bench v2 by 13.8 points.
Evan: Wow, that's substantial.
What are the key contributions the paper highlights?
Ashley: The key contributions are threefold: first, the paper reframes recorded agent trajectories as a source of reusable, executable environments.
Second, they employ a two-stage process of deterministic replay and agentic completion to achieve this.
Lastly, they validate this approach empirically by showing significant performance improvements in benchmark tasks.
Evan: So, we've covered the background and objectives.
Anything else from the Introduction?
Ashley: That's the crux of the introduction.
It's clear they aim to bridge the gap between trajectories and scalable environments effectively.
Evan: Great, that's the end of the Introduction section.
Evan: Moving on, let's delve into the methods outlined in the paper.
Ashley, how does the Terminal-Universe framework work in detail?
Ashley: Sure, Evan.
The paper breaks down the Terminal-Universe framework into two main stages: environment reconstruction and re-querying methods.
Let’s start with the environment reconstruction.
Evan: Alright, what are the key steps involved in reconstructing the environment from agent trajectories?
Ashley: The reconstruction is executed in three stages.
Firstly, there’s the deterministic replay.
Here, the recorded file operations in a given trajectory are replayed to restore each file before any agent modifications.
This establishes a partial workspace for the environment.
Evan: And this basically resets the state of the workspace before the agent made any changes, right?
Ashley: Exactly.
It captures the initial state, but usually, this replay only yields a partial workspace because some files or dependencies might be missing.
Evan: So, how do they handle the incompleteness in the workspace?
Ashley: This is where the second stage, agentic completion, comes in.
A completion agent automatically supplies the missing files and dependencies required to make the environment executable while ensuring not to leak the solution to the task.
This results in a reconstructed executable workspace.
Evan: Interesting.
And how do they ensure that this approach captures the necessary project context for the task?
Ashley: The third stage involves environment filtering.
An agentic judge inspects each reconstructed workspace using read-only shell and file tools.
It labels the workspace as sufficient or insufficient based on whether it provides enough project-specific context to support the task.
Evan: Got it.
What happens after the environment is reconstructed and verified as sufficient?
Ashley: Once we have a sufficient environment, Terminal-Universe uses four complementary re-querying methods to generate new tasks and exploit the environment’s latent capabilities.
These methods are Intent Recovery, Single-Workspace Synthesis, Cross-Workspace Synthesis, and Multi-Round User Queries.
Evan: Let’s break those down.
What is Intent Recovery?
Ashley: Sure.
Intent Recovery reconstructs source tasks from user requests, agent actions, and file changes.
For single-round trajectories, the user’s main request defines the task.
For multi-round trajectories, the first request establishes the task’s topic while subsequent requests clarify or extend it.
Evan: Okay, so it’s about capturing the initial user intent accurately.
What about Single-Workspace Synthesis?
Ashley: Single-Workspace Synthesis takes it further by exploring the workspace to generate novel queries.
An offline generator inspects the workspace, considering groundedness, structural diversity, and verifiability to synthesize five self-contained candidate tasks.
Then, one valid candidate is chosen for roll-out and verification.
Evan: What kind of tasks can this process generate?
Ashley: These tasks can cover missing cases, interface behaviors, cross-module integrations, robustness improvements, and more.
They ensure that the tasks are diverse and grounded in the actual workspace.
Evan: Interesting.
So, how does Cross-Workspace Synthesis work?
Ashley: Cross-Workspace Synthesis identifies dependency relationships between multiple recovered environments to create cross-repository tasks.
Essentially, it profiles each workspace’s domain and capabilities and uses this information to generate more complex tasks that span multiple codebases, such as reading a reference implementation and moving a feature from one project to another.
Evan: And finally, what about Multi-Round User Queries?
Ashley: Multi-Round User Queries extend initial single-turn queries into iterative sessions.
After solving the initial query, a user agent asks for grounded follow-ups based on how the workspace changes, adding new requirements or requesting fixes when a round fails.
This mimics the interactive, iterative nature of real-world software engineering.
Evan: So, basically, it engages in an ongoing dialogue to refine the task incrementally.
Ashley: Exactly.
This approach not only makes the tasks more realistic but also provides valuable supervision for error diagnosis and recovery through iterative feedback.
Evan: That makes sense.
What kind of empirical validation does the paper provide for these methods?
Ashley: The authors applied the Terminal-Universe framework to publicly available terminal agent trajectories and created 37,300 task-sufficient environments.
They then trained a model called Qwen3.5-27B using these environments.
Evan: And what were the results?
Ashley: The results were impressive.
On the Terminal-Bench 2.1 benchmark, which evaluates single-round performance, the model improved by 11.9 points.
On EvoCode-Bench v2 MT@4, a benchmark for multi-round performance, the model improved by 13.8 points.
Evan: Those are significant improvements.
What do these results imply?
Ashley: They imply that the reconstructed environments created through Terminal-Universe are effective for fine-tuning and improving the performance of large-scale models on both single-round and multi-round tasks.
This demonstrates the viability of using agent trajectories to create scalable, reusable environments.
Evan: Indeed, it seems like a robust framework.
Any final thoughts on this method section?
Ashley: The method section essentially sets the foundation for leveraging agent trajectories in a novel way.
By transforming these frozen demonstrations into interactive environments, Terminal-Universe not only bridges the existing gap but also proposes a scalable solution for real-world software engineering challenges.
Evan: Great insights, Ashley.
That's the end of the Method section.
Evan: Alright Ashley, let’s get into the Experiment and Results section.
How did the authors validate the effectiveness of Terminal-Universe?
Ashley: For validation, the authors applied Terminal-Universe to a large set of publicly available terminal agent trajectories, producing 37,300 task-sufficient environments.
They then used these environments to train a downscaled model called Qwen3.5-27B.
Evan: That’s a significant number of environments.
How did they assess the performance improvements?
Ashley: They evaluated the model using two benchmarks: Terminal-Bench 2.1 for single-round performance and EvoCode-Bench v2 MT@4 for multi-round performance.
Each of these benchmarks measures how well the model performs specific coding tasks either in a single attempt or across multiple iterations, respectively.
Evan: So how did Qwen3.5-27B perform on these benchmarks?
Ashley: The results were quite compelling.
On Terminal-Bench 2.1, the model’s performance improved by 11.9 points compared to the baseline.
On EvoCode-Bench v2 MT@4, which involves iterative coding tasks, the performance saw an increase of 13.8 points.
Evan: Impressive!
These are substantial improvements.
Do they break down the contributions of different components of the framework?
Ashley: Yes, they did.
Ablation studies were carried out to isolate the contribution of each component in the framework.
For instance, they compared the effectiveness of re-solving tasks in reconstructed environments versus simply imitating the original trajectories.
Evan: Interesting.
What did the ablation studies reveal?
Ashley: One of the key findings was that re-solving tasks in reconstructed environments significantly outperformed imitating the raw trajectories.
Specifically, training with Intent Recovery, which re-solves the tasks, resulted in a higher performance than using raw source trajectories.
Evan: Did they test the impact of the agentic completion stage as well?
Ashley: Yes, they did.
They found that the agentic completion, which fills in missing files and dependencies, was crucial for achieving higher performance.
The replay-only environments without completion were less effective.
Evan: It sounds like every component plays a vital role.
Any insights from the data filtering process?
Ashley: They found that applying verifier filtering, which discards trajectories that fail validation, improved the quality of the training data.
Tasks filtered through the verifier exhibited better outcomes, especially for more complex cross-workspace tasks.
Evan: What about Multi-Round User Queries?
How did this affect the model’s performance?
Ashley: Adding Multi-Round data, which simulates iterative task solving, led to notable improvements in depth.
The model not only handled longer task sequences before failing but also achieved better verifier-case scores.
Evan: So adding this iterative refinement ability helped the model better handle cumulative requirements.
Ashley: Exactly.
It shows how important user-agent interactions can be for realistic and complex task solving.
Evan: Did they analyze where exactly Cross-Workspace Synthesis was most beneficial?
Ashley: Yes, they found that it added useful supervision beyond single-workspace tasks.
Tasks that combined multiple codebases required models to reconcile information from different sources, significantly enriching the training data.
This was especially beneficial for software engineering and debugging tasks.
Evan: It seems thorough.
Any final results or metrics worth highlighting?
Ashley: In the final evaluation, mixing single-workspace and cross-workspace tasks turned out to be the most effective strategy, improving the overall model performance across various categories.
This mix allowed the model to generalize better and tackle a broader range of tasks effectively.
Evan: Fascinating.
Anything else from the Experiments and Results section?
Ashley: That's the crux of it, Evan.
The experiments clearly validate that Terminal-Universe offers a scalable and effective means of constructing reusable environments from agent trajectories, significantly enhancing model performance.
Evan: Great, that's the end of the Experiment section.
Evan: Let’s now shift our focus to the Related Work section.
Ashley, how does this paper position itself within the broader research landscape?
Ashley: The paper provides a comprehensive overview of past efforts in scaling executable environments and synthesizing terminal tasks.
It categorizes prior work into three main routes: repository-based methods, perturbation methods, and task-conditioned synthesis.
Evan: Can you elaborate on the repository-based methods first?
Ashley: Certainly.
Repository-based methods, like those used in SWE-Gym and R2E-Gym, involve constructing tasks from the version history of real repositories.
They take a repository state just before a bug was fixed and use the original bug report and the corresponding fix to form the environment.
This allows them to create environments that mirror real development issues.
Evan: That sounds effective but probably limited in the types of tasks it can generate, right?
Ashley: Exactly, Evan.
These methods are largely limited to creating repair tasks and are constrained by the kinds of bugs that can be rolled back within a repository.
Evan: What about perturbation methods?
How do they fit in?
Ashley: Perturbation methods take an existing repository that passes its tests and deliberately inject bugs to create new tasks.
An example is CLI-Gym, where bugs are introduced into a working repository, and the agent is tasked with fixing them.
This method can generate many tasks from a few repositories but usually limits the tasks to bug fixes.
Evan: And task-conditioned synthesis?
How is that different?
Ashley: Task-conditioned synthesis generates tasks and environments from scratch based on predefined categories or compositional axes.
Methods like Endless Terminals and SkillSynth fall into this category.
They allow for controlled coverage and alignment between tasks and environments, but the environments tend to be simpler and less representative of real projects.
Evan: So those approaches may not fully capture the complexity of real-world environments.
Ashley: Precisely.
The realism of these generated environments is often limited by the generator’s complexity.
They usually produce neat, small workspaces that don't fully mimic real codebases.
Evan: How does Terminal-Universe differentiate itself from these methods?
Ashley: Terminal-Universe takes a different approach by utilizing recorded agent trajectories, which inherently contain real-world tool executions and file operations.
This allows it to reconstruct rich, executable environments by replaying these interactions.
It then broadens the utility of each environment through sophisticated re-querying methods.
Evan: In simpler terms, it turns observed real-world tasks into reusable environments rather than creating them from scratch or injecting faults.
Ashley: Exactly.
It leverages existing trajectories to recreate environments, making them much closer to real-world scenarios, and uses agentic completion to fill in any context gaps.
Evan: A smart use of what's already available, but how does it scale compared to previous methods?
Ashley: Terminal-Universe scales more effectively because it can generate a wide range of tasks across different contexts without needing manual curation or reliance on specific bugs and fixes.
Its multi-round and cross-workspace re-querying capabilities expand the breadth and depth of tasks beyond traditional single-turn queries.
Evan: That makes sense.
What about interactive and multi-round agents?
How does this paper relate to that field?
Ashley: The paper acknowledges recent efforts in modeling interactive, multi-turn dialogues with agents, such as InterCode and EvoCode-Bench.
These benchmarks formalize interaction by simulating user requirements and feedback, adding depth to task sequences.
Evan: So, it seems like this paper extends those concepts to make them even more scalable and realistic.
Ashley: Yes, it builds on those ideas by offering a scalable approach to generate multi-round tasks that mirror real-world software engineering processes.
This is especially valuable in training more resilient and capable coding agents.
Evan: Got it.
Anything else the related work covers?
Ashley: That's the overarching theme of the related work.
The authors have positioned Terminal-Universe as a novel and practical advancement over existing methods by leveraging agent trajectories to create detailed and verifiable environments, which is a significant contribution to the field.
Evan: Great, that's the end of the Related Work section.
Evan: Alright, Ashley, let's wrap up with the key contributions and takeaways from this paper.
Ashley: Sure, Evan.
The main contribution of 'Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments' lies in its innovative use of agent trajectories to reconstruct executable environments.
This framework refines the process by replaying tool-execution histories and using agentic completion to fill in the gaps.
Evan: And this approach addresses a critical need in post-training for code agents, right?
Ashley: Exactly.
By transforming a static demonstration into a dynamic environment, Terminal-Universe allows for reusable, verifiable tasks, and supports varying degrees of complexity with its single-workspace and cross-workspace queries, as well as multi-round user interactions.
Evan: What's the practical benefit of this to the field of AI and coding agents?
Ashley: Besides improving the quality and realism of training environments, the framework significantly enhances model performance on complex benchmarks.
The fine-tuning on reconstructed environments led to marked improvements on both single-round and multi-round benchmarks, demonstrating its effectiveness.
Evan: So, in a nutshell, Terminal-Universe provides a scalable, efficient way to bootstrap environments from agent trajectories, making it a substantial advancement for training more effective and versatile coding agents.
Ashley: That’s right, Evan.
It's a step forward in leveraging existing data to meet the growing demands of AI training.
Listeners, if you’re interested in exploring the detailed methodologies and results, we highly encourage you to read the full paper.
Evan: Thanks for joining us on today's episode of Daily Paper Cast.
We hope you found the discussion insightful.
Be sure to tune in tomorrow for our next deep dive into cutting-edge research in AI and related fields.
Ashley: And don’t forget to subscribe to our podcast on your favorite platform and leave a review if you enjoyed the episode.
See you next time!
Evan: Have a great day, everyone!