NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents

Jingzhe Ding, Shengda Long, Changxin Pu, Huan Zhou, Hongwan Gao, Xiang Gao, Chao He, Yue Hou, Fei Hu, Zhaojian Li, Weiran Shi, Zaiyuan Wang, Daoguang Zan, Chenchen Zhang, Xiaoxu Zhang, Qizhi Chen, Xianfu Cheng, Bo Deng, Qingshui Gu, Kai Hua, Juntao Lin, Pai Liu, Mingchen Li, Xuanguang Pan, Zifan Peng, Yujia Qin, Yong Shan, Zhewen Tan, Weihao Xie, Zihan Wang, Yishuo Yuan, Jiayu Zhang, Enduo Zhao, Yunfei Zhao, He Zhu, Chenyang Zou, Ming Ding, Jianpeng Jiao, Jiaheng Liu, Minghao Liu, Qian Liu, Chongyao Tao, Jian Yang, Tong Yang, Zhaoxiang Zhang, Xinjie Chen, Wenhao Huang, Ge Zhang · OpenReview

Abstract

Current benchmarks for Large Language Model (LLM) coding agents often focus on short-horizon tasks like function completion or bug fixing. We introduce NL2Repo-Bench, a benchmark designed to evaluate the ability of agents to generate complete, installable software repositories from scratch based on a single natural language specification. Our evaluation of state-of-the-art models reveals that end-to-end repository generation remains a significant challenge, with the best-performing model achieving only a 40.2% success rate, highlighting critical gaps in long-horizon reasoning and architectural planning.

Introduction

The evolution of AI coding agents has seen remarkable progress in localized tasks. Benchmarks like HumanEval and SWE-bench have become standards for measuring performance in isolated function generation and bug fixing, respectively. However, these tasks do not capture the complexity of real-world software engineering, which involves building entire systems from the ground up. NL2Repo-Bench addresses this gap by challenging agents to construct multi-file, functional Python libraries from an empty workspace using only a high-level natural language document.

The NL2Repo-Bench Framework

NL2Repo-Bench consists of 104 tasks derived from real-world open-source Python projects. These tasks span nine domains, including machine learning and web development, with repository sizes ranging from 300 to 120,000 lines of code (LOC). The benchmark categorizes tasks by difficulty: Easy (≤1.5k LOC), Medium (1.5k-4k LOC), and Hard (≥4k LOC).

Unlike previous benchmarks that provide structural scaffolding or predefined signatures, NL2Repo-Bench requires agents to autonomously manage:

  • Architectural design
  • Dependency management
  • Multi-file code organization
  • Packaging and installation

Methodology

The core of the evaluation is a strictly execution-based pipeline. An agent is provided with a comprehensive natural language specification document (averaging ~19,000 tokens) that describes the project's requirements, structure, and API.

Example of a natural language specification document provided to agents in NL2Repo-Bench, detailing project structure, environment, and implementation nodes.

The agent then operates in a sandboxed environment to build the repository. Success is measured by running the generated code against the original project's authoritative pytest suite. This binary, execution-grounded metric ensures an objective evaluation free from the biases of LLM-based grading.

Key Findings

The Performance Gap

Even the most advanced models struggle with the long-horizon nature of repository generation. Claude-Sonnet-4.5 (via the Claude Code framework) led the field with a 40.2% average test pass rate. However, performance dropped significantly as task complexity increased, falling from 51.8% on Easy tasks to 25.1% on Hard tasks.

Behavioral Paradoxes

  • Hallucination of Verification: Models with internal reasoning chains, such as Qwen3-Thinking, frequently convinced themselves they had finished the task correctly in their internal monologue, leading to a 49% early-stop rate despite incomplete implementations.
  • Collaborative Friction: GPT-5 underperformed due to its tendency to seek human confirmation. In an autonomous benchmark setting, this resulted in an 84.5% non-finish rate, as the model waited for feedback that never arrived.

Planning vs. Context

While long context windows (e.g., 1M+ tokens) are necessary for maintaining global coherence, they are not sufficient for success. The study found that the use of explicit planning tools, such as a task_tracker, had a much stronger correlation (0.711) with performance than the sheer volume of code edits or context size.

Conclusion

NL2Repo-Bench demonstrates that autonomous software engineering is far from solved. The primary bottlenecks are not just context limits or missing supervision, but fundamental challenges in long-horizon coordination and environment management. Future research should prioritize innovations in agentic planning and robust self-correction mechanisms to bridge the gap between writing code and building software systems.

Summary updated

BibTeX
@inproceedings{ding2026nl,
  author = {Jingzhe Ding and Shengda Long and Changxin Pu and Huan Zhou and Hongwan Gao and Xiang Gao and Chao He and Yue Hou and Fei Hu and Zhaojian Li and Weiran Shi and Zaiyuan Wang and Daoguang Zan and Chenchen Zhang and Xiaoxu Zhang and Qizhi Chen and Xianfu Cheng and Bo Deng and Qingshui Gu and Kai Hua and Juntao Lin and Pai Liu and Mingchen Li and Xuanguang Pan and Zifan Peng and Yujia Qin and Yong Shan and Zhewen Tan and Weihao Xie and Zihan Wang and Yishuo Yuan and Jiayu Zhang and Enduo Zhao and Yunfei Zhao and He Zhu and Chenyang Zou and Ming Ding and Jianpeng Jiao and Jiaheng Liu and Minghao Liu and Qian Liu and Chongyao Tao and Jian Yang and Tong Yang and Zhaoxiang Zhang and Xinjie Chen and Wenhao Huang and Ge Zhang},
  title = {{NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=wqQam1muOQ},
}
Figure