Chiosa
Software & Code

Whole-file context helps coding agents resolve more issues

2 min
Published on Chiosa Updated

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.

Analysis

Deep

Next paperRondo tests compiler bugs that depend on earlier calls