Agents fix more issues when they see whole files

A new University of Illinois paper asks a practical question. When a coding agent has a limited context budget, should you compress the code or show whole files? Whole files won.

The setup: 300 recent issues from the SWE-rebench benchmark, every method held to the same token budget per issue, and each patch graded by the project's tests. Their selector, CQ2-CARE, picks which files to show verbatim.

With GPT-5.6 and Claude Opus 5, it resolved 43.7% and 46.7% of the issues. That's 6.3 points above the best of three compressors, and 9.3 and 12.7 points above the best of three retrievers.

The authors explain why the others lose. Retrievers rank code by similarity to the issue, so they often miss the files that need to change. Compressors keep the right files but alter the text, so the model quotes lines that don't exist and fewer patches apply.

I think this applies well beyond code. When the model has to reproduce exact text, like code, contracts or configs, verbatim beats clever summaries. Spend the token budget on choosing the right source instead of shrinking it.

Where does your agent compress or summarize context, and have you measured what that costs?

Sources

#CodingAgents#RAG#AI#ArtificialIntelligence

New notes go out on LinkedIn first. Building something with AI? We can help.

Diagram card: Agents fix more issues when they see whole files