TSRGet The Daily Report
The Singularity Report

TSR Desk · science · 19 November 2026, 01:01 UTC

Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching

What
Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching
Who
arxiv.org
When
17 November 2026, 05:38 UTC
Category
Science
Primary source
https://arxiv.org/abs/2611.22238
What is not known
This brief does not claim independent replication. Claims that appear only on X and not in the primary source stay unknown.

First, in our main evidence-package experiments, retrieved code reduces read and search commands by 18--34%, but increases cost by 33--42% when cached input costs one tenth of uncached input, without a measurable improvement in resolution. It comes from a paper posted to arXiv on 17 November 2026. Coding agents repeatedly send their conversation history to a language model. Adding useful code may reduce search, while removing old tool outputs may shorten later prompts. But do these changes reduce the cost of solving a task? We study this as a measurement problem in more than 20,000 runs of open models on SWE-bench Verified, SWE-bench and Loc-Bench. We account separately for uncached input, cached input and output tokens. Three findings emerge. Second, removing old observations can either save money or increase cost: the same approach saves 19--36% without a cache discount but increases cost by 38--116% with a tenth-price cache. Third, shorter prompts do not guarantee cheaper runs because agents may respond by taking more steps. We also find that concurrent experiments can share cached prefixes and distort cost comparisons. These results show why context-management methods should be evaluated using both token prices and the agent's subsequent behavior.

Why it counts

First, in our main evidence-package experiments, retrieved code reduces read and search commands by 18--34%, but increases cost by 33--42% when cached input costs one tenth of uncached input, without a measurable improvement in resolution. Third, shorter prompts do not guarantee cheaper runs because agents may respond by taking more steps.

Sources

Primary source: primary source

What is not known

This brief does not claim independent replication. Claims that appear only on X and not in the primary source stay unknown.

No clip. The article still stands.