75% Cheaper Cache Reads: Why Long-Running Agent Costs Now Depend on Prefix Stability

Anthropic's Fable 5.1 reduces cache read pricing from $1 to $0.25 per million tokens, shifting long-running agent cost bottlenecks from output to repeated stable prefix reads, making prefix stability, cache breakpoint placement, TTL tuning, and hit-rate observability critical architectural levers for cost control.

Architecture Development Notes
Architecture Development Notes
Architecture Development Notes
75% Cheaper Cache Reads: Why Long-Running Agent Costs Now Depend on Prefix Stability

Long-Running Task Costs Are Dominated by Read Volume

In a multi-hour agent session, the bill is often driven not by output tokens (Fable 5.1 charges $50 per million output, $10 per million input) but by the stable prefix — system prompt, tool definitions, repository summary — that gets re-read every turn. A 150k-token stable prefix repeated over 300 tool-call rounds totals 45 million cached read tokens. At the old $1 per million cache-read price that segment alone cost $45; at the new $0.25 it drops to $11.25, while per-round output of a few hundred tokens remains negligible.

Anthropic cut the cache-read price from $1.00 to $0.25 in early September 2026 (input stays $10, output $50). Cache reads fell from 10% of input price to 2.5%. Typical workloads see ~25% total cost reduction; highly agentic workloads up to ~45%. This price shift changes the shape of the long-task cost model and therefore which architectural decisions actually save money.

Read Volume Is Determined by Stable Prefix Size and Turn Count

A cached multi-turn call splits the bill into three parts: prefix before the breakpoint (cache-read price), newly written prefix after the breakpoint (cache-write price), and fresh input/output (regular prices). For a tool loop with hundreds of thousands of tokens where almost all is repeated history, writes and fresh input are tiny; reads dominate.

Read volume grows with two factors: stable prefix size and number of turns. Turn count is a double penalty: each extra turn adds one more read of the stable prefix, and also makes every subsequent turn read a longer history (each turn adds ~2k new history tokens). By turn N the cache prefix for that turn is roughly "stable prefix + N×2k". Cumulative read volume across the session equals stable_prefix × N plus a quadratic history term. Therefore reducing turns, shrinking the stable prefix, and improving hit rate are the three levers — but turn count is often underestimated because it acts as both multiplier and addend in the cost formula.

Cache Is a Prefix Hash, Not a Key-Value Store

The cache works by prefix matching: a cache_control marker defines a breakpoint; the server caches the complete prefix up to that point and matches via prefix hash. Any byte change before the breakpoint causes a miss, forcing a full-price rewrite of the prefix on the next request.

This mechanism turns two engineering problems into cost problems:

Volatile content mixed into the prefix. Common mistake: embedding current timestamp, random IDs, or session state into the system prompt before the breakpoint. Since these change every turn, the hash differs every time and the cache never hits. Fix: move all volatile content after the breakpoint; place the breakpoint at the end of the stable zone.

Mid-session mutation of the stable zone. The most subtle cache invalidation source for long tasks is tool definitions. Changing any tool's schema invalidates the entire prefix cache (system + messages) because the model's capability surface changes, making prior conversation semantically unreliable. A two-hour session that patches a parameter error in a tool definition forces a full prefix rebuild at write price on the next turn.

Tool definitions must be governed as immutable assets. Add new capabilities via new tools; never mutate existing tool schemas. Treat tool schemas like published API fields: version them, but don't alter live fields. Byte-level stability of tool schemas is the foundation of cache hit rates.

Auto-Cache Mode Has a Zero-Hit-Rate Trap

Claude's automatic cache mode moves the breakpoint forward as the conversation grows, writing only the new tail each turn — standard for tool-call loops. However, for a "static prefix + per-request variable tail" architecture (e.g., a stateless request handler that rebuilds a long system prompt plus a fresh user message each call), auto mode places the breakpoint on the ever-changing user message. The prefix hash differs every request, yielding permanent misses.

