TL;DR
Teaching AI agents to use tools requires more than static text—it requires executable sandboxes where agents can act, fail, and learn. While we want AI systems to recursively improve themselves by generating new training environments as they get smarter, even top-tier models lose the thread across iterations. EnvOpt fixes this by turning environment generation into a closed-loop system that tracks specific behavioral targets from diagnosis all the way to training outcomes.
What Problem Does This Paper Address?
Data-centric recursive self-improvement (RSI) is the idea that an AI can study its own mistakes, build new training data to fix them, and repeat. For tool-using agents, however, that "data" isn't just a static question-and-answer pair. It is a living, executable environment complete with state, tools, tasks, and outcome verifiers.
The authors found that when you ask even a strong coding agent (Codex powered by GPT-6 Astra) to run this loop autonomously—analyzing a target model, building environments, and training it via online reinforcement learning (RL)—it hits a wall, plateaus early, or even collapses. They pinpoint three recurring failure modes:
- Incomplete analysis: The agent overlooks important patterns in raw execution trajectories, missing the actual reasons the model fails.
- Unfaithful realization: The generated sandbox compiles and runs, but doesn't actually test the intended skill—either because of missing task mechanisms, buggy interaction logic, or misaligned verifiers that reward the wrong behavior.
- Disconnected feedback: The agent can't connect the environments it built to how the model actually trained on them, leading to tasks that are too easy, too hard, or stale.
Methods
EnvOpt addresses these three gaps by organizing environment evolution around traceable training targets through three connected components:
- Traceable Behavioral Map (TBM): Instead of summarizing trajectories into vague, lossy notes, TBM extracts source-grounded mechanism records that link environment rules, task requirements, and failures directly back to the original trajectories. It merges these hierarchically and samples 10% of the records for a quick consistency check, keeping the analysis both compact and accurate.
- Iterative Environment Construction (IEC): Guided by the behavioral map, a data agent plans an environment and delegates coding to an Env Builder subagent. The target model runs probe rollouts in the candidate sandbox, and an independent Reviewer agent inspects the code, tasks, and rollouts. If anything is broken or misaligned, it loops back for revision before entering the training pool.
- Target-Conditioned Context Refinement (TCR): To close the loop across rounds, TCR links each planned training target to its actual online RL rollouts (using GRPO) and public evaluation traces. By comparing expected effects against observed training dynamics, the agent can see whether a task produced useful learning signals or if rewards have saturated.
Datasets
The authors evaluate EnvOpt on three multi-turn tool-use benchmarks:
- $\tau^2$-Bench and BFCL-v4 (multiturn), each using a 1:1 split for public evaluation (guiding evolution) and private evaluation (held-out testing).
- AppWorld, using its train split for public evaluation and its
test-normalsplit for private evaluation.
In a joint-optimization experiment, they also test out-of-distribution (OOD) generalization on ACEBench and API-Bank, which provide no feedback during evolution.
Key Insights and Ideas
- Strong coding agents aren't enough on their own: Despite using GPT-6 Astra, the vanilla autonomous agent (
Codex-Vanilla) actually degraded average test performance below the untrained baseline across all three model sizes. - Adaptive evolution beats static scaling: Training on 3,000 static tasks from existing environment-scaling baselines (
AWMandEnvScaler) yielded little to no average gain. EnvOpt achieved substantial improvements with roughly one-third the budget (960 tasks) because it continuously adapted the data to the evolving model. - Keeping tasks in the "learning zone": Online RL (GRPO) relies on tasks where rollouts yield varying rewards.
Codex-Vanillagenerated learnable tasks only 21.4% of the time (dropping near 0% in later rounds), whereas EnvOpt maintained a 58.5% learnable task rate.
Key Results
Tested across three model sizes—Qwen3-4B-Instruct-2507, Qwen3-8B (with reasoning enabled), and Qwen3-30B-A3B-Instruct—EnvOpt achieved the highest average test performance on every size, improving over the untrained baselines by +16.22, +7.40, and +6.36 percentage points, respectively.
In ablation studies on the 4B model, each of the three components (TBM, TCR, IEC) outperformed Codex-Vanilla on its own, while combining all three yielded the best results by 1.98–6.00 percentage points. Finally, when evolving a single shared training set to optimize all three benchmarks simultaneously, EnvOpt improved average performance by +7.56 pp (4B) and +6.58 pp (8B), and transferred positively to unseen OOD benchmarks (ACEBench and API-Bank).
Limitations and Future Work
EnvOpt operates within a fixed external training-and-evaluation service (GRPO) and relies on public evaluation splits to guide environment evolution, alongside language models to simulate users and review environments. The authors release their code and configurations to support reproducibility and further research into autonomous, data-centric recursive self-improvement.
Summary updated