NeurIPS 2026QuestionsPapersAreasAboutMarkdown

RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations

Hanyu Li, Yichi Zhang, Speed Zhu, Hang Su, Jun Zhu, Yinpeng Dong

NeurIPS page · Open on the map

Category: LLM Agents, Evals & Benchmarks › Verified Code Synthesis and Testing · Type: new method · Keywords: repository context reasoning, code agents, evaluation suite, perturbation, structure-first workflow, software engineering

Areas: LLM Reasoning › Agentic Reasoning › Efficient Agent Reasoning; Code & Coding Agents › Code Verification › Software engineering agents; AI Agents › Agent Benchmarking › Repository agents; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Coding Agent Benchmarks; Benchmarks for LLMs & Agents › Cross-Domain Agent Evaluation › Coding Agent Benchmarks

Summary

RepoMirage is a two-stage evaluation suite that uses perturbations to probe repository context reasoning in code agents, revealing a gap and proposing RepoAnchor as a structure-first workflow.

Explained to a 5-year-old

We made a game to test how well computer helpers understand code in a whole project. The game changes the project a little to make it harder. The helpers got much worse when the project was changed. We also gave them a new way to look at the project first, which helped them do better. This shows that helpers need to think about the whole project, not just the problem.

Explained to a 5-year-old, longer

Imagine a robot assistant that helps fix bugs in a big software project. Usually we test it by giving it a problem and letting it look at the code to solve it. The researchers made a special test that changes the way the project is shown, making it harder for the assistant to see everything. When the test is changed, the assistant's success drops a lot, showing it doesn't really understand the whole project. They also added extra tasks that force the assistant to think about the project's structure, and the assistant performed even worse. To help, the researchers suggested a new method where the assistant first explores the project's structure before trying to solve the problem, which improves its performance. This tells us that robot helpers need to learn how the pieces of a project fit together, not just focus on the immediate problem.

For a technical reader

RepoMirage introduces a two-stage evaluation that perturbs repository structures to stress test context reasoning. It shows a significant drop in performance when agents must reason across files, highlighting an exploration drift. The proposed RepoAnchor workflow separates structural exploration from problem solving, improving results. This demonstrates the need for structure-aware methods in code agents.

Problem

It is unclear whether code agents' success on issue resolution reflects true repository context reasoning, i.e., the ability to identify relevant information across multiple files and reason about their relations.

Method

The approach introduces a two-stage evaluation suite built on SWE-Bench Verified that applies semantics-preserving perturbations to increase context reasoning demands and extends the perturbations into explicit structural tasks. It also proposes a structure-first workflow that separates exploration from solving.

Results

The approach shows a performance drop under perturbations, with average accuracy falling from 66.8% to 25.3% when structural tasks are added, and the proposed structure-first workflow yields notable gains.

Contributions

It introduces a diagnostic evaluation suite that reveals a gap in repository context reasoning and proposes a structure-first workflow to address it.

Practical relevance

The findings highlight the need for more robust context reasoning in code agents, enabling safer and more reliable deployment in real-world software engineering tasks.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction