RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup

Hongyixuan Yuan, Qixing Zhou, Pengcheng Huang, Qingshuo Ni, Runsong Zhao +3 more
11/23/2026
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yuan2026repoclean,
  title  = {RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup},
  author = {Hongyixuan Yuan and Qixing Zhou and Pengcheng Huang and Qingshuo Ni and Runsong Zhao and Shaokai He and Xiangpeng Li and Deqiang Ouyang},
  year   = {2026},
  eprint = {2611.30350},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.30350v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.30350.svg)](https://codeofpaper.com/paper/2611.30350)

Discussion