Reddit
Claude Code Has Two Cache Bugs That Silently 10-20x API Costs — Reverse-Engineered Root Cause Published
A developer reverse-engineered the Claude Code standalone binary (228MB ELF, using Ghidra + MITM proxy + radare2) and identified two independent bugs causing prompt cache to break silently, inflating API costs by 10-20x. One bug involves non-deterministic tool definition ordering causing cache misses; the other involves system prompt mutations that invalidate cached prefixes. At standard rates, cached tokens cost 10% of regular input tokens — so a broken cache on 100K+ token contexts produces massive cost spikes with no user-visible warning. Reddit: r/ClaudeAI (255↑, 38 comments).
Source
↳ Follow the thread