
The AI Harness Designer
Most people install every tool they read about and end up managing Claude instead of using it. This skill interviews you first, then hands you a blueprint with a mandatory skip list.
Read →
BY STEVE TAN
AI isn't a tool. It's leverage. Sharing what's working week by week.
Every task you run in Claude Code burns your most expensive model by default, including the parts that don't need it. This is the full setup for splitting the job: your top model plans and reviews, a cheaper model executes. If you code, you'll have this running in fifteen minutes. If you don't, section 2 explains every term before it gets used.
Steve Tan
TL;DR
A cost loop is a Claude Code setup where your expensive model writes the plan, a cheap model does the labor, and your expensive model checks the result. Anthropic's own documentation lists cost control as a core reason subagents exist, and the gap is real: Fable 5 runs $10 in and $50 out per million tokens on the current rate card, Haiku 4.5 runs $1 and $5. Same work, a tenth of the rate. The setup is two small text files and one command. I run this loop in my own company, and two hidden settings decide whether it saves you anything at all. Fifteen minutes, then it pays you back every session.
Read time: 8 min
Why do most people pay flagship prices for work a budget model handles fine?
Because Claude Code makes it the default. Whatever model you pick for your session runs everything: the planning, the file reading, the test running, the cleanup. One model, one rate, every task.
Anthropic built the escape hatch into the product. Their subagent documentation lists five reasons to use them, and the last one is the point of this playbook: control costs by routing tasks to faster, cheaper models like Haiku. That's Anthropic's own phrasing, in their own docs. The feature shipped, the docs recommend it, and almost nobody runs it.
There used to be a small barrier. Creating a subagent meant clicking through a terminal wizard or hand-writing a configuration file. As of Claude Code version 2.1.198, the wizard is gone and the official method is simpler: you describe the agent you want in plain English, and Claude writes the file for you. The barrier is now one sentence.
All figures below are from Anthropic's rate card as of July 29, 2026. Prices are per million tokens, input and output.
| Model | Input | Output | Role in the loop |
|---|---|---|---|
| Fable 5 | 10 | 50 | Planning and review |
| Opus 5 | 5 | 25 | Planning and review |
| Sonnet 5 | 2 | $10 (until Aug 31, 2026, then $3 / $15) | Execution |
| Haiku 4.5 | 1 | 5 | Execution and search |
Route execution from Fable 5 to Haiku 4.5 and that work costs 90 percent less. Route it to Sonnet 5 and it costs 80 percent less at the introductory rate.
If you're on a subscription plan rather than paying per token, the same logic applies to your usage limit. The limit measures compute, and grunt work on a cheap model draws it down far slower than grunt work on your flagship. Either way, the expensive model should only touch the parts that need judgment.
Four terms, then you know everything the setup requires.
A token is the unit Claude bills in. Roughly three quarters of a word. Every file Claude reads and every line it writes is tokens, metered at whatever model is running.
A model tier is the quality level. Fable and Opus are the expensive reasoners. Sonnet is the mid tier. Haiku is the fast, cheap one. The cheap tiers are genuinely good at mechanical work. They're weaker at judgment calls.
A subagent is a second Claude that your main Claude can hand tasks to. It runs in its own separate workspace, does the job, and reports back a summary. The part that matters here: each subagent can run on a different model than your main session.
A markdown file is a plain text file. A subagent is defined by one: a few settings at the top, then instructions written in English. No code.
So the loop is: your main session runs on your best model and writes the plan. It hands the plan to an executor subagent running on a cheap model, which does the labor in its own workspace. Then your best model reviews what came back before you accept it. Quality at the top, volume at the bottom.
There's a second benefit that has nothing to do with money. Because the executor works in its own workspace, all the noisy output from reading files and running tests never lands in your main conversation. Your main session stays clean, which means it stays sharp for longer.
Open Claude Code and paste this. It works immediately, and Claude writes the file for you.
"Create an executor subagent in ~/.claude/agents/ that implements plans I have already approved. It should follow the plan exactly, without expanding scope or redesigning anything. After each change it should run the relevant tests. It should report back what it changed, what passed, and what failed. If the plan is wrong or blocked, it should stop and say so instead of improvising. Use Sonnet, and give it the Read, Write, Edit, Bash, Grep, and Glob tools."
That's the whole minimum setup. From now on, when you have a plan, say:
Use the executor subagent to implement this plan: [PASTE YOUR PLAN HERE]
Create a free account to continue reading
The operator's library for building with AI.
“The most actionable AI resource library
I've found. Thanks Steve!”
James.H — Member since 2026
Join 2,845+ leaders, builders, and innovators
Already have an account?
The file lands in a folder called .claude/agents inside your home directory, which makes the executor available in every project on your machine. Claude Code watches that folder, so edits take effect within seconds with no restart. The one exception: if this was the very first agent file you ever created and the folder didn't exist when your session started, restart Claude Code once so it finds the new folder.
Swap "Use Sonnet" for "Use Haiku" and the executor gets cheaper again. Sonnet is the safer default for code that has to compile. Haiku is right for search, cleanup, formatting, and anything you'd describe as tedious rather than tricky.
Budget 15 minutes total.
Phase 1: the executor (5 minutes). The prompt above. Done.
Phase 2: the reviewer (5 minutes). Paste this:
Create a reviewer subagent in ~/.claude/agents/ that checks completed work against the original plan. It should flag anything incomplete, incorrect, or out of scope, organized as critical issues, warnings, and suggestions. Make it read-only with the Read, Grep, Glob, and Bash tools, and set its model to inherit.
Two settings in that sentence do real work. Read-only means the reviewer physically can't quietly patch problems instead of reporting them, because it has no editing tools. And "inherit" means it runs on whatever your main session runs on, which is the point: your best model does the grading.
Phase 3: running the loop (no setup). Plan in your main session as normal. Then:
Use the executor subagent to implement this plan, then use the reviewer subagent to check the result against it: [PASTE YOUR PLAN HERE]
Claude chains them: executor works, reviewer grades, you get both reports.
Phase 4: hands-off mode (5 minutes to learn, optional). The /goal command, available since Claude Code version 2.1.139, keeps the loop running without you prompting each step. You give it a finish line, and after every turn a separate small model, Haiku by default, reads the transcript and answers one question: is the condition met? If no, Claude keeps working. If yes, the goal clears itself.
/goal all tests in [YOUR TEST FOLDER] pass and no test file was modified
The rule that decides whether this works: the condition has to be checkable from evidence. A test suite passing is checkable. "The code is clean" is not, and vague conditions produce the two expensive failure modes: Claude loops without progress, or the checker calls it done early. Anthropic's docs recommend a condition with a measurable end state, a stated way to prove it, and any constraints that must hold. You get up to 4,000 characters, so use them.
Type /goal alone to see status: the condition, elapsed time, turns, and the checker's latest reasoning. Type /goal stop to end it early.
Three escalating options, straight from the official docs.
Name it in plain English: "use the executor subagent to..." and Claude usually delegates. Type @ and pick the agent from the menu, and that agent is guaranteed to run for that task. Or launch your whole session as one agent with claude --agent executor from the command line, for sessions that are pure implementation.
This is the section the reel promised, and it's the difference between the loop saving you money and the loop being decorative.
Silent killer one: an environment variable outranks your files. Claude Code resolves which model a subagent uses in a strict order, and the first entry on that list is an environment variable called CLAUDECODESUBAGENT_MODEL. If that variable is set anywhere in your system, it forces every subagent onto whatever model it names, and the model line in your carefully written agent files is ignored. Nothing warns you. Your executor file says Haiku, your bill says otherwise.
Check it once. On Mac or Linux, run this in your terminal:
echo $CLAUDECODESUBAGENT_MODEL
If that prints nothing, you're clean. If it prints a model name, find where it's set, usually a file called .zshrc or .bashrc in your home folder, and remove it unless you set it deliberately. One version note: since Claude Code 2.1.196, setting this variable to "inherit" behaves the same as not setting it at all.
Silent killer two: the built-in search agent got expensive. Claude Code ships a built-in subagent called Explore that it uses constantly for reading and searching your codebase. Explore used to always run on Haiku. As of version 2.1.198 it inherits your main conversation's model instead, capped at Opus on the Claude API. Run your session on a top-tier model and all that background searching now bills at top-tier rates. This single change is why some people's costs went up without them touching anything.
The fix is in the official docs: a custom agent named Explore overrides the built-in one and keeps its own model setting. Paste this once:
Create a subagent named Explore in ~/.claude/agents/ for fast, read-only codebase search and analysis. Give it only the Read, Grep, and Glob tools, and set its model to haiku.
Those two checks take three minutes. Skip them and every other minute in this playbook can be wasted.
One, the executor file. Built in section 3. Cheap model, full toolset, instructions that forbid scope creep.
Two, the reviewer file. Built in section 4. Inherited model, read-only tools, instructions to grade against the plan.
Three, a written plan template, 150 to 300 words, and almost nobody has one. The loop is only as good as the plan you hand the executor, because a cheap model following a precise plan performs far above its price, and a cheap model improvising does not. Write a template once with these headings: what we're changing, which files it touches, what must not change, how we'll know it worked. Save it anywhere you can copy from. Every loop run starts by filling it in, and the last heading becomes your /goal condition word for word.
Subagents can remember. Add a memory setting to an agent's file and it gets a persistent folder that survives across sessions, where it accumulates notes on your codebase's patterns and past mistakes. The official docs recommend project scope, which stores the memory inside your repository so your whole team shares it through version control.
Ask Claude to "add memory: project to the reviewer subagent," then end review sessions with "save what you learned to your memory." A reviewer that has graded fifty of your plans is measurably sharper on the fifty-first, and it cost nothing extra.
| Symptom | Fix |
|---|---|
| Claude can't find an agent you just created | Only happens when the agents folder itself was new mid-session. Restart Claude Code once. |
| Claude does the work itself instead of delegating | Invoke explicitly: @-mention the agent, or name it in the request. Improve the description line in the agent file so Claude knows when it applies. |
| Subagent fails to launch with a tools error | A tool name in the file is misspelled. Open the file and check the tools line against: Read, Write, Edit, Bash, Grep, Glob. |
| Executor runs on the wrong model | The environment variable from section 6. Check it first, before touching anything else. |
| Costs went up after updating Claude Code | The Explore change from section 6. Create the Haiku override. |
| /goal never finishes | The condition isn't checkable from evidence. Rewrite it around a command result, like a test suite exit, and state how Claude proves it. |
| /goal declared success too early | Same cause, other direction. The checker only judges what appears in the transcript, so make the condition demand shown proof. |
| Permission prompts appear mid-task | Subagents run in the background by default since version 2.1.198 and surface their permission requests in your main session, naming the agent asking. Approve to continue, or press Esc to deny that one call. |
Cheap models are cheap for a reason. Haiku following a precise plan is excellent. Haiku making architectural decisions is how you get code that runs and shouldn't. The loop works because judgment stays on the expensive model, and the moment you let the executor plan, you've traded quality for a discount.
Subagent results come back into your main conversation, so running many of them in one session still consumes your main context. Anthropic's docs warn about this directly. The loop reduces cost per task, and it isn't a license for infinite tasks.
The /goal checker reads the transcript only. It runs no commands and opens no files. If your condition needs independent verification, the checker can't provide it, and its per-turn evaluation calls cost tokens, though the docs describe that spend as typically negligible next to the main work.
And the ground moves. Four behaviors in this playbook changed in versions 2.1.139 through 2.1.198, all in 2026. The setup here matches the official documentation as of July 29, 2026. If something disagrees with your install, the docs at code.claude.com are the referee.
The default in every AI tool is one model doing everything, billed at that model's rate. Once you've run a split loop, that default starts to look like what it is: paying a senior's rate for work you'd never assign a senior. And the plan-execute-review shape carries past Claude Code, because that's how you'd staff any project, and the tools finally let you staff your AI the same way. Your best model becomes what a good lead should be: the one who decides, and the last one who checks.
Steve Tan
Builder · Operator · Advisor
20+ years building businesses the hard way across eCommerce, SaaS, agency, education, and supply chain. $200M+ in revenue. Now I help business owners turn AI into their unfair advantage.
More about SteveMore from Steve

Most people install every tool they read about and end up managing Claude instead of using it. This skill interviews you first, then hands you a blueprint with a mandatory skip list.
Read →

100 prompts I actually use to run my businesses. Organized the way an operator thinks.
Read →

The custom prompt that runs your business idea through Sam Altman's Startup Playbook the way a YC partner would in a real interview. Free, ten minutes, brutally honest, full prompt included.
Read →