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.
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