BlogAI Agents

Boss and interns

How I split coding work across several AI models without the bill exploding

Nicolás Biondi

Amber store counter with a figure in shadow and stations glowing in cyan, violet and turquoise

Between April and October my AI agents processed around 28 billion tokens. The first time I saw that number on my own dashboard I thought I had broken something serious. Then I looked closer: 94% of those tokens was text the models had already read before, and reading it again costs a fraction thanks to the KV cache, which rules everything around me.

I build almost all of LENZ's software with AI agents in OpenCode: the store's website, some internal tools and this blog. I organize them the way a store is organized, with a boss who plans and hands out work, experienced people who carry out clear assignments, a senior technician for the delicate jobs and interns who read stacks of documents and come back with a summary.

In the store In the AI What it does
Store manager Top model (Opus) Plans, hands out the work and reviews before delivery
Experienced salesperson Mid model (Sonnet) Does the work from a clear assignment
Senior technician Top model (Fable) The delicate jobs, or whatever the salesperson couldn't solve
Intern Small model (Haiku) Reads stacks of documents and brings back a summary
Outside auditor Model from another company (DeepSeek and GPT) Reviews and gives an opinion. Never touches the code

In those six months my dashboard counted 1,337 conversations with the boss and 2,631 helper sessions. A token is roughly three quarters of a word. Out of all that volume, 94% was cache read again and 0.43% was new text. The helpers used about a quarter of the tokens and wrote close to half the code.

Don't send the technician to change a battery

Every helper starts with an explanation of the assignment: the instructions, the tools and the task. I measured it. Between 28,000 and 49,000 tokens before it does anything, and it reads that again at each of its roughly 21 steps. Delegating a small task means paying that toll to save yourself two minutes.

Meme Two Buttons: Delegate a one-line change / Do it myself in two minutes Delegate a one-line change Do it myself in two minutes

So the boss hands out work when it buys real time (two tasks at once) or when a big task would fill up its own conversation. The small stuff it does itself. The delicate stuff, or whatever the helper couldn't finish, goes to the senior technician.

In the four weeks before 29 July, the conversations that delegated called around 11 helpers each. That day I wrote this rule down and trimmed the opening explanation. In the next four weeks they dropped to about 8, and in the four after that to about 2.

Keep what's already been read within reach

An AI model has no memory between one step and the next: at each step it reads the whole conversation from the top again. It's the most dedicated salesperson you will ever meet and also the most forgetful. The cache is what makes it cheap. What it already read stays stored, like the catalog the salesperson already carries in his head, and using it again costs a fraction.

Yes

No

Next step

Already read
this opening?

Takes it from cache

Reads it at full price
and stores it

Reads only what's new

Answers

Why rereading comes out cheap

The cache only helps if the start of the conversation doesn't change, so I keep the instructions at the top fixed and give each helper a single assignment. It also expires after a few minutes without use, so working straight through comes out cheaper than starting and stopping.

You escalate once

If a cheap model fails, the task moves up one level and gets one more attempt. If that fails too, the boss changes the plan. Nobody repeats the same broken step over and over, because every attempt reads everything from the top again.

And only one family of models writes code. The ones from other companies read and comment, and I'm the one who calls them.

What I still haven't solved

I decide the handouts myself with rules written in a short file, nothing automatic. I still don't know how many of those 2,631 helpers were actually needed. And I only saw these numbers when I built the dashboard, six months after I started.

Today the boss does the small stuff himself and hands out work when two branches move in parallel, with a single escalation allowed. If I see 28 billion on the dashboard again, at least I now know I didn't break anything: it's just my team rereading the catalog.

delegation caching tokens workflow