potentialpaper

Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments

Anonymous authors

ICLR 2027

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Terminal-Universe turns agent trajectories into reusable, executable terminal environments at scale. It re-queries these recovered environments to expand task breadth across workspaces and depth through multi-round interactions.

Abstract. As terminal-based code agents become increasingly prevalent, the corresponding agent trajectories have accumulated at scale, while realistic, executable environments remain scarce. However, environments are what agent post-training actually requires: each one can be re-queried into many verifiable tasks and provides the execution feedback, whereas a trajectory is a single frozen demonstration. Rather than generating environments from scratch, we observe that the tool-execution history in the existing agent 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 for the corresponding environment along two complementary axes: breadth and depth, to reproduce a routine pattern of real engineering practice. 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 publicly available 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.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
20 Aug 2026ICLR 2027 (under review)submittedICLR 2027Under reviewreviews ↓[1]PDF[1]
Missing a version?

ICLR 2027

Under review · 3 reviews · OpenReview

Updated 25 Nov 2026, 10:37 UTC.

Reviewer wrBbOpenReview ↗
Rating
3/4
Confidence
3/4
Soundness
2/3
Presentation
3/3
Informativeness
2/3
Read review
Summary

This paper introduces Terminal-Universe, a pipeline that transforms recorded terminal-agent trajectories into reusable, task-sufficient execution environments. Deterministic replay restores observed files to their pre-solution states, an agent reconstructs missing project context, and a read-only judge filters out incomplete or insufficient workspaces. The resulting environments support re-solving tasks with the original intent, generating new tasks within or across workspaces, and conducting multi-round interactions with evolving requirements and verifier-driven user feedback. Using this pipeline, the authors construct 37k task-sufficient environments. SFT on Qwen3.5-27B yields improvements of over 10 percentage points on Terminal-Bench 2.1 and EvoCode-Bench v2. Ablation studies covering re-solving, context completion, verification, breadth/depth expansion, environment allocation, and other components, further validating the effectiveness of the proposed approach.

Strengths
  1. A useful and well-motivated approach to scaling executable agent environments. The paper repurposes existing demonstrations into reusable workspaces that support renewed interaction and the creation of new tasks, addressing a practical bottleneck in terminal-agent post-training. The overall pipeline is clearly presented and easy to follow.

  2. Strong overall improvements with multiple evaluations of generality. Using the same Qwen3.5-27B base model, the full training mixture delivers consistent gains on both single-round and persistent multi-round evaluations. Additional experiments demonstrate that the approach remains effective across different agent scaffolds, additional benchmarks, and an alternative teacher model.

Weaknesses
  1. The experiments do not sufficiently disentangle the benefits of the proposed interaction structure from those of increased training volume. This issue affects both the main results and ablations on breadth/depth expansion and related components, making it difficult to isolate the contribution of the method itself. In addition, all experiments are conducted on a single model at a single scale, Qwen3.5-27B, which limits the evidence that the resulting data generalizes across different model families or capacities.

  2. Benchmark independence is not documented clearly enough for the multi-round and transfer evaluations. Section 3.3 states that demonstrations are decontaminated against the evaluation benchmarks, but Appendix A explicitly describes only a 13-gram check against Terminal-Bench and the exclusion of Terminal-Bench-derived sources. Appendix C.1 further discusses removing SWE-bench Verified repositories, but this does not establish whether similar screening was performed for EvoCode-Bench v2, SWE-bench Pro, or SWE-bench Multilingual.

Questions for the authors

For Tables 6 and 7, what are the total training tokens and optimizer updates for each variant? Do you have a control that spends the added budget on Single-WS supervision, matching training tokens and updates, and does the breadth/depth advantage remain?

3 comments
Authors · CommentOpenReview ↗

Authors' Response

Thank you for the positive remarks and constructive suggestions regarding the experimental controls, model generalization, and benchmark decontamination of our work. Below, we address each concern in detail.

W1 (Part 1) & Q: Disentangling Interaction Structure from Training Volume.

For Tables 6 and 7, what are the total training tokens and optimizer updates for each variant? Do you have a control that spends the added budget on Single-WS supervision, matching training tokens and updates, and does the breadth/depth advantage remain?

