Cache price beats input price for coding agents: one Sonnet miss costs as much as 25 hits
zitoliv · reddit · 2026-11-03
An agent resends the whole session every turn — 100K context over 50 turns means 5M input tokens, almost all repeated history. So the cache read price and hit rate, not the headline input price, determine your bill:
- Claude Sonnet 5.5: $10 uncached vs $0.50 cached (20x)
- DeepSeek V4.1 Flash official API: $1.50 vs $0.03 (50x, half off-peak)
- A miss is expensive: on Sonnet a 100K turn costs $0.25 on a cache write vs $0.01 on a hit — one miss equals 25 hits
Common miss causes: switching providers mid-session (cache only hits where it was written), idle timeouts (5 min default on Anthropic's API, 1h in parts of Claude Code subscriptions), and editing anything early in the prompt (system prompt, AGENTS.md), which forces full-price re-reads of everything after it.
Advice: pin your provider, keep sessions short, keep the prompt start stable. An accompanying chart visualizes accumulated cacheable history and per-model costs using official Nov 2026 API prices.
More from coding & agent
- Open-source AI Xianyu monitor with Playwright + LLMs hits 16k GitHub stars — Usagi-org · 2026-11-03
- Developer kicks off a Worms remake built with AI coding tools — ilumine_ai · 2026-11-03
- Creator hires an AI employee 'Viktor' in Slack to fix Claude's teamwork gap — rubenhassid · 2026-11-03
- Surrogate Inference Engine Accused of License-Washing Open-Source Project NInfer — teortaxesTex · 2026-11-03
- FDE tutorial series: turning client business requirements into measurable technical specs — Affectionate_Slip654 · 2026-11-03
- Vibe coding that works: build on solid ground, not the whole stack — springrod · 2026-11-03