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.
More from coding & agent
- One-person companies are about the org chart, not headcount: humans judge, agents execute — ciguleva · 2026-10-28
- OATs: open-source toolkit turns everyday objects into personality-bearing agents — Stefania_druga · 2026-10-28
- Dev: local coding dropped from 100% to 5% in a year as cloud agents take over — bytebot · 2026-10-28
- Open-sourced 501(c)(FREE): agent-built free back office for US nonprofits — gralston · 2026-10-28
- Grok Bot 1.0.0 early build reveals Shared Bots, service accounts and team workflows — XFreeze · 2026-10-28
- Anne Griffin hosts 20-person SF salon on the product decisions behind AI agents — annetgriffin · 2026-10-28