(1) Training tokens and optimizer updates in Tables 6 and 7.

Table Variant Records Tokens per epoch Updates
6 Single-WS 25,386 0.84B 198
6 Cross-WS 3,512 0.18B 28
6 Single-WS + Cross-WS 28,898 1.02B 226
7 Single-WS 25,386 0.84B 198
7 Single-WS + Multi-Round 28,465 1.22B 222
7 Single-WS + Multi-Round (w/o round verifier) 28,465 1.46B 222

(2) Token- and update-matched SFT control (Qwen3.5-27B, DeepSeek-V4.1-Flash teacher). At a matched budget of about 107M tokens per epoch, replacing half of the Single-WS tokens with Cross-WS data improves TB2.1 by 1.9 points, and replacing half with Multi-Round data improves TB2.1 by 1.1 points and EvoCode by 4.1 points.

Training data Records Tokens TB2.1 Pass@1 EvoCode Case
Qwen3.5-27B - - 47.8 68.1
Single-WS only 4,754 107.1M 53.7 72.1
Single-WS + Cross-WS (50/50 by tokens) 3,187 106.8M 55.6 (+1.9) 72.4 (+0.3)
Single-WS + Multi-Round (50/50 by tokens) 2,584 106.6M 54.8 (+1.1) 76.2 (+4.1)

W1 (Part 2): Generalization to an Additional Base Model.

In addition, all experiments are conducted on a single model at a single scale, Qwen3.5-27B, which limits the evidence that the resulting data generalizes across different model families or capacities.

We additionally evaluate generalization on Qwen3.6-27B: fine-tuning on the same Terminal Universe (Full Mixture) data improves TB2.1 by 6.2 points (51.7 to 57.9) and EvoCode Case Score by 3.0 points (82.9 to 85.9). We will include these cross-base results in the revised paper.

Base model Setting Tokens per epoch TB2.1 Pass@1 EvoCode Case Score
Qwen3.6-27B Base - 51.7 82.9
Qwen3.6-27B Terminal Universe (Full Mixture) 106.7M 57.9 (+6.2) 85.9 (+3.0)

W2: Benchmark Independence Across All Four Benchmarks.

Benchmark independence is not documented clearly enough for the multi-round and transfer evaluations. Section 3.3 states that demonstrations are decontaminated against the evaluation benchmarks, but Appendix A explicitly describes only a 13-gram check against Terminal-Bench and the exclusion of Terminal-Bench-derived sources. Appendix C.1 further discusses removing SWE-bench Verified repositories, but this does not establish whether similar screening was performed for EvoCode-Bench v2, SWE-bench Pro, or SWE-bench Multilingual.

Models evaluated on EvoCode-Bench v2, SWE-bench Pro, and SWE-bench Multilingual are trained on the terminal pool, and our further audit across text (13-gram), query (TF-IDF cosine similarity at most 0.17), and repository levels confirms zero leakage. Thank you for pointing this out; we will improve the documentation for decontamination.


We appreciate your constructive feedback, which has helped us strengthen the experimental controls and decontamination documentation of the paper. We hope the clarifications and additional results above address your concerns, and we welcome any further questions.

Best regards,

Authors of Submission 970

Reviewer wrBb · CommentOpenReview ↗

Thanks for the responses! They address most of my concerns. I will keep my already positive score.

Authors · CommentOpenReview ↗

Thank you for your time and constructive suggestions! we will improve documentation and include the additional experiments.

Best regards,

Authors of Submission

Reviewer d4V8OpenReview ↗
Rating
3/4(+1)
Confidence
4/4
Soundness
3/3
Presentation
3/3
Informativeness
2/3
Read review
Summary

This paper reconstructs executable workspaces from terminal-agent trajectories by replaying observed file operations and using an LLM completion agent to restore missing files and dependencies. It then synthesizes single-workspace, cross-workspace, and multi-round tasks, filters them with agent-authored verifiers, and obtains gains on Terminal-Bench, EvoCode-Bench, and cross-domain SWE-bench evaluations.

