Metraipolis › archive › dc_35250f10db9b

AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents — arXiv:2610.02163

Source
arXiv (en)
Original
https://arxiv.org/abs/2610.02163
License (as archived)
CC0-1.0
Archived
2026-10-06T13:56:25.714Z
SHA-256 of the archived text
d7333182a97f37f71197e5528247c626e30776dfa9d314ee6932e59a4cc5eee7
Stable URL of this page
https://metraipolis.com/documento/dc_35250f10db9b

How to cite

AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents — arXiv:2610.02163 — arXiv (en), https://arxiv.org/abs/2610.02163 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_35250f10db9b (Metraipolis archive dc_35250f10db9b, sha256 d7333182a97f37f71197e5528247c626e30776dfa9d314ee6932e59a4cc5eee7)
BibTeX
@misc{dc35250f10db9b,
  title = {AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents — arXiv:2610.02163},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2610.02163},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_35250f10db9b; sha256 d7333182a97f37f71197e5528247c626e30776dfa9d314ee6932e59a4cc5eee7},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.02163. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Coding agents solve repository-level software engineering tasks through long trajectories of code inspection, search, editing, and testing. As a task progresses, earlier exploration becomes stale, so managing context is more than avoiding overflow: an agent must decide when to compact, what working state to preserve, and how to continue from it. We introduce AutoCompact, which trains a coding agent to make these decisions as part of its policy. To collect training data, we run the base agent on coding tasks and use a judge to review its compaction decisions, summaries, and actions after compaction. Flawed outputs are replaced with corrected ones before being executed in the environment, so each trajectory continues from the corrected decisions. We use these trajectories for supervised fine-tuning, then jointly optimize coding and compaction through reinforcement learning with task-success rewards. Experiments on SWE-bench Verified and SWE-PolyBench Verified show that AutoCompact improves pass rates over the base model by an absolute 9.2\% and 5.0\%, respectively. The improvements hold across all evaluated inference budgets, with a 256K context window that never overflows and with a 16K window whose overflow triggers fallback compaction.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-10-02 in cs.CL).
Categorie arXiv: Computation and Language (cs.CL).
Pagina del lavoro: https://arxiv.org/abs/2610.02163 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-06T12:15:34.768Z dalla pagina https://arxiv.org/catchup/cs.CL/2026-10-02?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).