ProgramGym: Scaling Training Environments for Long-Horizon Program Reproduction Agents
Chengyi Yang, Renxu Bao, Jue Hou, Zongpei Teng, Ziheng Wang, Yujie Lin, Chengsong Huang, Junnan Zhu and 5 others
Xiamen University · Washington University in St. Louis · Institute of Automation, Chinese Academy of Sciences · Unisound
Published October 9, 2026 · on the feed October 12, 2026 · ▲ 54 · arXiv 2610.13395
The abstract
Coding agents are increasingly used to build programs from scratch as software engineers do rather than to resolve issues within a repository or to generate a repository from a given requirements document. However, scalable verifiable training environments that force agents to discover what is required and to decide how the system should be designed remain scarce. Moreover, existing agent workflows also cannot sustain long-horizon development in which the agent explores the reference program before implementation. To address these challenges, we introduce ProgramGym, a framework consisting of Program-Env and Program-Agent for scalable training environments of long-horizon program reproduction agents. Specifically, Program-Env constructs verifiable training environments from repositories through a feedback-driven loop that repairs runtime sandbox builds and the quality of black-box tests. Using this novel pipeline, we obtain 1,648 training environments spanning C, C++, Go, and Rust. Program-Agent combines a role-isolated workflow of analysis, implementation, and review with revision management for compilation checks and failure recovery. Experiments on ProgramBench show that both Program-Env and Program-Agent improve performance on program reproduction. Fine-tuning on trajectories with these constructed environments raises the performance of Qwen3.8-27B from 34.87% to 42.84%. Program-Agent further raises the base and SFT models to 55.71% and 56.25%, both exceeding some flagship models. We will release the ProgramGym to support further research on coding agents that build programs from scratch.
The Brief
3:01A short podcast summary of the paper. Written and voiced by AI.
Transcript
ProgramGym. Scaling Training Environments for Long-Horizon Program Reproduction Agents. By Chengyi Yang and twelve others, from Xiamen University, Washington University in Saint Louis, and two other institutions. Published on the ninth of October. Its code repository is a placeholder: a readme, and nothing to run yet.
Coding agents are more and more often asked to build programs from scratch, the way a software engineer would. That is a different job from resolving an issue inside an existing repository, or generating a repository from a given requirements document. Here the agent has to discover what is required and decide how the system should be designed. Two things hold this back. Training environments that force that kind of discovery, at scale and with verification, remain scarce. And existing agent workflows cannot sustain the long-horizon development involved, in which the agent first explores a reference program and only then implements.
ProgramGym answers both with two parts. Program-Env builds scalable training environments for long-horizon program reproduction agents. Program-Agent is a workflow designed to carry that long-horizon work through.
Program-Env constructs verifiable training environments from repositories, using a feedback-driven loop. The loop repairs two things: the runtime sandbox builds, and the quality of the black-box tests. With this pipeline the authors obtain one thousand six hundred and forty-eight training environments, spanning C, C++, Go and Rust. Each environment is verifiable, which is what makes it usable for training: an agent's reproduction of a program can be checked against black-box tests rather than judged by eye. And because the tests treat the program as a black box, they reward matching its behaviour, whatever internal design the agent chooses.
Program-Agent combines a role-isolated workflow, in which analysis, implementation and review are kept separate, with revision management that handles compilation checks and recovery from failure. The separation of roles means that the step which reads and understands the reference program is distinct from the step which writes code, and both are distinct from the step which reviews it. Revision management then keeps a long build recoverable when a compile breaks or an attempt fails.
Experiments on ProgramBench show that each part improves program reproduction on its own. Fine-tuning on trajectories gathered in the constructed environments raises a twenty-seven billion parameter Qwen model from thirty-four point eight seven percent to forty-two point eight four percent.
Program-Agent then adds more on top. With it, the base model reaches fifty-five point seven one percent, and the fine-tuned model reaches fifty-six point two five percent. Both of those figures exceed some flagship models.
The two halves of ProgramGym are complementary. One supplies the practice, environments where requirements have to be found by exploring a program rather than read off a document. The other supplies the discipline to keep a long build on track. The authors say they will release ProgramGym to support further research on agents that build programs from scratch.
Paper Quest · 7 chapters · about 22 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
Building a program from nothing is a long road. First, see what blocks it.
You want a coding agent that builds a program from scratch, the way an engineer would: no existing repository to patch, no requirements document handed over. It must discover what is needed and design the system itself.
The road ahead
- 1 · The problem ~2 min
- 2 · What came before ~3 min
- 3 · The key idea ~3 min
- 4 · Choose your own research ~3 min
- 5 · Build the method ~3 min
- 6 · The experiment ~3 min You’ll guess: Running with Program-Agent, how did the base Qwen3.8-27B compare with its fine-tuned version on ProgramBench?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.