--- pretty_name: ProgramGen language: - en tags: - code - agents - software-engineering - harbor size_categories: - 1K ProgramGen

ProgramGen

Scalable Environment Construction for Long-Horizon Coding Agents Paper · Code · Documentation · Model > [!Note] > **Tasks and trajectories from the paper [*ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents*](https://arxiv.org/abs/2612.03336).** Each task asks an agent to rebuild a real open-source project from scratch, in a container without network access, and scores the result with hidden executable tests. > [!Tip] > Tasks are [Harbor](https://github.com/harbor-framework/harbor) task directories. The model fine-tuned on the trajectories is [`Lego-X/ProgramGen-27B`](https://huggingface.co/Lego-X/ProgramGen-27B). - **Forward mode**: the agent gets a specification and reconstructs the Python package; the repository's own tests are the hidden verifier. - **Reverse mode**: the agent gets usage documentation and can query the original command-line program, which runs in a separate container; hidden black-box tests compare the rebuilt program with it.
ForwardReverseTotal
Tasks2,1423,9806,122
Verified tasks2,0263,9055,931
Training trajectories1,2901,2952,585
LanguagesPythonRust, Go, C, C++
Hidden tests per task (median)48291
Assistant turns per trajectory (median)74207104
Trajectory length in tokens (median)177K260K208K
## Results Fine-tuning Qwen3.8-27B on these 2,585 trajectories:
Qwen3.8-27BProgramGen-27BChange
Building software from scratch
Repository generation
NL2Repo-Bench
Pass
39.3
Full
4.8
Pass
46.6
Full
4.8
Pass
+7.3
Full
0.0
Program reconstruction
ProgramBench
Avg.
48.0
Almost
4.0
Avg.
61.0
Almost
10.0
Avg.
+13.0
Almost
+6.0
Software repair
DeepSWE
resolved, %
41.660.2+18.6
SWE-bench Pro HARD
resolved, %
76.584.3+7.8
SWE-bench Pro V2
resolved, %
92.594.4+1.9
SWE-bench Multilingual
resolved, %
78.079.7+1.7
Terminal tasks
Terminal-Bench 2.1
resolved, %
60.770.8+10.1
Scores in %. Both models run in the same adapted OpenHands SDK 1.33 scaffold. The better result in each row is shown in bold.
## Usage Tested with [**Harbor v0.27.0**](https://github.com/harbor-framework/harbor/releases/tag/v0.27.0) and its Docker environment. Every index row has a `path`, so one task or one trajectory can be downloaded on its own. ```bash # is forward or reverse; the environment class is shipped in programgen_harbor/ PYTHONPATH=ProgramGen harbor run -p ProgramGen/tasks/data// \ -e programgen_harbor:ProgramGenDockerEnvironment -a -m ``` > [!Important] > In reverse mode the reference program stays out of the agent's container: the agent only gets an execute-only socket client at `/reference/executable`, and the class above starts the program in a second container. > > Do not copy environment/oracle/ into the agent's container. > > Results obtained that way are not comparable with ours. Details are in the paper. ## Structure ``` tasks/ index_verified.jsonl verified tasks index_1.3k+1.3k.jsonl tasks behind the training trajectories data/{forward,reverse}// one Harbor task directory trajectories/ index_1.3k+1.3k.jsonl training trajectories data/{forward,reverse}// one trajectory programgen_harbor/ Harbor environment class used to run the tasks ``` - **Verified tasks** passed our checks and have a working reference solution: tier `A` scores 1.0, tier `B` between 0.95 and 1.0. `oracle_reward` is the highest score reachable on the task. - **Training tasks** are the tasks behind the trajectories; 2,382 of them are also verified. - **Trajectories** were produced by DeepSeek-V4.1-Flash-1017 through OpenHands SDK 1.33, and each scored above 0.9 on its task. A trajectory is the final request (system prompt, full message history, tool definitions) plus the last response, in OpenAI chat format. - The task indexes and the trajectory index are independent lists, so a few trajectories have no matching task directory. - Internal host names, paths and credentials printed by tools were replaced with placeholders such as ``.
Index fields
FieldMeaning
task_id, repotask identifier and source repository on GitHub
modeforward or reverse
pathdirectory in this repository
tier, oracle_rewardsee above (verified index only)
empty_rewardscore of an empty submission (verified index only)
n_testsnumber of scored tests (verified index only)
evidence_rewardscore of an audited agent run on the task, at least 0.9 (verified index only)
in_1300the task is also a training task (verified index only)
trial, reward, n_messagestrajectory identifier, its score and its number of messages (trajectory index only)
n_files, bytessize
## Licence The material written for this release (instructions, generated tests, graders, indexes, trajectories and the `programgen_harbor/` code) is under **Apache-2.0**. Files that come from a task's source repository, including the reference program built from it, remain under that repository's licence (MIT, Apache-2.0, BSD, MPL-2.0 or ISC), whose file is kept in the task. ## Citation ```bibtex @misc{xiong2026programgen, title={ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents}, author={Conghao Xiong and Chaofan Tao and Jierun Chen and Yuxin Jiang and Ruoyu Wang and Sidi Yang and Xiao-Hui Li and Lifeng Shang and Hao Chen and Joseph J. Y. Sung and Haoli Bai and Irwin King}, year={2026}, eprint={2612.03336}, archivePrefix={arXiv}, primaryClass={cs.SE}, url={https://arxiv.org/abs/2612.03336}, } ```