3 people reported
All time, since Sep 22, including 1 thumbs-up on GitHub.
Prompt cache misses after system message
“Every turn rewrites the whole conversation prefix.”
Is this your bug? What gets counted gets fixed. Pile on.
Paste this into your agent. It files your report, with your error and version.
I hit this bug: rapsheet.dev/sheets/claude-code/issues/1663/file Follow it to file my report. Show me the text before you send.
No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends
Prompt cache misses after trailing role:system message breakpoint. Each turn re-writes the conversation prefix when hook output, resume, or the total_tokens reminder appends a system message after the user message.
Is this your bug?
File my report- Where
- prompt caching
- Error text
"diagnostics": {"cache_miss_reason": {"type": "messages_changed", "cache_missed_input_tokens": 12016}}- Versions
- 2.1.280
- Platforms
- macOS
- How bad
- Breaks a normal workflow.
Part of: Prompt cache misses and re-writes11 bugs
- Interactive sessions get 5m cache TTL18 people
- Sleep re-sends full agent context4 people
- Warm prompt cache fully missed2 people
- Resume re-writes prompt cache3 people
- CLAUDE.md cache not shared3 people
- Cross-session prompt cache misses2 people
- Subagent prompt cache expires2 people
- Background agent summary requests12 people
- Context after prompt breaks cache4 people
- Subagent resume cache miss4 people
Original reports2, newest first
- Prompt cache never hits after a mid-conversation
role:"system"message (resume and hook output), Opus 5.x / Fable#96998 - Cache entry written with its breakpoint on a trailing
role: systemmessage is never reused — with the per-user-turn<total_tokens>reminder on, every tool-less turn re-writes the whole conversation (likely also the root cause of #93490)#96101