DEV Community

Cover image for Is your cheapest AI task running on your most expensive model?
Heinrich Neb
Heinrich Neb

Posted on Edited on AI-assisted

Is your cheapest AI task running on your most expensive model?

Five helper agents read through my repos one day in August. They did a lovely job. They read every file they were pointed at, counted what they were asked to count and wrote tidy summaries.

Together they used about 400,000 tokens, every one of them at the price of my most expensive model. The job was reading. A model a third of the price does reading just as well.

Nobody had chosen that. That was the bug.

Scene one: the report that said 9 per cent

Three days earlier, our cost report had shown a reassuring number: only 9 per cent of the work ran on the expensive model. The rest went to cheaper ones, the way it's supposed to: the big model plans, smaller models do the work.

Then I read how the report counted. It only counted the helpers. The main session, the one that plans, reads CI logs, merges and talks to me for a hundred turns with an ever-growing context, wasn't in any number at all. The 9 per cent wasn't a cost figure. It was a statistic about who got delegated to.

We fixed the counting and moved the main session to a model at half the price. Problem solved, I thought.

Scene two: the helpers nobody configured

Three days after that came the five readers.

Our task workers had their model pinned per tier: small tasks to the smallest model, harder ones one step up. But the quick "go and read this for me" helpers, the inventories and the "find out how X works" jobs, had no model written down anywhere. So they used whatever the main session was running. That day, the main session was running the most expensive model.

So five readers ran at architect prices, doing work that has nothing to do with architecture.

The list prices at the time, per million tokens in and out:

The price ladder

The reading helpers belonged on the second rung. They ran on the top one, at more than three times the price per token, for identical output.

The one line

The fix, the next night at 01:19, was a file with one line that mattered (shortened here):

---
name: scout
description: "Read-only research agent. Inventories, codebase questions."
model: sonnet
---
Enter fullscreen mode Exit fullscreen mode

Every reading job now goes through that agent type. And the rule behind it is short: no helper silently inherits the session's model. Whoever starts one names the model.

A line that people have to remember is a line that gets forgotten again. So the same night we added a check: a small tool compares the routing table (which role gets which model) with the agent files, and reports any mismatch as drift. model: inherit counts as drift too. The expensive model is allowed in exactly three roles: the one architecture run, audits, and the last escalation step. Anywhere else it needs a written reason in the log.

In the next batch of tasks, four ran on the mid-tier model, one on the smallest, and the expensive model only did the planning and coordination.

Who ran on what

The class of bug

This isn't really about AI models. It's about defaults:

A role without a pinned setting falls back to the most expensive thing that happens to be running.

You'll find the same shape in a CI job that never names its runner size, a container without resource limits sitting next to a hungry neighbour, or a background job that inherits the credentials of whoever started it. Nobody picks the expensive option. It's just what's left when nothing was picked.

It stays invisible for the same reason as my 9 per cent: the report counts what is easy to count, and inherited settings are exactly what nobody counts.

The two-minute check

If you use agent definitions, list which model each one runs on:

for f in .claude/agents/*.md; do
  m=$(grep -m1 '^model:' "$f" | awk '{print $2}')
  echo "${m:-MISSING}  $f"
done | sort
Enter fullscreen mode Exit fullscreen mode

Every MISSING or inherit is a helper whose price depends on what your main session happens to be doing. Then answer two more questions:

  1. Where do you start helpers without an agent type at all? Ad-hoc "go and research this" helpers are the usual suspects.
  2. Does your cost number include the main session? If it only counts helpers, it's a delegation statistic, not a bill.

The two-minute check

None of this needs a new tool. It needs one line per role, and one check that tells you when a role lost its line.

Next in this series: the day my AI almost made me shut down half our databases, because of one example in the code.


Which of your helpers is quietly running on your most expensive setting?


I build cachly. It keeps what you explain to your AI: your rules, your decisions and the bugs you already solved. Claude Code, Cursor, Copilot and the others read it in every session, for you alone or for your whole team, and every lesson carries the name of whoever learned it.

Try it, in increasing order of commitment:

  • 30 seconds, no account: npx @cachly-dev/mcp-server@latest demo in any git repo. It reads your log locally and prints what an assistant would already know about the project. After npx fetches the package, the command makes no network calls.
  • Claude Code plugin: /plugin marketplace add cachly-dev/cachly-mcp, then /plugin install cachly-brain@cachly.
  • 5 minutes, free tier: npx @cachly-dev/mcp-server@latest autopilot writes the MCP configuration for whichever assistant you use.
  • Or from the web: cachly.dev · free tier, servers in Germany.

On Product Hunt from 1 December: cachly on Product Hunt. Follow it there if you want a note on launch day.

Top comments (2)

Collapse
 
eliashivemind profile image
Nova Ops •

The 9 per cent is the detail that stings — a true statistic about who got delegated to, presented as a cost figure, with the most expensive seat in the system in no number at all. We keep meeting that shape: a tally is only as honest as the population it admits to counting. And treating inherit itself as drift is the right call — a silent fallback to the session's model is a decision nobody made, which is exactly the class of default our own approval gate is built to refuse rather than inherit: authority that isn't explicitly granted at a level doesn't flow downhill into it. Does the drift check only compare the agent files that exist, or is there something that catches a helper spawned ad hoc, outside any named agent type at all?

Collapse
 
sherotree profile image
Sherotree •

The grep over agent files catches the missing model: line, but the ad-hoc "go and research this" helpers you mentioned never get a file, so they won't show up as MISSING. I'd make the spawn path refuse to start a helper unless the model is passed in the call itself. Same rule as inherit-as-drift, just applied at the call site, where the 400k-token batch actually started.