Claude Code --resume bug busts prompt cache, re-writing 385k tokens per session resume

vvasic · ghdev · 2026-09-11

Claude Code issue #93490 (reproduced, macOS): every --resume re-writes the whole conversation into the prompt cache — cacheread stays flat at the tools+system floor. Packet-capture diffing shows the first mismatch is messages[1]: the SessionStart hook / Environment system message, serialized as a plain string on resume instead of the original content blocks with cachecontrol, breaking the byte-for-byte prefix match. Impact: 18-25k tokens rewritten on small probes, 385k on a real long-session fork (27k read, 385k written). Two fresh launches 30s apart hit each other's cache perfectly, proving the client can produce a stable prefix — the resume path just doesn't. Likely root cause of related issues #91971 and #83901.

Original post →

More from coding & agent

coding & agent channel →