Strengths
  • Reinterpreting existing trajectories as reusable environments avoids constructing every workspace from scratch and offers a scalable data-generation perspective.
  • The pipeline covers single-workspace, cross-workspace, and multi-round expansion axes, with ablations for completion, cross-workspace synthesis, and round-level verification.
  • The method improves multiple terminal and software-engineering evaluations and includes transfer experiments across teachers, scaffolds, and domains.
Weaknesses
  • Task, completion, solution, and verifier generation largely use the same strong-model family.
  • Completion expands workspaces from an average of 2.9 to 22.4 files, but the paper provides little item-level fidelity evaluation against original repositories or containers, leaving hallucinated context and task-distribution drift difficult to rule out.
  • A lot of the baseline data trained on the same base model as Terminal-Universe-27B is missing a lot of evaluation.
Questions for the authors
  • Can an independent verifier model or hidden human-authored tests measure false-positive rates and the correlation between generator-passing and true functional correctness?
  • On trajectories with an available original repository or container, can the authors evaluate file, dependency, test, and behavior recovery accuracy and separately quantify replay versus completion? It's better if the authors could also provide some analysis on hallucination rates for downstream tasks.
  • Could the authors rerun the baseline on Qwen3.5-27B or Qwen3.6-27B as the base model?

I will improve my score if all my concerns are addressed.

4 comments
Authors · CommentOpenReview ↗

Authors' Response (Part 1)

We thank the reviewer for the careful and constructive feedback. We also appreciate your positive remarks on our trajectory-to-environment perspective, our single-workspace, cross-workspace, and multi-round expansion axes, and our cross-domain and cross-scaffold evaluations.

We address each concern in detail and present the clarifications and supplemental experiments. To keep API cost down, the following results use DeepSeek-V4.1-Flash as the teacher on Qwen3.5-27B.

W1 & Q1: Independent Verifiers, False-Positive Rates, and Correlation with Correctness.

Task, completion, solution, and verifier generation largely use the same strong-model family. Can an independent verifier model or hidden human-authored tests measure false-positive rates and the correlation between generator-passing and true functional correctness?

On the Terminal-Bench 2.1 tasks, verifier quality improves with model capability: stronger verifiers achieve low false-positive rates against human tests and high pairwise agreement across model families.

(1) False-positive rate against human-authored hidden tests (89 TB2.1 tasks). Each model family independently constructs a pytest verifier from the task specification and initial workspace without access to the official tests or candidate solutions. Verifier quality improves with model capability: the lighter DeepSeek-V4.1-Flash verifier shows a higher false-positive rate, whereas stronger models (gpt-6.1-sol, claude-sonnet-5-5, and hy4) achieve much lower false-positive rates against human-written tests.

Verifier False-positive rate
DeepSeek-V4.1-Flash 14.6%
gpt-6.1-sol 4.5%
claude-sonnet-5-5 4.5%
hy4 5.6%
Majority vote (three stronger verifiers) 3.4%

(2) Pairwise agreement across verifier model families on Terminal-Bench 2.1 tasks. Verifiers constructed by different model families show high pairwise consistency, especially among the three stronger families, indicating that verification decisions reflect task requirements rather than family-specific preferences.

Verifier pair Pairwise agreement
gpt-6.1-sol / hy4 94.4%
gpt-6.1-sol / claude-sonnet-5-5 92.1%
claude-sonnet-5-5 / hy4 91.0%
DeepSeek-V4.1-Flash / hy4 85.4%
DeepSeek-V4.1-Flash / gpt-6.1-sol 84.3%
DeepSeek-V4.1-Flash / claude-sonnet-5-5 83.1%
Authors · CommentOpenReview ↗

Authors' Response (Part 2)

W2 & Q2: Recovery Fidelity (Replay vs. Completion) and Downstream Hallucination.

On trajectories with an available original repository or container, can the authors evaluate file, dependency, test, and behavior recovery accuracy and separately quantify replay versus completion? It's better if the authors could also provide some analysis on hallucination rates for downstream tasks.

Replay anchors the workspace with files observed in the trajectory, while completion fills in missing modules, manifests, and test runners to make the environment executable, improving recovery across all four layers and reducing downstream tool-call hallucinations on Terminal-Bench 2.1 to 0.98 per 100 calls.

