Metraipolis › archive › dc_febe6b328b8f
An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents — arXiv:2609.22114
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.22114
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-09T06:48:51.362Z
- SHA-256 of the archived text
0534a8e887c84ac254e56732ea8dfec425e40651d1a3f5039019f16eb955aae0- Stable URL of this page
https://metraipolis.com/documento/dc_febe6b328b8f
How to cite
An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents — arXiv:2609.22114 — arXiv (en), https://arxiv.org/abs/2609.22114 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_febe6b328b8f (Metraipolis archive dc_febe6b328b8f, sha256 0534a8e887c84ac254e56732ea8dfec425e40651d1a3f5039019f16eb955aae0)
BibTeX
@misc{dcfebe6b328b8f,
title = {An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents — arXiv:2609.22114},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.22114},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_febe6b328b8f; sha256 0534a8e887c84ac254e56732ea8dfec425e40651d1a3f5039019f16eb955aae0},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.22114. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Context compression is widely proposed as a way to cut the token bill of LLM coding agents, and public benchmarks report that aggressive compression preserves task-solving quality. These two facts do not imply the third one commonly assumed: that compressing file reads saves money in a real multi-turn agent. We instrument a production compression gateway (Paritok) between coding agents (Claude Code, Codex) and frontier LLMs (Claude Sonnet, GPT-5), and decompose the token bill of real sessions into three independent levers: tool-schema filtering, content compression of file reads and tool output, and history summarization. Measured in isolation under controlled A/B runs, the three save at fundamentally different rates. Tool-schema filtering removes a fixed block every turn, roughly 21K-57K tokens on a typical turn; it is linear in the turn count N and the only unambiguously and reproducibly positive lever. Content compression saves only about 2% of the cache-priced prefix per turn, but compressed reads accumulate in history and are re-sent on every later turn, so its cumulative saving grows quadratically, about 3350*N^2 tokens (measured), overtaking the fixed tool-filter saving within roughly 6 turns until the context window caps it. A non-destructive gateway lets the agent pull original bytes back on demand; each recall re-sends exactly the one segment just compressed away, so its cost is fixed and bounded rather than a multiplicative blowup, and heavy recall spends the accumulated saving back one segment at a time. Finally, a strong single-shot compression benchmark - 86.5% of SWE-bench quality retained at a 25.7% compression rate, achieved by the model this gateway deploys (Paritok-4B, reported separately) - is orthogonal to multi-turn agent cost and must not be cited as a cost-saving argument. We distill the results into an actionable recipe for where token-saving effort pays off. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-22 in cs.CL). Categorie arXiv: Computation and Language (cs.CL) ; Performance (cs.PF); Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2609.22114 — 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-09T06:48:44.831Z dalla pagina https://arxiv.org/catchup/cs.CL/2026-09-22?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).