If you use Claude Code (or any AI agent), every single step runs on your selected model, usually the most expensive one. Reading files, renaming a variable, running tests: all billed at the premium rate. But most of those steps don't need a genius. They need a competent worker.
Don't ask "which model should I use?" Ask "which model should handle which part of the task?"
Anthropic benchmarked this. Mixing an expensive model (Fable 5) with a cheap one (Sonnet 5) in a structured way kept 92 to 96 percent of the quality at 46 to 63 percent of the price. Going all-cheap was cheaper still, but quality dropped hard (accuracy fell from 86.8% to 77.8%). The saving comes from the structure, not from the cheap model alone.
Pattern 1: the Advisor (escalate up)
The cheap model does the work. It calls the expensive model only when it's stuck, roughly once per task, like a junior dev asking a senior for direction.
Sonnet 5 (cheap) ── does all the work
│
└── "I'm stuck, what's the right approach?" ──▶ Fable 5 (expensive, ~once per task)
Result on SWE-bench Pro: 92% of the expensive model's solo score, at 63% of the price.
Pattern 2: the Orchestrator (delegate down)
The expensive model plans and reviews. The actual work is fanned out to cheap workers, like a tech lead handing tickets to the team.
Fable 5 (expensive) ── plans, then reviews at the end
│
├──▶ Sonnet 5 worker (cheap) ── edits files
├──▶ Sonnet 5 worker (cheap) ── runs tests
└──▶ Sonnet 5 worker (cheap) ── searches the codebase
Result on BrowseComp: 96% of the performance at 46% of the price ($18.53 vs $40.56 per problem).
This gist sets up Pattern 2 in Claude Code. It's the one you can wire up in five minutes.
A sub-agent is a helper Claude that the main Claude can spawn to do a task. You define one with a plain markdown file: a few lines of settings on top (name, which model it runs on), then instructions in plain English. Claude Code automatically loads every file in ~/.claude/agents/.
The key trick: the sub-agent can run on a different, cheaper model than your main session.
Step 1 — Create the worker.
Copy the worker.md file from this gist to:
~/.claude/agents/worker.md
That's the whole worker. The two lines doing the cost-saving are in its header:
model: haiku # runs on the cheap model, not your main one
reasoningEffort: low # doesn't overthink mechanical tasksStep 2 — Tell the main model when to delegate.
Sub-agents only save money if the main model actually uses them. Copy the contents of CLAUDE-md-snippet.md from this gist into your project's CLAUDE.md file (or into ~/.claude/CLAUDE.md to apply to every project). It's a short policy: routine work goes to the worker, planning and review stay with the main model.
Step 3 — There is no step 3.
Both files live in your home directory, so every project picks them up. Nothing to rebuild per repo.
Optional — pin the top of the pattern too.
The two files above make your current session delegate downward, whatever model it runs on. If you also want the expensive side to be explicit, copy orchestration.md from this gist to ~/.claude/agents/orchestration.md. It's the mirror image of the worker: it runs on the top model (model: fable) with high reasoning effort, owns planning and final review, and is instructed to fan all mechanical work out to worker agents instead of doing it inline. Hand it your big refactors and migrations; together the two files are the full Orchestrator pattern in agent form.
Open any repo in Claude Code and ask for something with lots of mechanical steps:
"Rename getUser to fetchUser everywhere, run the tests, then review the diff."
Without the setup: the expensive model grinds through every file itself.
With the setup: the main model plans for a moment, you'll see it spawn worker agents for the rename and the test run, then it reviews the combined result itself. Most of the tokens were billed at the cheap rate; the judgment calls stayed with the expensive model.
A step-by-step walkthrough of exactly this run, with and without the setup, is in example-orchestrator-session.md in this gist.
Won't the cheap model make mistakes? On mechanical tasks, rarely. And the worker's instructions tell it to stop and report back instead of guessing when a task needs judgment. The expensive model still reviews everything at the end.
When should I NOT delegate? Debugging something subtle, choosing between designs, anything where being wrong is expensive. That work belongs to the main model. The snippet already encodes this.
Where do the benchmark numbers come from? Anthropic's published comparison of solo Fable 5 vs the hybrid setups on SWE-bench Pro and BrowseComp. Details in the thread linked from the post that brought you here.