AutoEnvScaling: Automating the Data Flywheel with Terminal AgentsAutoEnvScaling: Automating the Data Flywheel with Terminal Agents
Qwen3.6-35B-A3B serves both roles and self-trains with AutoEnvScaling, with TB2.1 rising from 41.1 to 53.3.
- Reinforcement learning for terminal agents needs diverse, verifiable environments, but these are still mostly designed by researchers, supply grows only with human effort, and they become obsolete once learned.
- AutoEnvScaling turns environment creation into a terminal task. The proposer writes and tests Harbor environments in a sandbox based on solver trajectories, validates and calibrates them before adding to the library, and new trajectories drive the next round; the same model can also serve both roles.
- Across eight frontier proposers, terminal-style generation achieves the highest effective environment rates. When GPT-5.6-sol creates environments, Qwen3.5-35B-A3B's TB2.1 is 4.3 points above matched Tmax. Qwen3.6-35B-A3B serves both roles, and TB2.1 goes from 41.1 to 53.3.
- The authors state that whether gains persist over longer training has not been established, TB4.0 remains low, and passing validation does not guarantee environment correctness. Cross-domain experiments go up to generation and admission, and downstream training gains in these domains have not been shown, according to the authors.
- Evaluated models
- Qwen3.5-9BQwen3.5-35B-A3BQwen3.6-35B-A3BGPT-5.6-solClaude Opus 5GPT-6-astraGPT-5.6-terraGPT-5.6-lunaGemini-3.8-FlashDeepSeek-V4-FlashGrok 4.6
- Benchmarks
- Terminal-Bench 2.1Terminal-Bench 4.0HiL-Bench
- Metrics
- valid-environment ratecost per valid environmentavg@5Ask-F1task successask rate
The paper proposes AutoEnvScaling, which treats RL environment design as a terminal task, where a proposer agent generates new environments based on the rollouts of the solver being trained, and the solver's new rollouts then drive the next round. The authors report that compared to prompt-only generation, the effective environment rate improves by up to 25 times, and the cost per effective environment decreases by up to 75%. Training Qwen3.5-35B-A3B with AutoEnvScaling environments generated by GPT-5.6-sol yields a Terminal-Bench 2.1 score 4.3 points higher than the matched Tmax baseline; when Qwen3.6-35B-A3B serves as both proposer and solver, Terminal-Bench 2.1 improves by 12.2 points, and Terminal-Bench 4.0 rises from 1.6 to 3.2.
Paper analysis
What problem does this paper attempt to solve?
RL training of terminal agents lacks verifiable environments that update with the solver.
Reinforcement learning for terminal agents lacks verifiable environments that update as the solver improves.
- Scenario: The authors state that such agents execute commands in a command line, covering software engineering, scientific research, data analysis, and cybersecurity; reinforcement learning is a primary way to improve them. High-quality environments are scarce, lose value once the learned content is mastered, and researchers must re-diagnose gaps. The authors also state that some companies are reportedly considering spending over 1 billion dollars annually on RL environments.
- Existing shortcomings: Environment pools synthesized by pipelines are fixed before training and do not change as agents become stronger; feedback-based methods still have human-specified rules for how to use feedback. The authors state that AutoData creates QA data from solver outputs and EnvHarness only modifies existing environments, neither creating new ones; self-play proposers still follow fixed generation pipelines.
- Authors' boundary: Previous methods pre-specify how environments are generated. This paper instead lets the agent follow the researcher's process: read trajectories, decide what to build, build and test complete environments in the terminal, and improve the harness or weights across rounds.
- Proposed: AutoEnvScaling treats environment design as a terminal task. The proposer uses solver trajectories to build Harbor environments, validates and calibrates them against the current solver before adding to the library, and new trajectories drive the next round. The authors state that the same model can serve as both proposer and solver, as a step toward recursive self-improvement (RSI).
What related research exists?
The authors position this paper between environment generation, self-play, and recursive self-improvement.
According to Section 2, related work is divided into environment generation, adaptive curricula and self-play, and recursive self-improvement.
Environment Generation
- Pipelines and feedback: Endless Terminals, TermiGen, Tmax generate executable terminal tasks; SETA adds container, oracle, and no-op checks. RST and Environment Evolution expand verified tasks, T1 trains on a fixed synthetic pool. The authors state that these pools are mostly fixed before training, and how feedback is used remains hand-designed.
- Reconstruction from existing traces: SWE-Universe and Terminal-Universe reconstruct environments from repository changes or execution history. RLVE uses a human generator; Agent World Model, ScaleEnv, InfiniteWeb synthesize tool or browser environments.
- Concurrent calibration: The authors mention work that calibrates tasks against a pool of solvers, or modifies seed tasks to target pass rates, but the generator itself does not learn from its own results.
Adaptive Curricula and Self-Play
- Modifying data or wrappers: Curriculum learning and unsupervised environment design adjust tasks to the learner. AutoData uses solver outputs to revise data and generate prompts; EnvHarness edits environment wrappers while preserving verifiers.
- Self-play: Self-Challenging agents simultaneously write tasks, verifiers, solutions, and failure cases for filtering; SSR lets the same agent inject and fix defects in a sandbox repository. SPADE uses a shared model to design and solve Gym-style environments, with the designer reward based on hint-based regret.
- Authors' distinction: The authors state that these proposers still mostly generate questions through fixed pipelines; this paper additionally retains tools, skills, and memory across rounds, allowing proposers that cannot update weights to improve.
Recursive Self-Improvement
- The authors define RSI as a system that helps build a stronger successor, then improves the next generation. Existing work improves scaffolding and harnesses, training algorithms and infrastructure, inference systems and GPU kernels, chip design, and ML research itself.
- The authors state that this paper improves training data: letting the model design better environments for its own training.
Baselines and Benchmarks
- Baselines for generation experiments are Prompt (no execution during generation, which the authors use to represent pipeline synthesis) and Prompt + Env Feedback (returning build and validation logs for revision, which the authors state follows RST and Environment Evolution). The RL control is a static pool regenerated with the same proposer following the Tmax recipe.
- Solver evaluation uses held-out Terminal-Bench 2.1 and Terminal-Bench 4.0; clarification behavior uses HiL-Bench.
The authors' positioning is: putting the proposer in the training loop, building and calibrating new environments against the current solver, so the training pool evolves with the solver; both roles are terminal tasks, so the same policy can serve both.
How does the paper address this problem?
The proposer builds a Harbor environment in the sandbox, and only after calibration passes is it used for the solver's RL.
AutoEnvScaling turns environment creation into a terminal task: the proposer reads trajectories in the sandbox, writes the environment, and self-tests; after validation and calibration pass, the solver does RL with the verifier reward, and new trajectories enter the next round (Figure 2, Figure 3).
Trajectories and Rewards
- Both roles act through the terminal: given a prompt and a container, the policy issues commands or tool calls and reads output. They differ only in prompt, container, and scoring.
- The solver sees only the task description and works inside that environment's container; the reference solution and tests are hidden from it. The reward is the proportion of tests passed:
rS(τS)=1/N∑i=1N𝟙[test i passes] Partial solutions receive partial reward.
- The proposer starts from an assignment, and the trajectory ends with a new environment. Validation failure is -1, validation pass but calibration failure is -0.25, and both pass is 1. The authors state this separates bad environments from those that run but are unsuitable for the current solver.
Making Environment Design a Terminal Task
- Each round produces one Harbor task: instructions, execution environment, reference solution, tests. The sandbox contains a workspace, sub-containers for building and testing, and restricted web access. The authors call the sandbox plus skills, tools, and memory the harness.
- The workspace has historical trajectories and verifier outputs, generated environments, instructions for writing Harbor tasks, and memory and tools retained across rounds. The proposer can modify memory and tools, but not the instructions or the admission checks outside the sandbox. The exit rules block Terminal-Bench and other benchmark pages.
- The assignment specifies one parent environment from the training pool and gives the solver's pass rate and most common failures. Persistent failures lead to simpler variants; already-correct cases get longer-horizon or additional skills.
- The proposer decides what to build and when to finish, and follows Harbor's create-task skill; it can build images, run the reference solution and tests in sub-containers, and use the current solver to estimate difficulty. Appendices D and E give the full workspace, resources, and skills. The proposer time limit is 2 hours per round; the solver sandbox is 4 CPUs, 8 GiB.
Validation and Calibration
- Validation: the host builds the environment; the reference solution should get full marks, and the empty solution should get less than half. Instructions sharing a 13-gram with held-out tasks are flagged as contamination, which the authors state follows Tmax. Appendix F.2 states this check only measures text overlap and cannot rule out rewritten copying.
- The authors state the above checks do not catch errors shared by the reference solution and tests, nor reward shortcuts. For this, harbor check is run, where the proposer's own model reviews the task against the official Terminal-Bench rubric; the appendix states that binary_reward, which requires rewards to be exactly 0 or 1, is not used because tests give partial credit.
- Calibration: the current solver tries multiple times, and the environment is kept only if the average reward is between 0.25 and 0.75 with variation across attempts. Appendix G.4: reward standard deviation at least 0.1; first 4 attempts, expanded to 8 if the mean is within 0.15 of a boundary; below the lower band, one diagnostic trajectory with a reference-solution hint may be added; each assignment allows at most two revisions. Failures are returned to the proposer.
Training and Cross-Round Updates
- At refresh time, the host reruns the training pool with the updated solver, removes environments outside the calibration band, and asks the proposer for replacements based on the latest trajectories.
- Closed-source proposers only change the harness: following Continual Harness, memory, skills, and tools are updated using past rewards and logs. The authors give examples: combining several validation steps into a faster script, and storing useful GitHub tasks and Docker Hub images as a web-cache skill. Validation and calibration checks remain fixed.
- When open-source, the same policy serves both roles, using DPPO with advantages centralized separately by role: the solver within multiple attempts on the same environment, the proposer within the proposer group. Groups with no reward change are discarded, which the authors state follows DAPO. The solver trains every step; every k solver steps, the proposer generates new environments and trains on the resulting trajectories. Appendix G: k=16, learning rate 1e-6, solver batch of 16 environments times 16 trajectories, proposer group of 128 trajectories, active pool of 256 tasks, review every 16 steps, DPPO total variation threshold 0.1, KL and entropy coefficients both 0.
What experiments did the paper conduct?
The authors state that the self-made curriculum outperforms matched Tmax; when serving both roles, TB2.1 goes from 41.1 to 53.3.
Experimental Setup
- Models: Eight proposers were evaluated for effective environment rate: Claude Opus 5, GPT-6-astra, GPT-5.6-sol, GPT-5.6-terra, Gemini-3.8-Flash, GPT-5.6-luna, DeepSeek-V4-Flash, Grok 4.6. The solvers trained were Qwen3.5-9B, Qwen3.5-35B-A3B, and Qwen3.6-35B-A3B. The HiL-Bench baseline also reports the first two Qwen models as well as GPT-5.6-sol and Claude Opus 5.
- Data: Terminal-Bench 2.1 was held out; the main metric is avg@5; the RSI experiments additionally report Terminal-Bench 4.0 scores. The appendix cold-start comparison states the solver side as 89 problems with 5 attempts each; the main text does not separately give the number of TB 2.1 problems. HiL-Bench has full instructions, incomplete instructions with ask_human, and incomplete instructions without that tool; training and evaluation use software engineering tasks disjoint from the official training set.
- Comparisons: Prompt; Prompt + Env Feedback; a static pool regenerated by the same proposer under the Tmax recipe. In Section 4.2, frontier proposer weights are fixed and only the harness is updated.
- Judging: In Section 4.1, an effective environment is one that builds, whose reference solution passes, and whose empty solution fails. Cost is in dollars per effective environment. The solver reward is the proportion of tests passed. HiL-Bench reports task success rate, Ask-F1, and question rate.
- Protocol: Group size 16, 16 prompts per batch, maximum sequence length 128k. Comparisons are aligned by solver update step, not by total compute or wall-clock time. All TB results use Pi, with a sandbox of 4 CPUs and 8 GiB. The authors state that the higher absolute scores on the model card use Terminus-2, a 3-hour timeout, and a larger sandbox, with the gap mainly due to the harness; all methods in the paper use the same setup.
- Intervals: Table 2 gives 95% intervals. The ± in Table 3 is called a confidence interval by the authors, with the algorithm unspecified. The paper does not report the number of independent repetitions for the main experiments.
Main Results
The table below shows avg@5 on held-out Terminal-Bench 2.1. The first four rows are from Table 3, aligned with the training steps of the corresponding Tmax; the last row is from Figure 1 and Section 4.3, starting from Cold-Start, without ±. Baseline scores do not change with the proposer and are listed only once in Table 3.
Swipe horizontally to read the table
Solver Start Tmax AutoEnvScaling Proposer Qwen3.5-9B 19.1±2.3 27.2±1.4 33.5±1.9 GPT-5.6-sol Qwen3.5-9B 19.1±2.3 29.2±2.1 36.6±1.7 Claude Opus 5 Qwen3.5-35B-A3B 26.7±2.2 34.6±1.9 38.9±2.4 GPT-5.6-sol Qwen3.5-35B-A3B 26.7±2.2 35.5±1.6 39.3±1.6 Claude Opus 5 Qwen3.6-35B-A3B 41.1 47.2 53.3 The model itself - The authors state that AES is higher than matched Tmax under both frontier proposers. Differences stated in the text: 6.3 and 7.4 points for Qwen3.5-9B, and 4.3 and 3.8 points for Qwen3.5-35B-A3B.
- After removing historical trajectories, the authors state that Qwen3.5-35B-A3B drops 3.6 points with GPT-5.6-sol, still 0.7 points above Tmax; with Claude Opus 5 it drops 6.7 points, 2.9 points below Tmax. Table 3 corresponds to 35.3±2.3 and 32.6±1.7. The authors believe solver feedback helps the curriculum.
- Qwen3.6-35B-A3B's TB 2.1 goes from 41.1 to 53.3, which the authors state is 6.1 points above Tmax. TB 4.0 rises 1.6 points from 1.6 to 3.2, with Tmax at 1.4; the authors state the curriculum was not designed for TB 4.0.
Environment Generation Quality
- In Table 2, the eight models' AES effective environment rates are all the highest. DeepSeek-V4-Flash goes from 3.5% with Prompt to 89.0%; the authors state this is up to 25×. The eight-model mean in Figure 1: Prompt 39%, with feedback 57%, AES 86%.
- Unit cost decreases for six models, with the authors stating up to 75% reduction relative to Prompt (DeepSeek-V4-Flash from 0.08 to 0.02 dollars). Claude Opus 5 goes from 0.72 to 1.18 (table note 1.6×), GPT-6-astra from 1.79 to 2.75 (1.5×).
- Figure 5: AES averages 20.4 data files, 47.2 solver rounds, 51.0% pass rate; with feedback these are 3.5, 33.8, 61.0%. The figure labels 5.8×, 1.4×, 1.3× harder. The paper does not state the solver model for that figure. The authors state that the GPT-5.6 family on the right side of Figure 4 maintains AES at 84%–92%; Table 2 gives sol 86.3%, terra 92.5%, luna 83.5%.
Self-Improvement Dynamics and Clarification Behavior
- Base effective environment rate is 32.3%. After cold start on 600 trajectories from Claude Opus 5, DeepSeek-V4-Flash, and Kimi-K3, it is 86.8%. Without proposer training, it drops to 22.4% at step 160 and training collapses; with training, it is 79.6% at step 64, above 88% from step 80, and ends at 94.7% (Appendix G.2, Figure 20).
- TB 2.1 at the common endpoint of 160 steps: full system 48.9, Tmax 44.9, no proposer training 40.1; the latter is 44.1 at step 96. The full run and Tmax are evaluated to 288 steps; TB 4.0 reaches 3.2 at step 192 and holds through 288. Figure 7: usable group rate is 3.1× higher than Tmax, collection time averages 42% less; both methods keep 16 groups, with statistics over steps 0–162.
- HiL-Bench software engineering with ask_human (Table 5): base success rate 0.0, Ask-F1 0.0, question rate 1.8%. After cold start on 75 trajectories: 1.2%, 10.1%, 71.4%. Official 100-problem RL: 6.8%, 29.6%, 84.2%. AES-generated 500 problems: 33.9%, 55.3%, 89.8%. In Table 4, Claude Opus 5 has a success rate of 7.5% and Ask-F1 of 14.4% when questions are required. The authors state the gain mainly comes from asking better.
Other Ablations and Analyses
- Reference solution self-check (Appendix F, with calibration, not directly comparable to Table 2): when off, Claude Opus 5 is 52.0%, GPT-5.6-sol 19.5%, GPT-5.6-terra 45.2%, GPT-5.6-luna 40.1%, DeepSeek-V4-Flash 19.4%; when on, 94.0%, 84.8%, 93.5%, 85.3%, 73.0%.
- Cold-start paired 60 generated tasks (Table 13): acceptance rate 33.3% vs. 76.7%. TB 2.1 avg@5 is 40.0 vs. 41.1, paired difference 1.1 percentage points, 95% bootstrap interval [-4.9, 7.4], p=0.88; pass@5 is 59.6 vs. 66.3, p=0.15.
- Appendix C: seven domains, three coding agents; 1061 of 1489 evaluable runs were accepted (71.3%). Accepted computer use and professional tasks average 2.32–2.80 rounds, terminal and software engineering 1.30–2.35 rounds. The authors state this does not represent quality under independent review or training utility.
- Figure 8: on the same failure seed, Claude Opus 5 alternates between writing and testing, and checks rewards on four partial solutions; GPT-5.6-sol tests the reference solution and an empty workspace; in that example, Cold-Start Qwen only checks compilation.
What are some points that can be further explored?
The authors state that whether the gains persist after longer training has not been established, and TB4.0 remains low.
Limitations and Future Directions Noted by the Authors
- The experiments demonstrate recursive self-improvement within the evaluated training interval, but do not establish whether these gains continue over longer training (Appendix A.1).
- Performance on Terminal-Bench 4.0 remains low, and long-horizon tasks still have room for improvement (Appendix A.1).
- Passing validation does not guarantee environment correctness: the reference solution and no-op checks cover only a small portion of behavior, and generated tests may still miss incorrect solutions or reject valid ones (Appendix A.1).
- Cross-domain results only show that the pipeline can generate and validate environments; downstream training gains in these domains have not yet been demonstrated (Appendix A.1).
- Future directions include directly connecting the proposer reward to the solver's learning progress, rather than only rewarding environments that fall within the target difficulty band (Appendix A.2).
- The authors also list: joint training on software engineering, computer use, and GPU programming; checking for missing validation and reward hacking using partial solutions, incorrect solutions, and alternative valid solutions; and adopting independent checks and isolated evaluation services, because agents may exploit host infrastructure to extract ground truth answers (Appendix A.2).
Experimental Coverage
- Generation quality comparisons cover eight frontier proposers and three methods, with metrics of effective environment rate and dollar cost per effective environment (Section 4.1, Table 2).
- Solver RL covers Qwen3.5-9B, Qwen3.5-35B-A3B (with proposer GPT-5.6-sol or Claude Opus 5), and Qwen3.6-35B-A3B self-proposing; TB scores come from benchmark tests, and the paper does not report a separate LLM judge model.
- Ablations include removing solver trajectories, removing proposer weight updates, and disabling reference solution self-checking; the HiL-Bench software engineering setting compares the official 100 questions with the generated 500 questions, with RL up to 150 steps.
- Appendix C performs generation and admission in seven domains: terminal, software engineering, tool calling, browser, computer use, GPU kernel, and professional workflows; the authors state that solver training is left for future work.
- The paper does not report the number of independent repetitions for the main TB comparison, the algorithm for confidence intervals in Table 3, or the solver model in Figure 5. The cold-start solver comparison reports 89 questions with 5 runs each (Table 13).
Summarize the main content of the paper
The proposer uses solver trajectories to create Harbor environments itself, and the solver then does RL on those environments.
AutoEnvScaling uses terminal agents to automatically produce reinforcement learning environments for terminal agents, and allows environment design and solving to be the same policy.
- Problem: Verifiable environments still rely heavily on manual design by researchers, with supply growing only with human effort; once an environment is learned, it loses training value, and gaps must be re-diagnosed.
- Approach: The proposer reads solver trajectories in a sandbox, writes and tests complete Harbor tasks. The reference solution must score full marks, the empty solution must score below half, and the current solver's average reward must fall between 0.25 and 0.75 with variance, before the environment is added to the library. The solver receives reward proportional to the fraction of tests passed. Closed-source proposers only modify the harness; when open-source, the same model trains both roles with DPPO.
- Generation: Across eight frontier proposers, AES has the highest effective environment rate. DeepSeek-V4-Flash goes from 3.5% with Prompt to 89.0% (Table 2). The unit effective environment cost decreases for six models, while Claude Opus 5 and GPT-6-astra increase.
- Training: When GPT-5.6-sol proposes, Qwen3.5-35B-A3B scores 38.9±2.4 on Terminal-Bench 2.1, compared to 34.6±1.9 for matched Tmax (Table 3). When Qwen3.6-35B-A3B serves both roles, this score goes from 41.1 to 53.3, and Terminal-Bench 4.0 from 1.6 to 3.2. Removing proposer training drops the effective environment rate to 22.4% and training collapses.
- Authors' conclusion: The authors believe that an evolving curriculum outperforms a fixed environment pool, and environment design can be delegated to the trained agent, reducing reliance on humans and taking a step toward recursive self-improvement. The authors also state that Terminal-Bench 4.0 remains low, and cross-domain experiments have not yet shown downstream training gains.