(1) Recovery accuracy across file, dependency, test, and behavior layers (evaluated on 300 LFM2-Terminal / LiteCoder-Terminal trajectories with available original containers and 111 SWE-rebench trajectories compared against base_commit).

Layer Metric definition Replay only Replay + Completion
File Recall of task-relevant original files at the same path 51.8% 93.0%
Dependency Share of required runtime dependencies resolved in the workspace 66.4% 88.7%
Test Recall of original test files at the same path 53.8% 84.6%
Behavior Agreement of original test verdicts with the original environment 70.4% 85.2%

(2) Downstream hallucination analysis on Terminal-Bench 2.1. File paths in terminal tasks are largely fixed by the code itself (imports, test entry points, build scripts). A workspace synthesized from the task text alone (w/o replay) can only produce a guessed layout, so many referenced locations do not exist and the teacher has to probe candidate paths; these probes stay in the demonstrations and are reproduced by the student, raising hallucinated file paths from 1.82% to 2.15%. Replay + Completion restores the paths the trajectory actually touched and completes the missing manifests and entry points, so solving proceeds on paths and commands that exist, and hallucinated file paths and the total hallucination rate fall to 0.64% and 0.98 per 100 tool calls.

Downstream evaluation on Terminal-Bench 2.1 Hallucinated file paths Total hallucination rate (per 100 tool calls)
Qwen3.5-27B 1.82% 2.76
Trained on Task-driven environments (w/o replay) 2.15% 3.27
Trained on Replay + Completion 0.64% 0.98

W3 & Q3: Baseline Evaluation on Qwen3.5-27B and Qwen3.6-27B Base Models.

Could the authors rerun the baseline on Qwen3.5-27B or Qwen3.6-27B as the base model?

Across both Qwen3.5-27B and Qwen3.6-27B, Terminal Universe (Full Mixture) yields consistent gains over the base checkpoints and outperforms public terminal SFT corpora under an identical training token budget (~106.7M tokens per epoch, 2 epochs, DeepSeek-V4.1-Flash teacher, evaluated under Claude Code). Public corpora score below the base models, consistent with recent findings that existing terminal SFT mixtures can degrade post-trained Qwen3.5 models and often suffer from weak or leaky verifiers [1]. We will include the audit and cross-base results above in the revised paper.

Training corpus Qwen3.5-27B TB2.1 Qwen3.5-27B EvoCode Qwen3.6-27B TB2.1 Qwen3.6-27B EvoCode
Base model 47.8 68.1 51.7 82.9
AgentTrove 35.4 60.4 38.8 74.5
OpenThoughts 34.6 59.2 39.6 73.8
LiteCoder 24.7 46.5 33.1 63.2
Terminal Universe (Full Mixture) 56.2 (+8.4) 75.7 (+7.6) 57.9 (+6.2) 85.9 (+3.0)

References

[1] H. Ivison, et al. "TMax: A Simple Recipe for Terminal Agents." arXiv:2606.23321, 2026.


We appreciate your thoughtful feedback, which has helped us clarify the verifier calibration, environment fidelity, and baseline comparisons of our work. We hope the revisions and additional experiments above address your concerns, and we welcome any further questions.

Best regards,

Authors of Submission 970

Reviewer d4V8 · CommentOpenReview ↗

Thank you to the authors for the detailed response. All my concerns have been addressed.

At the same time, I hope the additional content provided above will be included in the final version of the paper. I will raise my score from 2 to 3.

Authors · CommentOpenReview ↗

Thanks for your recognition, constructive suggestions, and the raises. We will include the additional experiments and clarifications into the final version.

Sincerely.

Reviewer DvakOpenReview ↗
Rating
3/4
Confidence
3/4
Soundness
2/3
Presentation
3/3
Informativeness
2/3
Read review
Summary

Terminal-Universe reconstructs workspaces from recorded agent trajectories and generates new terminal tasks across workspaces and multiple rounds. Training Qwen3.5-27B on approximately 32k demonstrations raises reported Terminal-Bench 2.1 scores from 46.2 to 58.1 and EvoCode-Bench v2 MT@4 from 6.3 to 20.1.

