Whole-file context helps coding agents resolve more issues
Skip the Compressor: Coding Agents Fix More Issues When They Pick Whole Files · arXiv:2610.21073
In plain words
A coding program fixing a reported issue needs the right files and the exact code inside them. Searching by wording can miss the file to edit, and shortening code can change the text a patch must match.
CQ2-CARE asks a model which files likely need changes, then gives the coding model those files whole. On 300 Python issues, two tested models resolved a larger share with this context than with the strongest tested retriever or compressor, at matched budgets. The test used one patch per issue.
The research
When a coding agent has room for only part of a repository, which context helps it make a working edit? The patch needs the files that must change, but it also needs their exact code so the edit matches what is actually in the repository. Retrieval and text pruning can each lose one of those.
CQ2-CARE selects likely-to-change repository files and shows them whole, so coding agents can use a limited context budget without pruning the code they must edit.
In SWE-rebench, a harness checks whether a patch resolves a reported Python issue by applying it and running the issue’s required tests; the score here is the share of issues whose tests pass.
The authors compare context methods at each issue’s same token budget, with one fixed model writing one patch per context.
CQ2-CARE resolved 43.7% of issues with GPT-5.6 and 46.7% with Claude Opus 5. For each model, that exceeded the strongest tested compressor by 6.3 percentage points and the strongest main retriever by 9.3 or 12.7 points.
This supports choosing whole files in this evaluation, while diagnostics and a text-alteration control help explain the result.
The evaluation covers one patch call per context on Python issues from one benchmark, rather than agents that can open more files or run tests over multiple turns. A second patch sample changed 8.7–18.9% of outcomes, so small differences between methods are fragile.
What the evidence shows
- The budget must preserve two things
CQ2-CARE is a context-selection method for coding agents working on repository issues. The question is how to spend a limited context budget when a fix needs both the right files and their exact text.
Similarity-based retrieval can favor files that echo the issue, while pruning can alter code that a patch must reproduce.
- A test measures issue resolution
The authors test the method on 300 eligible Python issues from SWE-rebench. Its harness checks whether a patch resolves each reported issue by applying it and running the issue’s required tests; resolution rate is the share of issues whose tests pass. For each issue, a fixed model writes one patch from a context matched to CQ2-CARE’s realized size.
- Both models resolved more issues
In this matched-budget comparison, GPT-5.6 resolved 43.7% of issues with CQ2-CARE, 6.3 percentage points above the strongest compressor and 9.3 above the strongest main retriever. Claude Opus 5 resolved 46.7%, 6.3 points above the strongest compressor and 12.7 above the strongest retriever. The results are averages across the 300 issues for each model, not outcomes for every issue.
- The failure patterns differ
The diagnostics distinguish the alternatives’ weaknesses: retrieval usually showed unchanged code but often missed files the fix needed, while compression altered code and its patches applied less often. CQ2-CARE’s contexts combined high recall of files changed by the reference patch with repository-matching lines.
In a separate GPT-5.6 control, deleting 20% of tokens from every line while keeping files fixed lowered resolution by 9.7 points, supporting a role for text preservation in that setting.
Deep
- Original paper authors
- Xiaocong Yang, Rishit Chatterjee, Himanshu Udupi, Vikram Ramavarapu, ChengXiang Zhai
- Submitted to arXiv
- License
- CC BY 4.0