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
- OpenAI opens up agent sandboxes: BYO or pick from Cloudflare, E2B, Modal, Vercel and more — threepointone · 2026-09-11
- SocialCrawl MCP lets agents search Reddit, YouTube, TikTok, X with one API key — dooddyman · 2026-09-11
- Astra builds a surprisingly polished Catan game in three.js, reusing past UI and 3D assets — FinanceYF5 · 2026-09-11
- Open-Source Tool Highlights the Exact PDF Paragraphs Behind AI Answers — Flat-Phone-1596 · 2026-09-11
- OpenAI Codex may issue another usage reset this weekend, says Codex lead resets happen — umesh_ai · 2026-09-11
- Dev swaps gemini-3.8 for gemini-3.5-flash-lite in his MCP harness at a fraction of cost — julianharris · 2026-09-11