Imagine a blacksmith stepping away from a hot forge. Keeping it warm costs fuel, but if they're coming back soon, that can be cheaper than letting it cool and heating it all over again.
An AI agent can face a similar tradeoff while it waits for you to approve a patch. Sending even a dummy request during the pause can keep its saved work available, so continuing after you click approve can cost less than starting cold :).
A July study tested this across several model APIs and found that keeping a cache warm could make the request after a pause substantially cheaper. Whether the whole session costs less depends on how long the pause lasts and what the extra requests cost.
Contents
What the model can reuse
Take a coding agent fixing a bug. It might get the patch right on the first try, or go through five rounds of reading code, running tests, and trying again. The developer pays for those attempts, even though much of what the agent sends to the model stays the same. On the next call, it might send all the same instructions and code files, with just a new test result attached. That's a lot of work we've already done once. Can we keep some of it around?
To see what we can save, it helps to look at the two kinds of work involved in a model call. First, the system processes the input, called prefill. Then it generates the answer, called decode. As an attention-based model processes the tokens, it creates numerical representations called keys and values that it uses to consult earlier context. Keeping those calculations in a KV cache lets it use them again.
So when our agent returns with a new test result, a serving system can reuse the calculations for the unchanged beginning of the prompt, or prefix, if it still has compatible cached state. It still processes the new input and generates a fresh answer, but it can save the work of calculating that shared prefix again.

How much of that saving reaches the developer's wallet depends on the provider's pricing and, if you're using an application, how it bills you. Anthropic charges different rates for cache writes and reads, and reading a cached prefix refreshes its lifetime. That brings us back to the extra requests in the opening. A call during the pause can keep those calculations available for when the agent gets back to work.
Your app saved money. Did you?
If we're using Cursor, the saving has to pass through another bill. Cursor lists separate cache-read rates for third-party models, so a cache hit can reduce usage charges. It won't lower a fixed subscription fee, though, and the benefit within an included allowance depends on how the plan counts usage. Some plans also add an application charge to cached tokens.
A few unintuitive things follow
Once you start accounting for that ‘already done’ work, some familiar ways of saving money become less straightforward.
Sending fewer tokens can cost more
Say we try to save money by dropping older messages from our coding agent’s conversation. That gives us a shorter prompt, but it can also change the prefix we were reusing. Now the model has to calculate it again. In one coding-agent study, removing older messages cut prompt volume by a third, but more than doubled estimated GPU energy use. The agent also fell short of the study's quality target.
The cheaper model starts with a cold cache
Maybe we leave the conversation alone and switch to a cheaper model instead. Our expensive model has designed the fix. Surely a cheaper one can summarize the test result? It might be perfectly capable of that job, but it hasn't done the work of processing the code the first model already saw.
The text can go to another model, but the KV cache depends on the original model's weights and architecture. The new model usually has to rebuild its own state. Researchers are exploring cache translation between related models, which doesn't yet make arbitrary switches free.
Consider just the recurring 100,000-token prefix in our agent's conversation. These illustrative rates isolate the shared input, excluding new instructions and output costs.
| Choice | Input rate for that prefix | Cost on the next request |
|---|---|---|
| Stay with the 'expensive' model, whose cache is warm | $0.20 per million cached tokens | 2 cents |
| Switch to a 'cheaper' model with no matching cache | $1 per million uncached tokens | 10 cents |
| Reuse the new model's cache on subsequent requests | $0.10 per million cached tokens | 1 cent |
In this example, staying costs 2 cents per call. Switching costs 10 cents on the first call, then 1 cent each time we reuse the new model's cache. We get that initial premium back on the ninth request. Whether switching is worth it depends on how much work remains, assuming the prefix stays reusable, the cache hits, and both models produce acceptable results.

