Claude Code re-bills a finished sub-agent's whole context on follow-up, wasting quota
Schadz · reddit · 2026-09-16
A Reddit user diagnosed a Claude Code quota anomaly: when you send a follow-up to a finished sub-agent, Claude Code rebuilds its conversation in a way the prompt cache doesn't recognize (messageschanged), re-writing nearly the agent's entire context at expensive cache-write rates. In tests, two resumed agents wrote 243K and 399K tokens back to cache, versus only 2K-4K per message while agents were still running.
Key findings:
- The miss happens inside the 1-hour cache window, so it's not expiry; the API explicitly reports messageschanged
- Comparing request sizes shows the changed content is the agent's thinking: 312,205 tokens dropped to 259,599, matching exactly 53,084 thinking tokens (within 0.07%)
- Sub-agents with thinking always miss on resume; agents with no thinking got a full cache hit
- The shape resembles Anthropic's April 23 postmortem about a client-side change that cleared thinking on idle sessions
The author has filed the issue with Anthropic and urges affected users to check their own usage.
More from coding & agent
- New Evals Compare Success Rates of Public MCP Servers vs Merge — shensi · 2026-09-16
- Success Rates of Public MCP Servers Benchmark Against Merged Results — shensi · 2026-09-16
- Training Agents video series complete: 6 videos, 8 hours from SFT to RL environments — SergioPaniego · 2026-09-16
- How do you cap an AI agent's API spend across multiple vendors? — apyhubnico · 2026-09-16
- Sistava launches AI employee platform for business workflows, plans from $25/mo — Mahmoud_Zalt · 2026-09-16
- Multi-turn agent RL training at scale on HF Hub: 9,523 sandboxes in 14h, zero crashes — vanstriendaniel · 2026-09-16