acceptodds
Under review as a conference paper at ICLR 2027

Terminal-Universe: Turning Agent Trajectories into Scalable Terminal Environments

45 views

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.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Code Agent, Terminal Agent

Reviews

Among:
Shape:
1234this paper, Top 15%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.00 over 3 reviews, above 85% of the others.
Reviewer_wrBbOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper 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.

Critical 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.

Critical 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 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
AuthorsOpenReview ↗

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.

TableVariantRecordsTokens per epochUpdates
6Single-WS25,3860.84B198
6Cross-WS3,5120.18B28
6Single-WS + Cross-WS28,8981.02B226
7Single-WS25,3860.84B198
7Single-WS + Multi-Round28,4651.22B222
7Single-WS + Multi-Round (w/o round verifier)28,4651.46B222

(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 dataRecordsTokensTB2.1 Pass@1EvoCode Case
Qwen3.5-27B--47.868.1
Single-WS only4,754107.1M53.772.1
Single-WS + Cross-WS (50/50 by tokens)3,187106.8M55.6 (+1.9)72.4 (+0.3)
Single-WS + Multi-Round (50/50 by tokens)2,584106.6M54.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 modelSettingTokens per epochTB2.1 Pass@1EvoCode Case Score
Qwen3.6-27BBase-51.782.9
Qwen3.6-27BTerminal Universe (Full Mixture)106.7M57.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

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

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(+1)
Confidence
4
Informativeness
2
Presentation
3
Soundness
3
Read review
Paper 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.

Critical 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.
Critical 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 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
AuthorsOpenReview ↗

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.

VerifierFalse-positive rate
DeepSeek-V4.1-Flash14.6%
gpt-6.1-sol4.5%
claude-sonnet-5-54.5%
hy45.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 pairPairwise agreement
gpt-6.1-sol / hy494.4%
gpt-6.1-sol / claude-sonnet-5-592.1%
claude-sonnet-5-5 / hy491.0%
DeepSeek-V4.1-Flash / hy485.4%
DeepSeek-V4.1-Flash / gpt-6.1-sol84.3%
DeepSeek-V4.1-Flash / claude-sonnet-5-583.1%
AuthorsOpenReview ↗

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).

LayerMetric definitionReplay onlyReplay + Completion
FileRecall of task-relevant original files at the same path51.8%93.0%
DependencyShare of required runtime dependencies resolved in the workspace66.4%88.7%
TestRecall of original test files at the same path53.8%84.6%
BehaviorAgreement of original test verdicts with the original environment70.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.1Hallucinated file pathsTotal hallucination rate (per 100 tool calls)
Qwen3.5-27B1.82%2.76
Trained on Task-driven environments (w/o replay)2.15%3.27
Trained on Replay + Completion0.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 corpusQwen3.5-27B TB2.1Qwen3.5-27B EvoCodeQwen3.6-27B TB2.1Qwen3.6-27B EvoCode
Base model47.868.151.782.9
AgentTrove35.460.438.874.5
OpenThoughts34.659.239.673.8
LiteCoder24.746.533.163.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

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.

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
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper 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.

Critical 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).
Critical 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 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
AuthorsOpenReview ↗

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 dataTokensTB2.1 Pass@1EvoCode Case Score
Qwen3.5-27B-47.868.1
Task-driven (w/o replay)90.6M46.966.3
Replay + Completion90.9M51.770.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 dataRecordsTokensTB2.1 Pass@1EvoCode Case
Qwen3.5-27B--47.868.1
Single-WS only4,754107.1M53.772.1
Single-WS + Cross-WS (50/50 by tokens)3,187106.8M55.6 (+1.9)72.4 (+0.3)
Single-WS + Multi-Round (50/50 by tokens)2,584106.6M54.8 (+1.1)76.2 (+4.1)

(2) Table 8 tokens.

Table 8 variantRecordsTokens
Base pool17,5580.58B
Environment expansion35,1161.21B
Query expansion35,1161.15B
Solution expansion35,1161.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.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.