This pattern is common in server-side agents. The fix is an explicit breakpoint: put cache_control at the end of the stable zone so variable input stays after it. Detect the trap by checking usage: if cache_read_input_tokens stays zero while cache_creation_input_tokens is large every turn, the prefix is drifting.

Fan-Out and Sub-Agents Are Cache Antagonists

Parallel sub-agents conflict with caching in two ways:

Timing. A cache entry becomes usable only after the first request's response starts. Simultaneous parallel requests sharing a large prefix will mostly miss and pay to rebuild the cache. To capture cache benefits, either send a warm-up request first ( max_tokens=0, non-streaming, no forced tool choice) and wait for its response before fanning out, or accept the first batch's write cost.

Scale. Fable 5.1's minimum cacheable prefix is 512 tokens; shorter prefixes aren't cached. More commonly, many short-lived sub-agents each carry a small independent context, eliminating the shared-prefix advantage. This is the opposite of a single long-lived agent reusing one large cached prefix. Architectural judgment: if sub-tasks truly have independent contexts, splitting incurs no extra loss; but if all sub-tasks depend on the same large context (same codebase, same business rules), fanning out into N independent requests replicates the prefix N times. Prefer shared-context serial or semi-parallel execution over blind fan-out.

TTL Must Match Inter-Turn Intervals

Default cache TTL is 5 minutes, refreshed free on each hit. But long tasks often have slow tool executions or human approval gaps exceeding 5 minutes, causing expiry and full-price rebuild on the next turn.

For such tasks, the outermost breakpoint should use a 1-hour TTL and be placed early in the request — 1-hour entries must precede 5-minute entries in the same request. The 1-hour TTL write price is 1.6× the 5-minute write price, but a single cross-gap rebuild costs far more than that delta. Conversely, high-frequency, second-level intervals need only the 5-minute TTL; paying for longer TTL is wasteful.

Feed Usage into Observability to Make Hit Rate Auditable

Step one isn't code changes — it's making cache hit rate an observable metric. Each response's usage object provides cache_read_input_tokens, cache_creation_input_tokens, and input_tokens, which directly reveal the call's cache behavior. Healthy long sessions show read far exceeding creation; a sudden creation spike without new tools or system changes signals prefix drift worth investigating.

usage = response.usage
read = usage.cache_read_input_tokens or 0
created = usage.cache_creation_input_tokens or 0
fresh = usage.input_tokens or 0
total = read + created + fresh

hit_rate = read / total if total else 0
# hit rate drops and created spikes -> prefix drift or misplaced breakpoint

Further, add byte-level verification of the stable zone in the release pipeline: hash the concatenated system text, skill list, and tool schemas at startup or in CI. A hash change means someone modified the stable zone outside the change process — treat it as a review-required change, not a silent event.

Cost per Completed Task, Not per Token

The price drop creates a counter-intuitive pricing landscape: Fable 5.1's input price is double Opus 5's ($10 vs $5), yet its cache-read price is half ($0.25 vs $0.50). For read-heavy workloads, Fable 5.1's per-turn cost can be lower than Opus 5's. Selecting models by per-token price alone yields wrong conclusions for these loads.

The correct metric is "cost per completed task": combine task completion rate, average turns, and per-turn token consumption. A model with higher per-token price but higher completion rate and fewer human interventions may be cheaper when amortized over finished tasks. Cache price reductions amplify this effect — the more a prefix is reused, the smaller the high-price model's cost disadvantage.

For agent platform and LLM application architecture teams, this price change reorders priorities. Context layout now deserves to be designed like a cost structure: treat the stable prefix as an immutable asset, include breakpoint placement in code review, and put cache hit rate on the monitoring dashboard. Cache unit prices will only keep falling, but the architectural constraint of "prefix stability" will not change. Governing tool definition and system prompt change processes early is far cheaper than cleaning up ballooning bills later.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

observabilitycache optimizationcontext managementAnthropicAI agent architectureprefix cachingFable 5.1LLM cost management
Architecture Development Notes
Written by

Architecture Development Notes

Focused on architecture design, technology trend analysis, and practical development experience sharing.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.