Papers
arxiv:2610.21073

Skip the Compressor: Coding Agents Fix More Issues When They Pick Whole Files

Published on Oct 15
· Submitted by
Xiaocong Yang
on Oct 19
Authors:
,
,
,
,

Abstract

CQ2-CARE improves software issue resolution by selecting exact files to include verbatim within a token budget, outperforming compression and retrieval methods.

A coding agent works on repositories that can be far larger than its context window can hold. Prompt compressors and retrievers offer solutions to this problem, but patching an issue needs two things at once: the files that must change, and their code exactly as written, since the model must reproduce the lines it edits. Retrievers rank code by its similarity to the issue rather than by whether it must change, and compressors delete text to fit the budget. We show that at an equal token budget, an agent resolves more issues when the budget goes to choosing which files to show verbatim, as our simple selector CQ2-CARE does, than when it goes to pruning tokens or retrieving chunks. We fit every context to the same per-issue budget on 300 recent SWE-rebench issues and grade each patch with the benchmark's tests. With GPT-5.6 and Claude Opus 5, CQ2-CARE resolves 43.7% and 46.7% of the issues, 6.3 points more than the best of three compressors with either model, and 9.3 and 12.7 points more than the best of three retrievers. CQ2-CARE even resolves more issues than two methods trained for issue resolution, SweRank (by 0.7 and 1.7 points) and SWE-Pruner (by 2.0 and 7.3). Our analysis shows the defects of the baseline methods: retrievers often miss the files to edit, and compressors keep them but alter their text, so fewer patches apply. Exact-file selection needs no compression model and shows every line as the repository has it, so the model can quote the code it edits.

Community

Paper submitter

TL;DR: At a fixed token budget, a coding agent fixes more issues when it spends the budget choosing a few whole files and showing them verbatim than when it prunes tokens or retrieves chunks. Our simple selector, CQ2-CARE, needs no compression model.

Why compression hurts code edits: a patch has to quote the lines it changes exactly. Retrievers rank code by similarity to the issue, so they often miss the file to edit; token pruners keep the file but alter its text, so the patch no longer applies.

How CQ2-CARE works

  1. Ask the model under test twice, independently, which files must change, and keep the files both answers name.
  2. Show those files whole and verbatim.
  3. Add short grep spans for definitions, callers or strings the model asks for.

Results (300 recent SWE-rebench issues, every context fitted to the same per-issue token budget, graded by the benchmark's tests)

  • Resolves 43.7% with GPT-5.6 and 46.7% with Claude Opus 5
  • +6.3 points over the best of three prompt compressors (LLMLingua-2, LongLLMLingua, LongCodeZip) with either model
  • +9.3 and +12.7 points over the best of three retrievers, including SWE-bench's file-level BM25
  • Ahead of two methods trained for issue resolution: SWE-Pruner (+2.0 / +7.3) and SweRank (+0.7 / +1.7, within noise)
  • Close to an oracle: showing the true gold files resolves only 5.7 points more with GPT-5.6, and no more with Claude
  • Controlled test: deleting 20% of the tokens on every line of our own contexts costs 9.7 points

Takeaway for agent builders: choose the candidate files well, keep them verbatim, and if something must be cut, cut whole lines.

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2610.21073
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2610.21073 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2610.21073 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2610.21073 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.