While large language models (LLMs) have demonstrated remarkable proficiency in function-level code generation (e.g., HumanEval) and localized bug fixing (e.g., SWE-bench), a massive gap remains between writing a sort() function and architecting a multi-file software repository. Current benchmarks often provide heavy scaffolding—such as predefined file structures or function signatures—that act as strong hints.
To address this "long-horizon reasoning gap," researchers have introduced NL2Repo-Bench, a benchmark designed to test whether an AI agent can act as a true software engineer. The challenge is steep: starting from an empty folder and a single requirements document, can an agent maintain global coherence, manage complex dependencies, and execute a plan over hundreds of interaction steps to build a fully installable Python library?
NL2Repo-Bench: A Rigorous, Execution-Based Testbed
NL2Repo-Bench formalizes the repository generation task by removing the hand-holding typical of earlier benchmarks.
- The Input: Agents are provided with an empty workspace and a single, comprehensive natural-language specification (averaging 19,000 tokens). To ensure these requirements are exhaustive, the researchers reverse-engineered 104 real-world Python projects using an AST-assisted annotation workflow, guaranteeing the text covers every class and function signature exercised by the tests.
- The Process: The agent must autonomously design the architecture, manage third-party dependencies, implement multiple files, and package the library.
- The Evaluation: Moving away from LLM-as-a-judge grading, NL2Repo-Bench is strictly execution-based. The generated repository is placed in a standardized Docker container and run against the original project's real-world
pytestsuite to ensure an "apples-to-apples" comparison.
The dataset spans 104 tasks across 9 diverse categories (including Web Development, Machine Learning, and System Tools) and is divided into Easy, Medium, and Hard difficulty levels based on lines of code (LOC) and project complexity.
Key Results: A 40% Ceiling
The results from NL2Repo-Bench serve as a wake-up call for the current state of autonomous software development. Even the most advanced models struggle significantly with this long-horizon task.
- The Performance Ceiling: The strongest model evaluated, Claude-Sonnet-4.5, achieved an average test pass rate of only 40.2%.
- Rare Full Success: Across the 104 tasks, the best model fully passed the test suite for only 5 repositories in a single run.
- Complexity Decay: Performance suffers a sharp, monotonic decline as tasks scale. On "Hard" tasks (>4,000 LOC), the best pass rate plummeted to approximately 25%.
- Model Ecosystems: Closed-source models (like the Claude series) significantly outperformed open-source alternatives (such as DeepSeek-V3.2 and Qwen3), though the gap is narrowing in raw code generation capabilities.
Insights and Agentic Bottlenecks
Beyond raw scores, the evaluation revealed several fascinating behavioral quirks and bottlenecks in state-of-the-art models:
- The "Thinking" Paradox: Models equipped with explicit internal reasoning (like Qwen3-Thinking) frequently suffer from "hallucinated verification." They reason themselves into believing the task is complete and terminate early, even when the codebase is broken or incomplete.
- The Human-in-the-Loop Bias: Models like GPT-5 exhibited a high "Non-Finish" rate because they frequently paused to wait for user confirmation. While this behavior is likely baked in during RLHF for safety and collaboration, it is highly detrimental to fully autonomous execution.
- Context is Necessary, Not Sufficient: While massive 1M+ token context windows (seen in Claude and Gemini) are essential for holding project history, they do not guarantee success. "Agentic persistence" and reasoning robustness remain the true bottlenecks.
- The Power of Planning: There is a high correlation (0.711) between final performance and the use of explicit planning tools, such as a
task_tracker. Agents that attempt to "wing it" almost universally fail as project complexity grows.
Failure Modes and the Path Forward
The researchers identified three primary failure modes that define the current frontier of AI coding agents:
- Brittle Dependencies: Agents frequently struggle with
ImportErrororModuleNotFoundError, failing to correctly structure Python packages (e.g., forgetting__init__.pyfiles). - Premature Termination: Driven by overconfidence or hallucinated verification, agents often stop working before the repository is fully functional.
- Blind Editing: Agents commonly make multiple cross-file changes without running the test suite to verify intermediate steps, leading to compounding errors.
Future Directions: Progress in long-horizon repository generation will require more than just larger context windows or more interaction turns. The "quality" of the agentic workflow must evolve. Future research must focus on developing better self-verification loops and mechanisms that enforce global architectural consistency over extended development trajectories. Until then, NL2Repo-Bench stands as a rigorous benchmark for the next generation of autonomous coding agents.
Summary updated