Claude Code reads your files on Opus now.
the built-in Explore subagent, the one Claude sends to search your codebase, used to run on Haiku. in current versions it runs on your session's model. on the default setup that's Opus 5.5: $4 per million input tokens, against $0.10 for Haiku 5.5.
that's one setting. Anthropic published the numbers behind the rest in its november 9 guide to picking a Claude model, and in a september post on what a task costs on Opus 5.5:
• every task at low effort, with only the failures re-run at high, finished about 97% of tasks at $0.17 each. every task at high finished 95.3% at $0.29.
• an Opus lead with up to 25 Sonnet workers cost about a third less than Opus alone, with about the same score.
• on an API key, a 6-minute coffee break at 120K tokens of context turns the next $0.02 cache read into a $0.60 write.
• on one 20-problem benchmark, 2 problems carried 43% of the spend.
this course turns those numbers into settings. every chapter ends with something you paste into Claude Code, and you'll spend less after each one:
• where the money goes: turns, cache, output and model
• put Explore and the other readers on Haiku
• set effort before you switch models
• keep the cache warm
• send less on every turn
• pick the model by the job
• a lead and cheap workers
• measure it on your own work
if you only have 30 seconds, these 5 lines are the whole course:
make a subagent named Explore with model: haiku, and put every subagent that only reads on Haiku.
start at medium effort. run batches at low and re-run only the failures at high.
on an API key, compact before a break, never after it.
keep CLAUDE.md under 200 lines and turn off the MCP servers you don't use.
keep Opus for the decisions and the code edits, and check /usage after every real task.
where the money goes
a Claude Code task is a loop: read the conversation, call a tool, read the result, go again. every trip round the loop is one request, and 4 things set its price.
• turns. every turn resends the whole conversation. in Anthropic's example, a task that grows from 20K to 120K tokens of context over 40 turns sends about 2.8M input tokens. the same task in 25 turns sends about 1.75M.
• cache reads. most of what a turn resends was already sent on the turn before, so it bills as a cache read: $0.20 per million on Opus 5.5, a twentieth of the $4 input price. those 2.8M tokens cost $11.20 with no cache, $1.62 at a 90% hit rate and about $0.99 at 96%.
• output. $20 per million on Opus 5.5, 100 times a cache read. thinking bills as output, even when Claude Code only shows you a summary. 60K output tokens cost $1.20, as much as 6M tokens read from cache.
• model. it sets the price of every token, and every subagent that inherits the model inherits its price.
at the end of your next real task, run /usage and read 3 lines:
cache share: high on a long session. low means a long pause, a model switch or an MCP server connected partway through.
output against input: a lot of output on a small change means the effort is too high or the model is retrying.
total input against the size of the conversation: many times bigger means many turns. read the session and find the loop.
you get the one line of your bill to fix first.
fewer turns and a warm cache save more than any discount.
put Explore and the other readers on Haiku
a subagent is a helper Claude starts for a side job. it works in its own context window and hands back a summary, and it pays for its own tokens at its own model's price.
Claude Code's built-in subagents, per the docs:
• Explore searches your codebase, read-only. it runs on your session's model. when your session runs Fable, Explore drops to Opus on a Claude subscription, an Anthropic Console account or a gateway, and stays on Fable on Bedrock, Google Cloud, Foundry, Claude Platform on AWS and a Claude apps gateway.
• Plan does research in plan mode. it inherits your session's model.
• general-purpose explores and edits. it inherits too.
a file named Explore in your agents folder replaces the built-in one and keeps its own model. Anthropic's guide says to do exactly that.
save this as ~/.claude/agents/Explore.md for every project, or .claude/agents/Explore.md for one:
---
name: Explore
description: Fast read-only agent for searching and understanding a codebase. Use it to find files, search code and answer "where is this" questions.
tools: Read, Grep, Glob
model: haiku
omitClaudeMd: true
---
Search and read only. Never create or edit files. Answer with file paths, line numbers and a short summary of what you found.
omitClaudeMd starts it without your CLAUDE.md, the way the built-in Explore starts. restart Claude Code if the agents folder didn't exist before, and run claude update: on the Anthropic API the haiku alias points to Haiku 5.5 from v2.1.293. on Bedrock, Google Cloud, Foundry and Claude Platform on AWS it still means Haiku 4.5.
do the same for every helper that only reads logs, test output or search results. this one is Anthropic's own example:
---
name: log-reader
description: Reads test output and logs, and reports each failing case. Use after a test run.
tools: Read, Grep, Glob, Bash
model: haiku
---
Read the logs you're given. For each failure, report the file, the test name and the first error line. Don't edit any files.
to put every subagent on one model, set the CLAUDE_CODE_SUBAGENT_MODEL environment variable. a model named in a subagent's file wins over the variable.
keep code edits and judgment calls on your main model. a small model that misreads a search result sends the main one to the wrong file, and the main one pays for the detour.
you get search, logs and test output read at $0.10 per million input tokens instead of $4. run /tasks the next time Claude delegates, and you'll see which model each subagent is on.
one file per reader, and reading stops costing Opus prices.
set effort before you switch models
effort sets how much the model thinks, writes and calls tools on every turn. Opus 5.5 has low, medium, high and xhigh, plus max for a single session. medium is the default in Claude Code.
Anthropic measured it on a SWE-bench Pro subset with Opus 5.5:
• medium: about 2.5 points below high, for about 70% of the cost.
• low: about 8 points below high, for about a third of the cost.
• xhigh: about 1.4 points above high, for 2.5 times the cost.
then the run that beat all of them: everything at low, and only the failures re-run at high. about 97% of tasks done at $0.17 each, against 95.3% at $0.29 with every task at high.
it only works when Claude can check its own work: a test, a build or a script that calls the endpoint. a check costs one turn and its output. more effort adds thinking to every turn.
when a model isn't good enough, Anthropic's guide gives this order:
1. give it a way to verify its work.
2. raise effort one level.
3. move to the next model up, at a lower effort than you used on the smaller one.
for a batch of tasks, run /effort low and paste:
do every task in todo.md, one at a time. after each one, run its test. write the tasks whose tests fail to failed.md, each with its first error line. change nothing outside this repo and push nothing.
then run /effort high and paste:
redo only the tasks in failed.md and run their tests again. tell me which ones still fail. push nothing.
you get a cheap first pass over everything, and high effort only where the first pass failed.
with an API key or a subscription, changing effort keeps your cache. on Bedrock, Google Cloud's Agent Platform or a gateway it clears the cache, so change it at a break there.
low first, high on the failures, and you pay for thinking only where it changes the result.
keep the cache warm
the cache holds the part of the conversation Claude Code doesn't pay full price to resend. on Opus 5.5 a cache read costs 5% of a fresh input token. a cache write costs 1.25 times the input price for a 5-minute cache, and 2 times for an hour.
how long it lives depends on how you pay: an hour on a Claude subscription, 5 minutes on an API key or a cloud provider, and 5 minutes once a subscription draws on usage credits.
that's the coffee break. at 120K tokens of context, a read costs about $0.02 and a fresh 5-minute write about $0.60. pause for 6 minutes on an API key, and your next turn pays the write.
these also make the next turn pay a write:
• switching models: the new model starts with an empty cache.
• connecting or disconnecting an MCP server partway through.
• turning on fast mode for the first time in a conversation.
• compaction, which rewrites the history the cache matched.
• changing effort on Bedrock, Google Cloud's Agent Platform or a gateway.
set those up when the session starts, and leave them alone while it works.
compact at a natural break, while the cache is still warm. at 150K tokens a /compact costs about $0.25 and saves about $0.025 on every later turn, so it pays for itself in about 10 turns. after a break longer than the cache lifetime, the same /compact reads the whole conversation again: about $0.75 at 150K.
/clear costs nothing, so use it between unrelated tasks. /rewind goes back to an earlier turn that's still cached, when you want to drop a path.
before you step away, paste:
/compact keep the failing test names, the files we changed and the next step
you get a short conversation that's still cached when you come back.
compact before the coffee, never after it.
send less on every turn
every turn resends everything before it. at 20K tokens of context, a turn's cache read costs about $0.004 on Opus 5.5. at 150K it's about $0.03, so 30 turns spend $0.90 on reads alone, against about $0.12 at 20K.
3 things load before you type:
• CLAUDE.md loads into every session, and every turn resends it. Anthropic's costs docs say to keep it under 200 lines.
• MCP servers. only the tool names and server instructions load at the start, and a full definition loads when its tool is used. run /mcp and turn off the servers you don't use.
• old instructions. prompts written for an older model can make Opus 5.5 write more and repeat tool calls. on Anthropic's 44-ticket support benchmark, moving from Opus 4.8 to Opus 5.5 at low effort cut the cost by about 18%, and Claude Code's /claude-api prompt-audit command cut a further 9%.
run /claude-api prompt-audit first, then paste:
read my CLAUDE.md and every file it imports. propose a version under 200 lines: keep the commands to build and test, the rules Claude can't learn from the code, and anything that broke before. move the rest into docs/ and link to it from CLAUDE.md. show me the diff and change nothing until I say go.
you get a shorter CLAUDE.md, the old ritual instructions gone, and a list of servers to switch off.
a short context makes every one of your turns cheaper.
pick the model by the job
the price list, per million tokens:
• Haiku 5.5: $0.10 in, $0.50 out for prompts up to 100K tokens, $0.50 and $2.50 above that.
• Sonnet 5.5: $2 in, $10 out.
• Opus 5.5: $4 in, $20 out.
• Fable 5.2: $8 in, $40 out.
Anthropic's starting points:
• Haiku 5.5: classification, routing, extraction, and subagents that search files, read logs or summarize.
• Sonnet 5.5: well-scoped coding like bug fixes and features built against a spec, chat, everyday documents, and agent tasks you run again and again.
• Opus 5.5 at medium: everyday engineering and debugging, and anything you're unsure about. it's Claude Code's default.
• Fable 5.2: major refactors and migrations, architecture, deep research, and leading many subagents. move up to it when Opus 5.5 at high still falls short.
a higher price per token doesn't always mean a higher price per task. on FrontierCode 2.0, Fable 5.2 at high scored about level with Opus 5.5 at max, 45.3% against 45.5%, for roughly half the cost per task. before you push Opus past high on a hard task, run it on Fable at a lower effort.
switch at a natural break. the cache belongs to the model that wrote it, so the first turn on a new model pays the write on the whole conversation. run /compact first, or start fresh with a short written plan.
the opusplan alias plans with Opus and lets Sonnet make the edits. that puts your code changes on the cheaper model, the opposite of the reader setup above, so measure it on your own tasks before it becomes your default.
paste:
read todo.md. for each task, write the model and effort it should start on: Haiku for lookups and log reading, Sonnet for well-scoped fixes against a spec, Opus at medium for everyday work and anything unclear, Fable for migrations, big refactors and work that leads many subagents. save routing.md with one line per task and the reason. change no settings.
you get routing.md: a model and an effort for every task before you start it.
Opus by default, Haiku for reading, Fable when Opus at high falls short.
a lead and cheap workers
when a job won't fit in one context window, put the strongest model in charge and cheaper ones on the pieces.
on an internal benchmark that searched about 22 million tokens of source code for defects, an Opus 5.5 lead with Sonnet 5.5 workers, up to 25 at a time, cost about a third less than Opus 5.5 alone at its default effort, and scored about the same.
skip it when the work is one chain of dependent steps, or fits in one context window. there, the planning and merging cost more than they save.
keep teams small. agent teams, an experimental feature, run every teammate as its own Claude Code instance, and Anthropic's costs docs put a team at about 7 times the tokens of a standard session when teammates run in plan mode. shut each teammate down when its part is done.
the advisor tool pairs a cheap executor with a stronger advisor it can ask for help. in Anthropic's own table, none of the 4 pairings clearly beat its executor alone, so measure how often your executor asks before you pay for an advisor.
paste:
split [the job] into independent pieces that each fit in one context window. you're the lead: write the plan to plan.md, then hand each piece to a subagent on Sonnet with the list of files it may touch, and merge what comes back. no two pieces edit the same file. run the tests after each merge. show me plan.md before you start any subagent.
you get plan.md, the pieces done in parallel on Sonnet, and Opus spent on the plan and the merges.
the lead decides, and the workers read and type.
measure it on your own work
every number above comes from Anthropic's runs. yours depend on your codebase and your habits.
• /usage at the end of a task shows tokens, the cache share and an estimated dollar cost at list price. /cost does the same. on a Pro, Max, Team or Enterprise plan, the dollar figure is a guide to how much work you did, and the same screen shows your usage bars.
• /effort status shows your effort level, and /tasks shows which model each subagent runs on.
• for a team, the Claude Code Analytics API gives estimated cost per user, and the Usage and Cost API splits spend by model and by cached against uncached tokens.
• a baseline from Anthropic's costs docs: about $13 per developer per active day across enterprise deployments, and under $30 a day for 90% of users.
pick one real task from your backlog and run it on 2 setups. paste this once per setup:
I'm comparing 2 setups on the same task. the task: [task]. do it, run its test, and when you're done, tell me how many turns you took and what would have cut them. push nothing.
after each run, check /usage, then /clear, switch with /model or /effort, and paste it again.
you get your own cost per task on each setup.
your own /usage is the number to trust.
one paste sets up the Haiku readers, the shorter CLAUDE.md and the model routing. open Claude Code in your repo and paste:
help me spend less in Claude Code, one step at a time. after each step, show me the change and wait for my "go".
1. create ~/.claude/agents/Explore.md: name Explore, a description that says it's a fast read-only search agent, tools Read, Grep, Glob, model: haiku, omitClaudeMd: true, and a body that says search and read only, never create or edit files.
2. create .claude/agents/log-reader.md with model: haiku. it reads test output and logs and reports each failure with the file, the test name and the first error line, and never edits files.
3. read CLAUDE.md and every file it imports, and propose a version under 200 lines. move the rest into docs/.
4. list the MCP servers in my config and mark the ones this repo never uses.
5. read todo.md and write routing.md with a starting model and effort for each task.
change no other settings, push nothing, and delete nothing without asking.
after the paste, you have:
• Explore and a log reader on Haiku.
• a CLAUDE.md under 200 lines, with the rest in docs/.
• a list of MCP servers to switch off.
• routing.md: a model and an effort for every task.
the setup on one page
EXPLORE ~/.claude/agents/Explore.md, model: haiku, omitClaudeMd: true.
READERS log and search subagents on haiku. code edits stay on the main model.
EFFORT medium by default. batches at low, failures re-run at high.
VERIFY a test or a build Claude can run, before you raise effort.
CACHE subscription 1 hour, API key 5 minutes. /compact before a break.
CONTEXT CLAUDE.md under 200 lines. unused MCP servers off.
MODEL haiku for reading, sonnet for scoped work, opus daily, fable the hardest.
TEAMS opus lead + sonnet workers only when it won't fit one context window.
CHECK /usage after real tasks, /tasks for subagent models.
screenshot this one.
tonight, save the Explore file, restart Claude Code, and run /tasks the next time it searches your code.

