Four ways an agent overpays for its model calls

Operant·

Your agent's model bill keeps growing, even though most of its work looks the same every day.

On every turn, your agent sends the whole conversation again: instructions, tool lists, earlier messages and tool results. You pay for all of it, every time, and the new message is the smallest part.

Operant sits between your agent and the model provider, and it closes four leaks in that bill. None of them is a bug you can file. Each one comes from how agent traffic meets provider pricing. Here's each leak, why it keeps happening, and what the obvious fix breaks.

LeakWhat happensWhat the obvious fix breaks
1. Cache discount left offRepeated text is billed at full priceHand-placed cache marks stop matching after any edit
2. Model switchesA switch throws away the warm cacheSwitching more often loses more cache
3. Repeated tasksA top model solves the same task from scratchA hard-coded cheap model drops quality with no way to measure it
4. Old contextStale tool output is paid for on every turnDeleting it breaks the cache and reopens leak 1

Leak 1: the cache discount is left off

Providers bill repeated text at about a tenth of the normal price. But on the Anthropic API, the caller has to mark where the reusable part ends. Most agent stacks never do. So the text your agent sends most often is billed at about ten times what it needs to cost.

The obvious fix is to place the cache marks in your own code. That works until anything else touches the request. Reorder a block, edit the history or switch models, and the warm cache quietly stops matching.

Leak 2: model switches break the cache

Each provider keeps a separate cache for each model. A tool that switches models on price alone moves a call to a cheaper model. In doing so, it throws away the cache the conversation built on the old one. The switch can cost more than it saves. The cheaper price is easy to see, but the lost cache isn't.

The real fix is to price the cache a switch would lose before switching. Sometimes that means staying on the current model is cheaper.

Leak 3: repeated tasks are solved from scratch

A few repeated tasks make up most of an agent's bill. Our internal numbers put it near 75% of traffic driving about 86% of cost. That split isn't validated, though published studies point the same way. Each repeat still goes to a top model with general instructions. It solves a task your agent has already solved hundreds of times.

The obvious fix is to hard-code a cheaper model for that task. But then you trade quality for cost with no way to know how much. A smaller model matches the top one only when it has the right instructions. Only a test against the top model's own answers can show that it does.

Leak 4: you pay for old context

Old tool output piles up in the conversation: file dumps, search results and test logs the model already used. Each later call sends all of it again and pays for it. The clutter hurts answer quality too. Late in a session, that stale part is the biggest part of the input, and it keeps growing.

The obvious fix is to delete it. But deleting text shifts the conversation, which breaks the cached part and reopens leak 1. Trimming context and keeping the cache are one problem, and you have to solve them together.

The leaks make each other worse

This is what defeats one-off fixes. Caching only pays if the model stays the same. A new model starts with a cold cache. And an edit that saves text can lose a bigger discount than it earns. Fix one leak on its own and your bill can go up.

How Operant closes all four

Operant works on all four leaks from one place. It marks the cache for you without reordering or changing anything. It prices the cache a switch would lose before it switches. It writes a skill for each repeated task: short instructions learned from that task's past chats that didn't fail. With it, a cheaper model can match the top one. And it replaces stale tool output with fixed placeholders, so the shorter conversation still caches.

Model switches and compression first run without touching live traffic. Then they have to pass a test on chats they never saw, and a person has to approve them. Cache marks don't change what the model reads, so they need no test. One click turns a model switch or compression off again.

Each closed leak then shows up as a line in the record for every call. It says what the call would have cost, what it did cost and what you saved. A call on a model with no known price shows a dash instead. The 75% and 86% figures above are our own internal numbers, not a validated study (how the record works).

So the four leaks get fixed together, and each fix is tested before it touches your traffic.

Read how each saving gets proven in the savings record.