Skip to content

Build1 publisher3 min readPublished

A top-level cache_control field moves the Claude cache breakpoint forward as the conversation grows

Anthropic's prompt caching docs describe an automatic mode that keeps the breakpoint on the last cacheable block of every request. The five-minute clock starts when the request starts, so generation time counts against it.

The Engineer · Build desk

Illustration accompanying A top-level cache_control field moves the Claude cache breakpoint forward as the conversation grows

What happened

  • Anthropic's Claude docs describe automatic prompt caching, where a single cache_control field at the top level of the request puts the breakpoint on the last cacheable block and moves it forward as the conversation grows.
  • Explicit block-level breakpoints remain available and can be combined with the automatic one, which consumes one of the four breakpoint slots a request is allowed.
  • A 1-hour TTL is available at 2x the base input token price by adding a ttl field to the cache_control object.
  • Both the automatic and the explicit form of prompt caching are supported on all active Claude models.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • decision Teams running marker-moving code in their agent loop now choose between deleting it and keeping explicit control, because the automatic breakpoint is placed server-side and its landing spot is not something the caller sets.
  • cost Agents whose responses stream for minutes pay either double the base input price for the hour-long TTL or the cost of recomputing the prefix on the next turn.
  • constraint Because reuse depends on the request prefix repeating, anything assembled per turn after the message history now governs whether automatic mode hits at all.
  • capability Three explicit slots survive alongside the automatic one, so a stable tools-and-system prefix can be pinned by hand while the moving breakpoint follows the history.

The code this removes is short and annoying. On each turn a wrapper walks the message list, strips the cache_control marker off the block that used to be last, and attaches it to the new one. Anthropic's docs describe the replacement in one line: "The cache breakpoint automatically moves to the last cacheable block in each request, so you don't need to update any cache_control markers as the conversation grows" [3].

What the server does with that field is prefix matching. It checks whether the prefix up to the breakpoint is already cached from a recent query, uses the cached copy if it finds one, and otherwise processes the full prompt and caches the prefix once the response begins [5]. In automatic mode the cached span is everything up to and including the last cacheable block, and reuse happens on later requests carrying the same prefix [4].

The same-prefix condition is the thing to test before deleting the wrapper. An agent loop that appends a timestamp, a budget note, or a freshly retrieved document after the history changes the tail of every request. The docs do not say whether the system falls back to a shorter cached prefix when the last block changes, so the second turn's usage output is the only evidence available; the documented example prints response.usage [17].

The clock will surprise teams porting from explicit markers. The default lifetime is five minutes and a read refreshes it for no extra cost [6], but it runs from the start of the request that writes or reads the entry, not the end of the response, and generation time counts against it [7]. The docs give the case directly: a response that takes 4 minutes to stream leaves about 1 minute for a follow-up on the same prefix to start [8]. An agent that streams long plans or large diffs misses on turn two while doing nothing wrong. The documented alternative is a 1-hour TTL at 2x the base input token price [9], which is twelve times the default window [10].

Combining still works. The automatic breakpoint consumes one of the four available breakpoint slots [11], which leaves three [12] for pinning tool definitions and a system prompt explicitly while the automatic point tracks the growing history.

One caution on price. The footnote multipliers cover hits and refreshes, and only those: 0.025x base input on Claude Fable 5.1 and Claude Mythos 5.1, and 0.1x on every other model [13], a quarter of the standard rate for those two [14]. Automatic mode writes a new, longer entry on each turn.

The worked example in the docs is a literary-analysis system prompt and a request to analyze the major themes in Pride and Prejudice, on claude-opus-5 [16].

What to watch

  • Whether the docs state what happens when the last cacheable block changes between requests, and whether a shorter cached prefix is still matched.
  • Whether the per-model pricing table publishes a write multiplier to sit beside the 0.1x and 0.025x figures for hits and refreshes.
  • Whether the SDKs expose which block the automatic breakpoint landed on, rather than leaving it to be inferred from usage counts.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories