Download README.md from Lego-X/ProgramGen: direct link, hf CLI and curl.
- Browser
- Download file 23.9 kB
-
https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/README.md
- Command line
-
hf download hf://datasets/Lego-X/ProgramGen/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Lego-X/ProgramGen/resolve/main/README.md
pretty_name: ProgramGen
language:
- en
tags:
- code
- agents
- software-engineering
- harbor
size_categories:
- 1K<n<10K
license: apache-2.0
ProgramGen
Scalable Environment Construction for Long-Horizon Coding Agents
Paper · Code · Documentation · Model
Tasks and trajectories from the paper ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents. 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.
Tasks are Harbor task directories. The model fine-tuned on the trajectories is
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.
| Forward | Reverse | Total | |
|---|---|---|---|
| Tasks | 2,142 | 3,980 | 6,122 |
| Verified tasks | 2,026 | 3,905 | 5,931 |
| Training trajectories | 1,290 | 1,295 | 2,585 |
| Languages | Python | Rust, Go, C, C++ | |
| Hidden tests per task (median) | 48 | 291 | |
| Assistant turns per trajectory (median) | 74 | 207 | 104 |
| Trajectory length in tokens (median) | 177K | 260K | 208K |
Results
Fine-tuning Qwen3.8-27B on these 2,585 trajectories:
| Qwen3.8-27B | ProgramGen-27B | Change | |
|---|---|---|---|
| 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.6 | 60.2 | +18.6 |
SWE-bench Pro HARD resolved, % | 76.5 | 84.3 | +7.8 |
SWE-bench Pro V2 resolved, % | 92.5 | 94.4 | +1.9 |
SWE-bench Multilingual resolved, % | 78.0 | 79.7 | +1.7 |
| Terminal tasks | |||
Terminal-Bench 2.1 resolved, % | 60.7 | 70.8 | +10.1 |
Usage
Tested with Harbor 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.
# <mode> is forward or reverse; the environment class is shipped in programgen_harbor/
PYTHONPATH=ProgramGen harbor run -p ProgramGen/tasks/data/<mode>/<task_id> \
-e programgen_harbor:ProgramGenDockerEnvironment -a <agent> -m <model>
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}/<task_id>/ one Harbor task directory
trajectories/
index_1.3k+1.3k.jsonl training trajectories
data/{forward,reverse}/<trial>/ one trajectory
programgen_harbor/ Harbor environment class used to run the tasks
- Verified tasks passed our checks and have a working reference solution: tier
Ascores 1.0, tierBbetween 0.95 and 1.0.oracle_rewardis 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
<INTERNAL_IP>.
Index fields
| Field | Meaning |
|---|---|
task_id, repo | task identifier and source repository on GitHub |
mode | forward or reverse |
path | directory in this repository |
tier, oracle_reward | see above (verified index only) |
empty_reward | score of an empty submission (verified index only) |
n_tests | number of scored tests (verified index only) |
evidence_reward | score of an audited agent run on the task, at least 0.9 (verified index only) |
in_1300 | the task is also a training task (verified index only) |
trial, reward, n_messages | trajectory identifier, its score and its number of messages (trajectory index only) |
n_files, bytes | size |
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
@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},
}