🌍 Dev.to
Claude Prompt Caching: Why Agent Loops Miss the 20-Block Lookback
Your agent starts a run with cache_read_input_tokens at 40K and climbing. Twelve tool calls later, reads drop to zero and cache_creation_input_tokens jumps to the full conversation length — on every single turn. Nothing in your prompt changed. No timestamp, no reordered tool, no model switch. The prefix is byte-identical.
You just hit the 20-block lookback window, and it is the single most expensive thing about Claude prompt caching that nobody puts in their retro.
TL;DR
...












