Coding agents are moving beyond fixing bugs inside existing repositories or generating code from a requirements document. A new class of agents is being asked to build programs from scratch, the way a software engineer would. Yet scalable, verifiable training environments for this kind of work remain scarce, and existing agent workflows struggle to sustain the long-horizon development needed to explore a reference program before implementing it.
To address this gap, researchers introduce ProgramGym, a framework composed of two parts: Program-Env and Program-Agent. Program-Env constructs verifiable training environments from repositories using a feedback-driven loop that repairs runtime sandbox builds and improves the quality of black-box tests.
Using this pipeline, the team obtained 1,648 training environments spanning C, C++, Go, and Rust. Program-Agent, meanwhile, 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 components improve program reproduction. Fine-tuning on trajectories built with these environments raised the performance of Qwen3.8-27B from 34.87% to 42.84%. Program-Agent pushed the base and SFT models further, to 55.71% and 56.25% respectively — both exceeding some flagship models.
The authors say they will release ProgramGym to support further research on coding agents that build programs from scratch.