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

  1. Interactive sessions get 5m cache TTL18 people
  2. Sleep re-sends full agent context4 people
  3. Warm prompt cache fully missed2 people
  4. Resume re-writes prompt cache3 people
  5. CLAUDE.md cache not shared3 people
  6. Cross-session prompt cache misses2 people
  7. Subagent prompt cache expires2 people
  8. Background agent summary requests12 people
  9. Context after prompt breaks cache4 people
  10. Subagent resume cache miss4 people

Original reports2, newest first

  1. Prompt cache never hits after a mid-conversation role:"system" message (resume and hook output), Opus 5.x / Fable#96998
  2. Cache entry written with its breakpoint on a trailing role: system message 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

Do you work on Claude Code?

Claim its RAP Sheet to see what your users report and answer them in one place.