You enabled prompt caching on Claude, but your invoice didn't drop. In fact, it likely went up. If your usage block shows cache_read_input_tokens at zero, you are paying a premium to write to a cache that nobody is reading. This isn't a bug; it's a silent configuration failure that Anthropic's documentation explicitly warns about. A recent deep dive from DEV.to, cross-referenced with Anthropic's official docs as of November 30, 2026, outlines six specific reasons this happens and how to fix each one before your budget bleeds out on phantom writes.

The Economics of a Missed Hit

The mental model for Claude's cache is a bookmark in a book. It only works if every page before the bookmark is identical to the last time you read it. If you change a single word in the prefix, the bookmark is useless, and the system has to start from the top. The pricing structure makes this critical: a cache write with a 5-minute TTL costs 1.25x the base input price, while a 1-hour TTL costs 2x. Conversely, a cache read is only 0.1x (or less on newer models like Opus 5.5). Therefore, a cache that always misses costs you 25% more than doing nothing. There is no neutral outcome; you are either saving significantly or losing 25%.

Cause 1: The Changing Prefix Trap

The most common failure is placing the cache breakpoint after dynamic content. If your system prompt includes a timestamp, request ID, or user name near the top, the prefix changes on every call. Anthropic's docs state that hits require "100 percent identical prompt segments, including all text and images up to and including the block marked with cache control." The fix is simple: order your prompt by volatility. Place static instructions first, apply the cache_control breakpoint to the last stable block, and put all changing contentβ€”like the current timeβ€”after the breakpoint. This ensures the prefix remains identical across requests.

Cause 2: Automatic Caching Misconfiguration

Developers often rely on automatic caching, which applies a breakpoint to the last cacheable block. This works well for growing chat histories but fails for single-shot prompts where the tail changes frequently. In these cases, automatic caching hits the same prefix-change problem as Cause 1. You must use an explicit breakpoint on the last stable block instead. Additionally, note that on Amazon Bedrock, using a top-level cache_control field returns a 400 error, requiring a different structural approach for AWS users.

Cause 3: Minimum Token Thresholds

Caching silently fails if your prompt is too short, and it does not return an error. You just see zeros in your usage logs. The minimums vary by model: 512 tokens for most modern Claude models (Opus 5.5, Sonnet 5.5, Haiku 5.5), 1,024 tokens for older Opus and Sonnet versions, 2,048 tokens for Mythos Preview and Opus 4.7, and 4,096 tokens for some legacy Haiku and Opus variants. A common trap is testing on one model and routing cheap traffic to an older Haiku, where a 3,000-token prompt silently stops caching because it falls below the 4,096-token threshold for that specific version.

Cause 4: Upstream Invalidation and JSON Instability

Cache prefixes are built in a strict order: tools, then system, then messages. A change at any level invalidates that level and all subsequent levels. For example, changing tool definitions invalidates the entire cache chain. This is exacerbated by language-specific JSON serialization quirks; the docs warn that Swift and Go may randomize key order during JSON conversion, breaking caches on tool_use blocks. To fix this, keep tool definitions fixed and sorted, and ensure stable key ordering in your JSON serialization logic.

Cause 5: The 20-Position Lookback Limit

When a request arrives, the system looks backward from each breakpoint for an earlier cache entry, but it checks at most 20 positions. In long agent loops with many tool calls, a single turn can add more than 20 blocks, pushing your breakpoint outside the lookback window. The solution is to add a second breakpoint earlier in the conversation so a write lands there before you need it. You can define up to 4 breakpoints per request, and consecutive tool_use or tool_result blocks count as a single position, helping you stay within the limit.

Cause 6: Timing and Parallel Fan-Out

The default cache lifetime is 5 minutes, refreshed on use. If your job runs every 10 minutes, it will always miss. You must pay the 2x write cost to use the 1-hour TTL. Furthermore, parallel fan-out causes misses because a cache entry only becomes available after the first response starts. If you fire 20 requests simultaneously with the same prefix, they all miss. Send one request, wait for its response to start, then send the rest. Also, remember that caches are isolated per workspace; staging traffic will not warm the production cache.

Key Takeaways

  • Log Your Metrics: Monitor cache_read_input_tokens and cache_creation_input_tokens on every call. A zero read count means you are paying a 25% surcharge for nothing.
  • Order by Volatility: Structure prompts as tools, stable system text, breakpoint, then per-request content.
  • Check Model Minimums: Verify the token threshold for your specific model version; short prompts skip caching silently.
  • Stabilize JSON: Ensure stable key ordering and fixed tool definitions to prevent upstream invalidation.
  • Manage Lookback: In long agent loops, use multiple breakpoints to stay within the 20-position lookback window.
  • Warm the Cache: For parallel requests, send one first to populate the cache before firing the rest.

The Bottom Line

Prompt caching is not a passive feature; it is an active optimization that demands precise configuration. If you are not monitoring cache_read_input_tokens, you are likely subsidizing Anthropic's infrastructure with a 25% surcharge for zero benefit.