TL;DR
RepoZero is a novel evaluation benchmark designed to test the ability of LLM agents to build complete software repositories from scratch using fully automated, execution-based verification. By framing repository generation as a cross-language reproduction task (e.g., rewriting Python packages in JavaScript), RepoZero eliminates data leakage and reveals that even the most advanced LLM agents struggle, achieving pass rates of only 30% to 55%.
What Problem Does This Paper Address?
While Large Language Models (LLMs) have become remarkably proficient at writing isolated code snippets or applying small patches to existing codebases, evaluating their ability to generate an entire software repository from scratch remains a major challenge.
Current benchmarks suffer from two primary bottlenecks:
- Lack of Verifiable Evaluation: Generating a new project from scratch means there are no pre-existing unit tests to verify the code. As a result, existing benchmarks rely on human evaluation or "LLM-as-a-judge" frameworks, both of which introduce subjective biases and limit reproducibility.
- Data Leakage: Because modern LLMs are trained on massive corpora of public GitHub repositories, it is incredibly difficult to tell whether an agent is genuinely reasoning through a software architecture problem or simply regurgitating memorized code.
Methods
To solve these challenges, the authors introduce RepoZero, which reformulates repository generation as a repository reproduction task.
Instead of open-ended generation, an LLM agent is given the functional API specifications of a real, open-source source repository and tasked with re-implementing the entire codebase from scratch. To ensure rigorous and automated evaluation, the framework employs several clever strategies:
- Cross-Language Synthesis: To completely block the model from using memorized code or simple copy-pasting, the agent must implement the repository in a completely different programming language (e.g., porting a Python library to JavaScript, or a C++ library to Rust).
- Strict Black-Box Validation: The generated repository is executed inside an isolated, sandboxed Docker container. Its correctness is verified by running test cases and checking if its outputs are byte-for-byte identical to the original source repository. External packages are strictly prohibited to prevent "shortcut" solutions.
- Agentic Code-Test Evolution (ACE): The authors also introduce a workflow to enable test-time scaling. A coding agent generates the initial repository structure, while a testing agent dynamically generates test cases and runs them against the original repository (acting as an oracle) to harvest ground-truth outputs. If the generated repository fails these tests, the error logs are fed back to the coding agent for iterative refinement.
Datasets
The authors curated a benchmark consisting of 600 total test files across two primary subsets:
- RepoZero-Py2JS (400 samples): Source repositories are in Python; agents must re-implement them in JavaScript (Node.js using ES Modules).
- RepoZero-C2Rust (200 samples): Source repositories are in C/C++; agents must re-implement them as a complete Cargo project in Rust.
The repositories span five functional domains: Serialization & Data Formats, Cryptography & Encoding, Data Structures & Utilities, Mathematics & Science, and Specialized Tools. They are further partitioned into Easy, Medium, and Hard categories based on lines of code, API counts, and input/output complexity.
Key Insights and Ideas
- Runnability Does Not Equal Correctness: One of the most striking findings is that roughly 40% of the executable code generated by agents completely failed to match the deterministic output of the source repository. This highlights a massive gap in benchmarks that only check if code compiles or runs without throwing errors, underscoring the necessity of RepoZero's strict output-equivalence verification.
- Contextual Drift in Long Trajectories: Even though white-box constraints and example test cases were explicitly provided in the initial prompt, agents frequently suffered from "contextual drift." As the reasoning chain grew longer across multiple files, they lost track of critical architectural requirements.
- The Value of Self-Correction: High-performing agents proactively designed and executed unit tests within their environments. This self-correcting capability was instrumental in eliminating runtime errors.
Key Results
- Suboptimal Performance Across the Board: Even when backed by advanced agent scaffolds, top-tier LLMs achieved limited success. Pass rates for the best configurations hovered between 30% and 55%.
- Claude Leads the Pack: Anthropic's Claude-4.6-Sonnet consistently achieved the highest performance, securing a 51.46% pass rate on Py2JS and 44.60% on C2Rust using the OpenHands-bash scaffold.
- Scaffold Engineering Matters: The Mini-SWE-Agent scaffold generally outperformed OpenHands-bash due to more sophisticated context engineering. For instance, Claude's Py2JS pass rate increased to 54.70% under Mini-SWE-Agent.
- ACE Framework Scales Performance: Implementing the ACE iterative feedback loop yielded substantial performance gains. For example, allowing two rounds of test-driven refinement (Retry-2) boosted DeepSeek V3.1's average pass rate from 26.08% to 42.88% under the OpenHands scaffold.
Limitations and Future Work
The authors note a few limitations in their current work:
- Constrained Scaffold Evaluation: Due to computational resource constraints and high inference costs, proprietary models like GPT-4 and Gemini were excluded from evaluation within the Mini-SWE-Agent framework.
- No Code Quality Metrics: The benchmark currently prioritizes strict functional correctness (output matching) but does not evaluate code readability, maintainability, or architectural elegance.
For future work, the authors propose exploring specialized reinforcement learning or distillation to improve global repository-level reasoning, as well as expanding the benchmark to support larger-scale, industry-level multilingual software development scenarios.
Summary updated