Claude Prompt Cache TTL Gap Can Push the Next Turn Past Budget
A developer's write-up explains that Claude's prompt cache lifetime is measured from the start of the last request that touched it, so a slow approval step can leave the entry stale by the time the next call runs. The author argues that budget checks reusing the earlier cache-read price can approve a turn whose full prefix rewrite would exceed the balance. The proposed fix is to price the exact next request as a full rewrite of the cacheable prefix plus uncached input and capped output, and admit the turn only if the balance covers that reserve. The analysis cites a Requesty study of coding-agent pauses that found large token prompts often miss the cache after gaps of 5 to 30 minutes. The experiment was synthetic, run offline on Sonnet 5.5 pricing, and compared a full-hit scenario of $0.034 against a $0.514 reserve on a $0.10 balance.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in