This is why I'm skeptical of routing comparisons that price each call as if the conversation started from scratch.
Btw the same question comes up if we keep the model and change who serves it, which is called provider routing. Compatible deployments may reuse or transfer state if the system supports it, but changing providers doesn't automatically carry the cache across.
Remembering has a cost too
While our agent waits for a test suite or a person, its saved calculations (the KV stuff) can still occupy GPU memory. That space could serve another session. Keeping the cache helps our next call, but the provider has to decide whether that future saving is worth the memory it ties up now.
Where does the provider keep all that context? During GPU inference, the active KV state lives in GPU memory alongside the model's weights and other working data. Between calls, a system can retain it there, move it elsewhere, or discard it and recompute later.
| Where the cache is kept | What the operator trades off |
|---|---|
| GPU memory | Reuse is close to the computation, but retained state competes for space with other work. |
| CPU RAM | Offloading frees GPU memory. Reusing the state requires transferring it back. |
| Local SSD | More storage for retained context, with a disk read and transfer before reuse. |
| Remote or shared storage | Compatible serving instances can fetch retained state, with storage and network transfer costs. |
Retaining every conversation indefinitely would keep consuming resources somewhere.
Now consider where the next call goes. A provider can run several copies of the same model, each served by its own worker. A worker may use one GPU or a group of GPUs, depending on the model and deployment. Sending another request to the same model therefore leaves a choice of workers.
In this example, vLLM, an open-source inference engine, runs the model on each worker. NVIDIA Dynamo, a framework for coordinating inference across GPUs, routes requests between workers based on cache availability and load. LMCache is an optional open-source tool that manages and shares the KV cache across memory and storage (lol this is not sponsored).
On the first call, suppose neither worker has a matching cache and both have equal available capacity. The router sends our agent to worker 1, which creates the KV cache in its GPU memory. When the test result comes back, that cache can help with the second call. But worker 1 is now busy, while worker 2 has room and would have to process the code again. Which gets us an answer sooner?

The animation uses illustrative timings. A worker with the right cache can still keep you waiting if it's busy, so a router may weigh cache reuse against current load. Fetching compatible cached state from elsewhere is another option, but that transfer takes time too.
You're paying for the failures too
Caching can lower the cost of each attempt, but choosing a different model can also change how many attempts our coding agent needs. A model that's cheaper per call could leave us paying for more retries. So let's compare the total bill with the number of fixes that actually work.
Suppose we try two setups on the same 100 coding tasks with the same acceptance tests. Setup A spends $2 and solves 50 tasks. Setup B spends $3 and solves 90. Including spending on failed tasks, A costs 4 cents per verified success and B costs about 3.3 cents. B spends more overall but produces successful results more cheaply.

There's also a price on how soon you need the answer. A developer waiting for a patch needs a quick response, while a job reviewing hundreds of files overnight has more room to wait. For work that doesn't need an immediate answer, providers offer batch APIs with discounts of up to 50% compared with standard requests.
The provider's cost savings needn't match that discount.
Speaking of which…
Who keeps the savings?
We've been counting what the developer pays. The provider still has to pay for the machines, including capacity it keeps ready for busy periods. Caching, batching, and better serving software can reduce the cost of handling requests. How much of that saving can it keep before a competitor offers customers a lower price?
Together AI's November 4 compiler announcement gives a concrete example of the engineering involved. It describes agents continually testing optimizations as models, hardware, and traffic change. It shows why access to similar GPUs needn't produce identical operating costs. Together AI's research
More customers help if their traffic can use the same pool of machines at different times. That gets harder when customers need different models, private deployments, or particular regions, or when everyone's traffic peaks together.
Making inference cheaper doesn't guarantee the provider earns more. Competition might force it to cut prices faster than its costs fall.
Suppose a provider charges $1 to handle a set of model requests and spends 70 cents serving them. That leaves 30 cents to cover its other expenses. Later, serving those same requests costs just 35 cents, but competition pushes the price down to 45 cents. Now only 10 cents remains. The provider needs three sales to have the same 30 cents left over that it previously kept from one.

That pressure helps explain the different views of the inference business. Sarah Guo emphasizes workloads, financing and operations as advantages for scaled inference providers. Erik Bernhardsson, in a November discussion shared by Harry Stebbings, argues that token selling needs a broader product suite to escape commodity competition.
Who pays when the customer leaves?
Suppose a provider signs a three-year contract for GPU capacity, but its customer only commits to one year. Who pays for the other two?
In Part 3, we follow the contracts, resale and hedges that determine who pays when demand changes.
Thanks to Jeff Lu for proofreading the article.