Introduction
The evaluation of "Code Agents"—AI models capable of navigating and editing entire software repositories—has become a critical frontier in artificial intelligence. However, progress is currently bottlenecked by the limitations of existing benchmarks. The industry standard, SWE-Bench, while foundational, is restricted to 12 popular Python libraries. This narrow scope introduces risks of distributional mismatch, where agents excel at popular repositories but fail on diverse, real-world applications, and data contamination, where models may have been trained on the very code they are tasked to solve.
To address these challenges, researchers have developed SETUPAGENT, a fully automated system designed to create historically accurate execution environments for evaluating code-writing agents. By automating the "plumbing" of benchmark creation, the researchers introduced two massive new benchmarks—SWEE-Bench and SWA-Bench—which provide a more rigorous and realistic assessment of AI agent capabilities.
The Challenge of Historical Accuracy
A primary difficulty in benchmarking repository-level tasks is the requirement for "historically accurate" environments. To verify a bug fix, an agent must operate within the exact dependency environment that existed when the bug was first reported. Manually configuring these environments is labor-intensive and difficult to scale. SETUPAGENT solves this by automating the identification and installation of specific dependency versions, ensuring that the evaluation environment mirrors the original state of the repository.
Methodology: The SETUPAGENT Pipeline
SETUPAGENT utilizes a Large Language Model (LLM) driven approach to automate the setup process through three distinct phases:
- Command Extraction: The agent scans repository artifacts, such as README files and CI/CD configurations, to identify installation and testing commands. It leverages the
uvpackage manager to enforce "exclude-newer" constraints, ensuring dependencies do not exceed the timestamp of the issue creation. - Iterative Testing and Improvement: The system attempts to install and test the repository within a clean Docker container. If a failure occurs, the error logs are fed back into the LLM to diagnose the issue and generate corrective actions, such as installing missing system-level libraries via
apt-get. - Validation: Once a stable environment is achieved, the system verifies that tests can execute successfully. It then generates a "Result Parser" to convert raw terminal output into structured data for automated scoring.
New Benchmarks for Real-World Engineering
Using SETUPAGENT, the researchers produced two new datasets that significantly expand the scope of code agent evaluation:
- SWEE-Bench (Extended): This benchmark features 366 Python repositories. Unlike the original SWE-Bench, it focuses on diversity, including less-popular projects that often lack polished documentation and standardized structures.
- SWA-Bench (Applications): This dataset consists of 44 full software applications, such as web tools and CLI apps. This shifts the focus from library-level logic to complex architectural dependencies and multi-component systems.
Key Insights and Results
The introduction of these benchmarks has revealed a significant gap between current AI performance and real-world requirements:
The Performance Drop
AI agent performance plummeted when moved from popular libraries to more diverse benchmarks. Success rates for top-tier agents, such as AutoCodeRover v2, dropped from approximately 16.6% on the original SWE-Bench to 10.2% on SWA-Bench. Overall, success rates across various models dropped by as much as 40%.
Complexity and Bias
Analysis showed that popular repositories typically feature high-quality issue descriptions and cleaner codebases. In contrast, "in the wild" repositories often have vague issue descriptions, and the required fixes are 2–4 times more complex in terms of the number of lines and files modified. This suggests that current benchmarks may be overestimating the readiness of AI agents for general software engineering tasks.
Data Contamination
The researchers found statistically significant evidence of data contamination. By comparing model performance on issues created before versus after a model's knowledge cutoff date, models like GPT-4o performed notably better on older tasks, suggesting they may have encountered the solutions during their training phase.
Efficiency and Limitations
SETUPAGENT demonstrates remarkable efficiency, taking an average of only 30 seconds per repository to attempt an installation. It successfully configured environments for approximately 21-28% of repositories and 58-71% of specific task instances without human intervention.
Despite these gains, limitations remain. SETUPAGENT struggles with repositories requiring complex makefiles or multi-step system configurations. It currently cannot handle "Docker-in-Docker" scenarios where the repository itself requires a containerized environment to run. Additionally, its reliance on internal repository documentation means it can be bottlenecked when critical instructions are only available on external wikis or websites.
Conclusion
SETUPAGENT and the resulting SWEE-Bench and SWA-Bench datasets provide a more honest accounting of the current state of AI in software engineering. By automating the creation of diverse, historically accurate environments, this work paves the way for more robust and contamination-resistant evaluations, pushing the industry toward agents that can handle the messy reality of real-world software development.
Summary updated