Strengths
  1. The verifier is written before a solution is generated. Tests for missing functionality must fail initially, while preservation checks must pass (Appendix D.5).
  2. The gains over the base model use the same evaluation settings and extend to SWE benchmarks and another teacher (Table 2; Appendix A; Tables 11–12).
Weaknesses
  1. I cannot tell how much replay contributes to the result. Table 3 changes the teacher when regenerating demonstrations, while Table 4 tests completion on top of replay. Neither compares replay-derived context with environments generated from the task alone using the same teacher. This leaves a gap between the proposed reconstruction mechanism and the evidence for its necessity.
  2. The breadth/depth experiments add more and longer demonstrations (Tables 6–7, 13). They therefore do not distinguish the benefit of cross-workspace or multi-round structure from simply training on more data. Table 8 matches record counts, but not reported training tokens.
Questions for the authors
  1. What evidence shows that replay-derived context is important beyond what the same teacher could generate from the task alone?
  2. Do cross-workspace and multi-round tasks help more than additional Single-WS training at the same token budget?
1 comment
Authors · CommentOpenReview ↗

Authors' Response

We appreciate your careful and constructive feedback. We are also grateful for the positive assessment of our verifier design and our controlled evaluations across SWE benchmarks and alternative teachers. Below, we address each concern in detail and describe the corresponding revisions and supplementary experiments.

W1 & Q1: Contribution of Replay-Derived Context vs. Task-Driven Generation.

What evidence shows that replay-derived context is important beyond what the same teacher could generate from the task alone?

With the task, teacher, and completion prompt held fixed, training on replay-grounded environments improves over task-driven synthesis by 4.8 points on TB2.1 and 4.6 points on EvoCode. To keep API cost down, the following results use DeepSeek-V4.1-Flash as the teacher on Qwen3.5-27B. Task-driven (w/o replay) builds the workspace from an empty directory given the task text; Replay + Completion starts from the replayed workspace.

Training data Tokens TB2.1 Pass@1 EvoCode Case Score
Qwen3.5-27B - 47.8 68.1
Task-driven (w/o replay) 90.6M 46.9 66.3
Replay + Completion 90.9M 51.7 70.9

Besides, recent benchmarks show that current models still struggle to build complete workspaces from scratch [1, 2]. Replay anchors the workspace with files observed in the trajectory, turning whole-repository synthesis into localized gap-filling. We will include this controlled comparison in the revised paper.

W2 & Q2: Structure vs. Data Volume at Matched Token Budget, and Table 8 Tokens.

Do cross-workspace and multi-round tasks help more than additional Single-WS training at the same token budget?

At a matched budget of about 107M tokens, replacing half of the Single-WS tokens with Cross-WS data improves TB2.1 by 1.9 points, and replacing half with Multi-Round data improves TB2.1 by 1.1 points and EvoCode by 4.1 points, using 33% and 46% fewer records.

(1) Token-matched SFT ablation. Cross-WS raises TB2.1 (+1.9) while Multi-Round raises EvoCode (+4.1).

Training data Records Tokens TB2.1 Pass@1 EvoCode Case
Qwen3.5-27B - - 47.8 68.1
Single-WS only 4,754 107.1M 53.7 72.1
Single-WS + Cross-WS (50/50 by tokens) 3,187 106.8M 55.6 (+1.9) 72.4 (+0.3)
Single-WS + Multi-Round (50/50 by tokens) 2,584 106.6M 54.8 (+1.1) 76.2 (+4.1)

(2) Table 8 tokens.

Table 8 variant Records Tokens
Base pool 17,558 0.58B
Environment expansion 35,116 1.21B
Query expansion 35,116 1.15B
Solution expansion 35,116 1.17B

We will include these token statistics and controlled experiments in the revised paper.

References

[1] A. Eliseeva, et al. "EnvBench: A Benchmark for Automated Environment Setup." DL4C Workshop at ICLR 2025.

[2] J. Yang, et al. "ProgramBench: Can Language Models Rebuild Programs From Scratch?" arXiv:2605.03546, 2026.


We appreciate the reviewer's thoughtful feedback, which has helped us strengthen the empirical support of our work. We hope the revisions and additional experiments above address your concerns, and we welcome any further questions.

Best regards,

Authors of Submission 970

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…

This paper is under review