ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents
Conghao Xiong, Chaofan Tao, Jierun Chen, Yuxin Jiang, Ruoyu Wang, Sidi Yang, Xiao-Hui Li, Lifeng Shang, Hao Chen, Joseph J. Y. Sung, Haoli Bai, Irwin King
Abstract
Coding agents are moving from issue-level fixes to long-horizon development, but training environments with real-project complexity, clear goals, runnable workspaces, and reliable evaluation remain scarce. We introduce ProgramGen, a scalable and efficient pipeline that turns real repositories into such environments, where coding agents learn forward and reverse engineering. In forward mode, the agent implements a repository from a specification, and the repository tests grade the result. In reverse mode, the agent reimplements a reference program without seeing the source code, and tests generated by the proposed pipeline grade the result. ProgramGen constructs both modes in three steps: building the repository, generating the task, and validating the result. To keep the cost low, ProgramGen regenerates only the parts of a task that fail validation and uses rule-based programs to install dependencies, extract interfaces, and run the checks. Empirically, we show that with merely 2,585 trajectories, the mean pass rates of Qwen3.8-27B can be effectively boosted, i.e., on NL2Repo and on ProgramBench, respectively. The model also exhibits good generalization on SWE-related benchmarks, e.g., on DeepSWE, on Terminal-Bench 2.1, and on SWE-bench Pro V2 Hard. We open source the tasks, trajectories, model, and code for community research.
Create a lesson
Metadata
- Categories
- cs.SE, cs.AI, cs.CL, cs.LG
Related papers
Evaluating Code Slop in Long-Horizon Coding Agents
Shared title terminologycs.SEShubham Gandhi, Shyam Agarwal, Nachiket Kotalwar et al.
ReleaseSynth: Scaling Data from Software Evolution for Long-Horizon Coding Agents
Shared title terminologycs.SEMan Ho Lam, Chaozheng Wang, Zongjie Li et al.
SheetCraft: Fine-Tuning Code Agents for Execution-Guided Spreadsheet Reasoning and Construction
Shared title terminologycs.SEZuowei Zhang, Xiaotian Li, Siyuan Li et al.
VeilPRBench: Can Code Review Agents Catch Vulnerabilities in Pull Requests That Resolve Real Issues?
Shared title terminologycs.SEXinhao Song, Xiaofei Yin, Yuxuan Xiao et al.
Residual-Guided Model Selection for Terminal-Based Coding Agents
Shared title terminologycs.SEChang Zhou, Zhaoling Chen, Qian Zhang
Don't Over-Engineer It: AI Coding Agents Write Too Much Code, and a Short Prompt Reduces It
Shared title terminologycs.SEJay Desai, Fanyou Wu, Srinivasan H. Sengamedu