Why coding agents break prompt caching (and how to fix it)
Description and use
<p><strong>TL;DR:</strong></p> <ul> <li> <strong>The Prefix Problem:</strong> LLM prompt caching relies on exact, continuous prefixes. Naive agent summarization alters early conversation history, destroying the KV cache and forcing full prefill compute.</li> <li> <strong>The Evidence:</strong> The October 28 release of <code>contextWatcher</code> (a Rust proxy) proved the impact of prefix-aware deduplication, dropping prefill latency on ~28k tokens from ~170s to ~1.6s.</li> <li> <strong>The Budget Impact:</strong> Cache misses on frontier models mean paying full input token costs repeatedly, b
Problem
<p><strong>TL;DR:</strong></p> <ul> <li> <strong>The Prefix Problem:</strong> LLM prompt caching relies on exact, continuous prefixes. Naive agent summarization alters early conversation history, destroying the KV cache and forcing full prefill compute.</li> <li> <strong>The Evidence:</strong> The October 28 release of <code>contextWatcher</code> (a Rust proxy) proved the impact of prefix-aware deduplication, dropping prefill latency on ~28k tokens from ~170s to ~1.6s.</li> <li> <strong>The Budget Impact:</strong> Cache misses on frontier models mean paying full input token costs repeatedly, b
Outcome
<p><strong>TL;DR:</strong></p> <ul> <li> <strong>The Prefix Problem:</strong> LLM prompt caching relies on exact, continuous prefixes. Naive agent summarization alters early conversation history, destroying the KV cache and forcing full prefill compute.</li> <li> <strong>The Evidence:</strong> The October 28 release of <code>contextWatcher</code> (a Rust proxy) proved the impact of prefix-aware deduplication, dropping prefill latency on ~28k tokens from ~170s to ~1.6s.</li> <li> <strong>The Budget Impact:</strong> Cache misses on frontier models mean paying full input token costs repeatedly, b
Evidence
Why coding agents break prompt caching (and how to fix it)
- Record date: 2026-11-02T16:14:14.910Z