Production agents

Prompt caching and token budgets in production Claude

Prompt caching cuts Claude spend when the stable prefix is actually stable. Here is how we set cache breakpoints, ceilings, and evals so cost is a number, not a surprise.

July 13, 2026/2 min read/Claude Certified Engineers

Prompt caching on Claude is a billed reuse of a stable prompt prefix. It is the difference between a forecastable bill and a 3.4x overrun on agent systems built without it. Caching is not a checkbox in the API console. It is a design choice about what is allowed to change per call.

We measure this in week one of a build, on the same eval harness that scores quality. Cost without quality is a cheaper demo. Quality without a ceiling is a surprise in month two.

What to put below the cache line

Stable:

  • System policy and refusal rules.
  • Tool JSON Schema.
  • The static header of a retrieved corpus, if it is truly static.

Unstable, keep out of the prefix:

  • The current user turn.
  • Per-request timestamps and request ids.
  • The full rolling transcript if you can summarize instead.

If you shuffle tool order or interpolate "today's date" into the system prompt, you do not have a cache. You have a hope.

Ceilings belong in the brief

Write a number. Median tokens per successful job. p95 latency. Max round-trips. When a prompt change blows the ceiling, CI fails the same way a safety case fails.

Context bloat is usually retrieval and retries, not "Claude got worse." Fix the retrieval contract. Add guardrails so injection cannot force the agent to pull the entire wiki into context.

If the bill is already a surprise, a Claude Readiness Audit will baseline spend and show you which prefix is busting the cache.

Questions

What is prompt caching on Claude?
A way to reuse a stable prefix of the prompt across calls so you do not pay full price for the same system prompt, tools, and policy on every turn. It only helps if that prefix actually stays put.
Why does caching miss in production?
The prefix changes: a timestamp in the system prompt, a shuffled tool list, or a growing transcript stuffed above the cache breakpoint. Tiny diffs bust the cache.
How do we know spend is under control?
Log tokens, cache hits, and round-trips per case. Fail the eval when median tokens or p95 latency exceed the budget you sold internally.

Keep reading

Hiring certified engineers

Six weeks to a production Claude agent

Prototype by week two, live traffic by week six. Here is the path we run on a Production Agent Build, and what has to be true on day zero or the calendar is fiction.

August 24, 2026/3 min read