Making Agents Cheaper and Faster in Late 2026: Prompt Caching Changes, Compaction APIs, Tool Retrieval and Off-Peak Tiers
Between September and November 2026 Anthropic, OpenAI and Google changed cache pricing and lifetimes, turned compaction into an API, added on-demand tool loading and launched discounted tiers for work that can wait. What each lever does for an agent's bill and latency, and how to use them without breaking the cache.
BY AIAGENTINTERVIEWS EDITORIAL · EDITORIAL TEAM · UPDATED NOVEMBER 24, 2026 · 8 MIN READ
PRACTICE THIS:Agent optimisation topic ·Sizing an agent system
An agent's bill is dominated by one thing: every step resends the conversation so far. The levers that cut it are well known (cache the stable part, shrink the rest, send fewer tool definitions, run work that can wait at a cheaper rate), and between late September and late November 2026 all three major model providers changed how those levers work. Cache prices and lifetimes moved, compaction became an API call, tools can be loaded on demand, and discounted tiers for patient work arrived on two platforms.
This article goes through the changes lever by lever, with the arithmetic for when caching pays and the habits that keep the cache from silently breaking. Everything is at the API level; prices and features were checked against each provider's release notes and changelogs on 24 November 2026 and differ by model.
What changed, by date
| Date | Provider | Change |
|---|---|---|
| 14 Sep | Anthropic | Compaction on demand (beta): the API returns a signed compaction block to send in place of older messages |
| 22 Sep | Anthropic | Inline tools (beta): add or change tools mid-conversation without invalidating the prompt cache |
| 23 Sep | Anthropic | Cache diagnostics generally available |
| 7 Oct | Anthropic | Sonnet 5.5 cache reads cut to 0.10 dollars per million tokens, 5% of the base input price |
| 20 Oct | OpenAI | 12-hour prompt caching; cache writes at 2.5 times the input price |
| 30 Oct | OpenAI | Agents API: background compaction on by default; sessions can replace their tool list |
| 2 Nov | Anthropic | Message threads (beta): the server keeps the conversation and later requests send only new messages |
| 9 Nov | Anthropic | Fable 5.2 at 8 / 40 dollars per million input / output tokens; fast mode up to 2.5 times output speed at double price |
| 12 Nov | Gemini 4 Hydrogen: implicit caching on by default for shared prefixes of 4,096 tokens or more; writes billed at 1.25 times input | |
| 16 Nov | Deferred tier GA: 50% off model inference for work that can wait up to a 24-hour target | |
| 17 Nov | OpenAI | Two-hour and eight-hour background windows at 30% and 40% lower token rates (beta); new models will not support Flex processing |
| 18 Nov | Slice documents, spreadsheets, audio and video in prompts and pay only for the selected part | |
| 19 Nov | Tool retrieval (preview): defer_loading on tools plus a tool_search tool |
Lever 1: cache the stable prefix, and keep it stable
Prompt caching charges a premium to write a prefix into the cache and a large discount to read it back. Whether it pays depends on how often the prefix is reused before it expires, and this autumn's changes moved both sides: reads got cheaper on some models, lifetimes got longer on others, and longer lifetimes came with pricier writes.
The break-even is simple to compute. Without caching, a prefix is paid at full price on every call. With caching, it is paid once at the write multiplier and then at the read multiplier on each reuse:
import math
def break_even_reads(write_mult, read_mult):
return math.ceil((write_mult - 1) / (1 - read_mult))
def twelve_calls(prefix, price, write_mult=None, read_mult=None):
unit = prefix * price / 1e6
if write_mult is None:
return round(12 * unit, 4)
return round(unit * (write_mult + 11 * read_mult), 4)
print(break_even_reads(1.25, 0.05), break_even_reads(2.5, 0.05))
# => 1 2
print(twelve_calls(8000, 2.0), twelve_calls(8000, 2.0, 1.25, 0.05),
twelve_calls(8000, 2.0, 2.5, 0.05))
# => 0.192 0.0288 0.0488
With a 1.25 times write and a 5% read, one reuse pays for the cache; with a 2.5 times write, two do. For an agent that makes twelve calls with the same 8,000-token prefix priced (for illustration) at 2 dollars for each million input tokens, caching cuts the prefix cost from about 19 cents to 3 or 5 cents depending on the write price. The multipliers here follow the ratios the providers state for particular models; check the model you use.
Caching only works if the prefix stays byte-for-byte identical, and agents break it constantly by accident. Three of this autumn's changes exist to stop that:
- Changing tools. Editing the tool list used to invalidate everything after it. Anthropic's inline tools add or change tools through a mid-conversation system message instead, and OpenAI's Agents API sessions can now replace their tool list.
- Changing instructions. Google's ADK 2.15 turned on dynamic instruction routing by default so that the static part of the instructions stays cacheable while the dynamic part moves later.
- Editing history. On Fable 5.2, editing the system prompt, tools or earlier messages and then replaying a thinking block now returns an error. Treat earlier turns as append-only.
The rule underneath: put what never changes first (instructions, tool definitions, reference material), what changes per task next, and what changes per step last. Then measure. Anthropic's cache diagnostics, and the cache hit rates that Langfuse and LangSmith now show on traces, tell you whether the cache is actually being hit.
Lever 2: compaction, now an API
When an agent runs long enough, its history outgrows the context window, and every step pays for all of it. Compaction replaces old turns with a summary. This autumn it moved from something each harness did its own way into the APIs. Anthropic's compaction on demand returns a signed compaction block that you send in place of the messages it summarises, optionally keeping recent turns verbatim. OpenAI's Agents API runs compaction in the background by default since 30 October; its changelog warns this may increase token usage, and you can make it blocking instead.
Compaction trades cost for memory. A summary that drops an order number or a decision causes exactly the failures that are hardest to debug, because the agent confidently works from what it no longer has. Two habits help: keep identifiers, decisions and open tasks out of the summarised region (write them to structured state the agent re-reads), and record each compaction in your traces so a forgotten fact can be traced to the moment it was summarised away. The OpenTelemetry GenAI conventions added an attribute for exactly that in v0.1.0.
Lever 3: send fewer tool definitions
Tool definitions are input tokens on every call, and an agent with a hundred tools pays for all hundred at every step while choosing worse among them. Google's tool retrieval, in preview since 19 November, keeps tools marked defer_loading out of the prompt and gives the model a tool_search tool to find and load the schemas it needs; remote MCP servers can defer too. Anthropic's inline tools give a related pattern: start with a small set and add tools when the task calls for them, without breaking the cache. Either way the design goal is the same: a small, stable core of tools in the prefix, and the long tail loaded on demand.
Lever 4: run patient work at a discount
A lot of agent work has no one waiting on it: nightly reports, bulk document review, evaluation runs, back-office reconciliation. Two new tiers price that. Google's deferred tier (GA 16 November) queues latency-tolerant work at half price on model inference, with a 24-hour target window, seven days of state retention and no fallback to standard pricing; ADK agents opt in through their run configuration. OpenAI added two-hour and eight-hour background windows on 17 November at 30% and 40% below standard rates, in beta, and said new models will not support its older Flex processing.
The engineering question is what happens to a run that sits in a queue for hours: its credentials may expire, the data it reads may change, and the person who asked for it needs to know it is coming. Design deferred agents as durable jobs with a status page, not as slow requests.
Lever 5: pay for speed only where it shows
The opposite trade also got cheaper to make. Anthropic's fast mode on Fable 5.2 offers up to 2.5 times output speed at double the price, and OpenAI offers an Ultrafast mode on some models. Use them on the step a person is waiting for, typically the final answer in an interactive session, and nowhere else. An agent that runs its planning, tool calls and final answer all in fast mode pays the premium on steps nobody watches.
Lever 6: send less over the wire
Two smaller changes reduce what you send rather than what the model reads. Anthropic's message threads (beta) keep the conversation on the server, so later requests send only new messages; threads expire five minutes after the last request, so this suits active sessions, and you should check how it is billed for your model. Google's slicing lets a prompt or function response reference part of a document, spreadsheet, audio or video file, and you pay only for that part.
Measure before and after
Three numbers tell you whether any of this worked: cache hit rate per agent and step, model calls and tool calls per run (the new OpenTelemetry metrics count both), and cost per successful task, which is the number the business sees. Our lesson on sizing an agent system shows how history growth dominates the bill; caching, compaction and fewer tools are the three ways to attack it.
What this means in an interview
"This agent costs too much. What do you do?" is a standard optimisation question, and the strong answer is ordered: measure where tokens go per step; make the prefix stable and cached, and confirm the hit rate; compact or externalise history, keeping identifiers in structured state; load tools on demand; move patient work to a deferred tier; and pay for speed only on the step a person waits for. Mentioning that cache writes cost more than ordinary input, so caching pays only with reuse, marks someone who has actually read a pricing page.
Sources
Checked 24 November 2026:
- Claude Developer Platform API release notes (14 September to 9 November 2026), platform.claude.com/docs
- OpenAI API changelog (20 October to 17 November 2026), developers.openai.com/api/docs/changelog
- Gemini API changelog (12 to 19 November 2026), aistudio.google.com/docs/changelog
- Gemini Enterprise Agent Platform release notes (deferred tier, 16 November 2026), docs.cloud.google.com
- google/adk-python v2.15.0 release notes, github.com
Where this post leads in the curriculum: lessons and interview questions:
FAQ
OpenAI added 12-hour prompt caching on 20 October 2026; cache writes for it cost 2.5 times the input token price. Check the model's pricing page, because cache prices differ by model.