Papers
arxiv:2611.21152

From Repositories to Training Environments: Scaling Long-Horizon Coding Agents with Environment Evolution Loop

Published on Nov 17
ยท Submitted by
Jian Yang
on Nov 18
ยท IQuestLab IQuest
Authors:
,
,
,
,
,

Abstract

RepoFactory converts real repositories into verifiable coding environments and optimizes them via an Environment Evolution Loop using proxy feedback, enabling trained coding agents to achieve strong gains on long-horizon coding and agentic benchmarks.

Training coding agents for long-horizon tasks requires environments with verifiable feedback. Existing pipelines often follow a linear process that ends with validation, establishing usability but providing little guidance on improving training value. Recursive self-improvement (RSI) often requires model rollouts or model training followed by downstream evaluation, with costs and feedback delays amplified on long-horizon tasks. How can we use timely, reliable proxy signals to improve training value and synthesize environments at scale? We present RepoFactory, an automated pipeline that converts real repositories into verifiable environments where agents build complete projects from scratch given a language specification. Its Environment Evolution Loop optimizes a multiplicative objective combining validity, structural coupling, and implementation scope through proxy feedback. RepoFactory produces 10,159 environments across 17 software domains. Training Qwen3.5-35B-A3B on these environments yields RepoHorizen-35B-A3B, which achieves gains of 22.6 percentage points on NL2Repo-Bench and 8.5 points on average across five benchmarks covering long-horizon coding and agentic tasks in real-world production settings, compared with 17.5 and 6.4 points without environment evolution. These results highlight the training value of RepoFactory environments and the additional gains from the Environment Evolution Loop.

Community

Paper submitter

Coding agents are taking on longer-horizon, more complex development tasks, and training also needs to cover the complete project development process. ๐Ÿš€

However, existing environment construction pipelines often stop at execution and validation, lacking further optimization of how much training value the task itself can provide and how it can be improved. ๐Ÿค”

We hope to introduce feedback-driven iteration from recursive self-improvement (RSI) into environment construction, so that tasks continuously increase their training value during the construction process. ๐Ÿ”„

However, related methods often rely on model rollouts or downstream evaluations after model training to judge whether modifications are effective. For long-horizon coding tasks, a single complete solution involves a large amount of implementation and debugging, further increasing computational cost and feedback cycles. โณ๐Ÿ’ฐ

This prompts us to ask: can we avoid relying on high-cost, long-cycle downstream feedback and instead find reliable, low-cost, immediate proxy metrics to guide environment improvement? ๐ŸŽฏ

RepoFactory builds complete project development environments from real software repositories and uses the product of reasonableness, implementation scope, and structural coupling as the environment evolution objective. ๐Ÿญ

Validation execution and code analysis provide timely, low-cost proxy feedback, guiding the agent to jointly modify task instructions, reference implementations, and tests, thereby ensuring environment validity while increasing the implementation work and component collaboration required by the task. ๐Ÿ”โœ…

Each round of modification yields new feedback that continues to guide the next iteration, without waiting for a complete rollout of the solving model or downstream training. ๐Ÿ”

Ultimately, we constructed 10,159 environments covering 17 software domains. ๐Ÿ“Š

RepoHorizen-35B-A3B, trained on these environments, improves by 22.6 percentage points on NL2Repo-Bench compared with Qwen3.5-35B-A3B, and by 8.5 percentage points on average across five benchmarks. ๐Ÿ“ˆ

Among these, environment evolution brings an additional gain of 5.1 and 2.1 percentage points on these two metrics, respectively. ๐ŸŽ‰

We are releasing an initial batch of 200 non-evolved environments and corresponding Docker images. ๐Ÿณ๐Ÿ“ฆ

Friends working on coding agents, training data, and environment construction are welcome to get in touch. ๐Ÿคโœจ

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2611.21152
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2611.21152 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2611.21152 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2611.21152 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.