RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Large language model (LLM) agents have demonstrated strong repository-level programming capabilities. However, as software evolves, repository code may become redundant or obsolete, increasing maintenance costs and potentially introducing functional issues. Agents must therefore identify and remove unnecessary code safely, yet autonomous repository-level code cleanup remains insufficiently evaluated in isolation. To evaluate this capability, we introduce RepoClean, a benchmark of 200 cleanup tasks from 34 popular open-source Python repositories. RepoClean is constructed by automatically reintroducing deleted code from real repository histories into newer versions, preserving current implementations and retaining instances where previously passing tests consequently fail. To restore existing functionality without new feature development, agents must use repository interfaces and cross-file dependencies to determine which historical code to remove and which implementations to preserve. Evaluation of seven models shows that even the best-performing model, GPT-6 Astra, resolves only 23% of tasks. Further analysis reveals that agents remove substantially less obsolete code when cleanup is not explicitly requested. RepoClean provides a foundation for systematically studying these cleanup challenges and advancing coding agents toward autonomous software maintenance.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 17 of its 28 references that are in the map. Submitted 23 Nov 2026, announced 24 Nov 2026.
Builds on
17 of 28 references.
Closest ancestors · 11
Same direction, newest first
- 2026DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks8 Jul
- 2026SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks4 Jun
- 2026SWE-Chain: Benchmarking Coding Agents on Chained Release-Level Package Upgrades14 May
- 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks25 Mar
- 2026CodeTaste: Can LLMs Generate Human-Level Code Refactorings?4 Mar
- 2026SWE-CI: Evaluating Agent Capabilities in Maintaining Codebases via Continuous Integration4 Mar
- 2026GLM-5: from Vibe Coding to Agentic Engineering17 Feb
- 2026FeatureBench: Benchmarking Agentic Coding for Complex Feature Development11 Feb
- 2025SWE-EVO: Benchmarking Coding Agents in Long-Horizon Software Evolution Scenarios20 Dec
- 2025NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents14 Dec
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 6
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 363
- 2026ProgramBench: Can Language Models Rebuild Programs From Scratch?cited by 81
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Codecited by 34
- 2026SWE-Refactor: A Repository-Level Benchmark for Real-World LLM-Based Code Refactoringcited by 17
- 2026SWE-Milestone: Evaluating AI Agents on Continuous Software Evolutioncited by 17
- 2026To Add Is Machine, To Delete Is Human: Measuring and Mitigating Deletion Avoidance in LLM Code Editingcited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing
- 2026RepoMod-Bench: A Benchmark for Code Repository Modernization via Implementation-Agnostic Testing
- 2026Do Coding Agents Reuse Existing Code or Reinvent the Wheel?
- 2026RepoRescue: An Empirical Study of LLM Agents on Whole-Repository Compatibility Rescue
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation
- 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositories
- 2026Correct Code, Broken Contributions? SWE-CC: Benchmarking Repository Policy Compliance for Coding Agents