Think of a auto repair shop. You don't call the chief engineer to change a tire â you send the assistant; it's quick and cheap. To rebuild the engine, that's when the master steps in. AI models work the same way: there's a low tier (fast, cheap, great for grunt work), a mid tier (the competent worker who builds and reviews) and a high tier (the master you only call on when the problem requires real reasoning). In Claude Code, these three are Haiku, Sonnet e Opus â and each subagent can run its own.
â The tier ladder: each step up adds reasoning power, but costs more and increases latency. Go only as high as the task requires.
Detailed content
⥠Haiku â the grunt worker
Haiku is the tier cheap and fast. It shines at high-volume mechanical work: scan an entire folder, search a string across hundreds of files, summarize a huge log, read documentation and return the 5 points that matter. Tasks where the answer is âfind and report,â not âthink deeply.â
đ Haikuâs sweet spot
When the subagent is going to generate a reading wall that no one will reread â only the conclusion matters â you want the cheapest tier that gets the job done. Paying a lot for this is burning money on work that doesn't require intelligence:
- âąScan â scan files/directories for a pattern.
- âąSearch â locate where something appears in a large repository.
- âąSummarize â compress a log, a PDF, a transcript.
- âąRead docs â bring over the facts from a page without pasting the page.
The lowest-cost, lowest-latency tier. It thinks shallowly but executes quickly and at scaleâideal for the "scavenging" work that feeds the rest.
Most of what a subagent does is disposable raw reading. Running that on Haiku cuts costs without affecting the quality of the final result.
Cheap · fast · high volume · âfind and reportâ · disposable mechanical work.
đ§ Sonnet â the competent workhorse
Sonnet is the tier medium â the workhorse for day-to-day use. It builds (writes code, creates files, implements a step in a plan) and reviews (reads a diff and points out bugs). Itâs smart enough for most real-world tasks and still much cheaper than the high tier. When youâre unsure, Sonnet is usually the safe default.
Receives a concrete task
Build or review something well-defined.
"Implement email validation in this form" or "review this diff and point out bugs and missing tests".
Executes competently
Good reasoning, reasonable cost.
Understands the intent, writes correct code, and follows the projectâs conventions. It doesnât need Opusâs boundary reasoning for that.
Deliver at the right pace
Quality Ă price balance.
The result is solid without running up the bill. Thatâs why Sonnet is the âdefaultâ tier for people who build and review all day.
đ The sensible default
If you canât justify why the task needs Opus, it almost always fits Sonnet. And if itâs just âfind and report,â move down to Haiku. The mental exercise is always: how deeply does this task need to think?
đ§ Opus â the master you call only when you need it
Opus is the tier expensive and slower, reserved for what truly requires deep reasoning: decisions about architecture, analysis of security, careful planning, debugging a problem no one understands. Here, the extra cost pays off: an architecture mistake costs far more than a few extra tokens.
Architecture
Far-reaching decisions
"How should I structure this module?"âa choice that will matter for months.
Security
Where mistakes are costly
Finding an injection flaw or a leak requires thinking like an attacker.
Difficult reasoning
Tangled problem
A bug that spans five files and has no obvious cause.
Planning
A plan for others to follow
Break a large task into steps that multiple subagents will execute.
Trade-offs
Weigh options thoroughly
Compare two approaches and justify the choice with nuance.
The cost pays for itself
For rare, high-risk tasks, the expensive tier is the cheapest investment there is.
đĄ Opus is the exception, not the default
A beginnerâs instinct is "use the best model for everything." Wrong. Opus should be the minority of your subagents â only those whose decisions are costly to get wrong. For the rest, Haiku and Sonnet deliver the same result at a fraction of the price.
đ The three axes: reasoning Ă cost Ă latency
Moving up a tier isnât just âgetting smarter.â Theyâre three dials that move together: more reasoning comes with more cost and more latency (takes longer to respond). Choosing a model means deciding of each one the precise task â and stop paying for what it doesnât use.
â Moving up a tier makes sense whenâŠ
- âThe task requires reasoning that the tier below gets wrong
- âThe mistake is costly (architecture, security)
- âThe decision lasts a long time
- âYou can justify the extra cost
â Moving up a tier is wasteful whenâŠ
- âItâs just scanning, searching, or summarizing
- âThe output is disposable (nobody rereads it)
- âYou run this hundreds of times
- âLatency matters (you want it fast)
â±ïž Latency matters too
In a fan-out with 30 search subagents, a slow model multiplies the wait by 30. Haiku isnât just cheaperâitâs more fast, and that changes how the system feels to use. A high tier on a trivial task makes you wait for nothing.
đȘ€ The trap: the subagent starts with a blank slate
Hereâs the detail that catches many people. The subagent doesn't inherit your conversation â it starts from scratch, with an empty window. Before producing anything, it needs to gather the context on its own: read the files, understand the terrain. This changes the calculation: part of its work is just âgetting oriented,â and that reading work is exactly what a low-cost tier does well.
# o maestro jĂĄ conversou com vocĂȘ por 1h.
# o subagente NĂO sabe nada disso. ele nasce assim:
contexto: (vazio)
tarefa: "ache onde o login quebra nos 40 arquivos de /auth"
# 1Âș ele GASTA tokens sĂł pra se situar:
# - lista a pasta /auth
# - abre os 40 arquivos
# - mapeia o fluxo de login
# Sà DEPOIS ele começa a raciocinar sobre o bug.
# lição: essa fase de "reunir contexto" é leitura bruta
# â Ă© trabalho de Haiku, nĂŁo de Opus.
â ïž Why this is a cost trap
If you hand this entire task to Opus, youâre paying for the most expensive tier for a phase that is read-only (list a folder, open a file). Often, the ideal setup is to separate them: one Haiku gathers and summarizes the context, and only the final reasoning â if it's difficult, move up a tier. Don't pay for Opus to open files.
âïž Big tasks are worth it; a 30s task is wasteful
There is a fixed cost to launch a subagent: it starts with a blank slate, gathers context, then works. For a large task, that cost is spread outâitâs worth it. For a 30-second microtask, the overhead of âgetting orientedâ is greater than the work itself: itâs wasteful. And for the common case, thereâs an honest shortcutâ inherit the parent's model.
â A subagent is worth it (large task)
- âRead and cross-reference dozens of files
- âHeavy research that produces a wall of output
- âWork that runs in parallel (fan-out)
- âThe cost of getting situated is spread across the workload
â Waste (30-second task)
- âChange a line you already have in front of you
- âAnswer something the orchestrator already knows
- âTask where âgathering contextâ > the work
- âQuick edit in the middle of a conversation
đ§Ź inherit-from-parent â the honest default
If you donât declare model in the subagent, it usually inherit the parent's model
(the orchestrator). This is the default behavior and is almost always reasonable: you only pin a model when you have a clear reason
to diverge from the parent.
- âInherit â leave it without one
model: the subagent runs on the conductorâs model. Safe default. - âForce downward â
model: haikuin a search agent, even with an Opus maestro: efficiency. - âForce upward â
model: opusin a security reviewer, even with a Sonnet maestro: quality where it matters.
The decision table: Model Ă Reasoning Ă Cost Ă When to use
This is the canonical table from the course to choose a model. Read from left to right: each tier has a reasoning level, a relative cost, a latency â and a set of tasks where it's the right choice. Keep it handy; it comes back in Track 4 when we compare models from other providers.
| Model | Reasoning | Cost | Latency | When to use |
|---|---|---|---|---|
|
Haiku
the helper
|
Shallow find & report |
$ the cheapest |
Low the fastest |
Scan, search, summarize, read docs, run sweeps, gather raw context. |
|
Sonnet
the worker
|
Good builds & reviews |
$$ medium |
Average balanced |
Build code, implement steps, review diffs. Default when in doubt. |
|
Opus
the master
|
Deep thinks deeply |
$$$ the most expensive |
High the slowest |
Architecture, security, planning, difficult debugging. Exception justified. |
|
inherit
inherits from the parent
|
= the orchestrator's what the parent uses |
= the orchestrator's | = the orchestrator's | When thereâs no reason to deviate. Omit the field model and thatâs it. |
đĄ How to read the table in practice
Start from the bottom: is the task "find and report"? Haiku. No? Does it "build or review"? Sonnet. Only move up to Opus if you can say out loud why the reasoning needs to be as good as possible. Canât justify it? Donât upgrade.
Real example: three agents, three models
The model choice lives in the field model from the frontmatter. Here are three subagents from the same
project, each in the tier justified for your task â and read the comment that explains
why each one is where it is.
# ââ 1) file-scout.md ââ varre o repo atrĂĄs de um padrĂŁo
---
name: file-scout
description: Varre o repositĂłrio atrĂĄs de onde um sĂmbolo
ou string aparece e devolve sĂł os caminhos + linhas.
tools: Read, Grep, Glob # sĂł leitura
model: haiku # â Ă© "ache e relate": tier barato basta
---
You are a fast code scout. Liste apenas os arquivos e linhas
onde o alvo aparece. NĂŁo explique, nĂŁo opine. SĂł o mapa.
# ââ 2) feature-builder.md ââ implementa um passo do plano
---
name: feature-builder
description: Implementa um passo bem-definido de um plano
(uma função, uma validação, um endpoint) e roda os testes.
tools: Read, Edit, Write, Bash
model: sonnet # â constrĂłi cĂłdigo: o operĂĄrio competente
---
You are a focused implementer. Implemente exatamente o passo
pedido, siga o padrĂŁo do projeto e rode os testes ao final.
# ââ 3) security-reviewer.md ââ caça falha de segurança
---
name: security-reviewer
description: Revisa o diff em busca de falhas de segurança
(injeção, vazamento, authz). Use após mexer em auth/pagamentos.
tools: Read, Grep, Glob # read-only: revisor nĂŁo edita
model: opus # â raciocĂnio de segurança: o erro Ă© caro
---
You are a senior security reviewer. Pense como atacante.
Aponte cada risco com arquivo:linha e a gravidade. NĂŁo conserte.
Only locates and lists. Zero deep reasoning â the cheapest and fastest tier is the right one.
Writes correct code following a plan. Real implementation work â the medium default.
Tracking down a bug requires deep thinking, and mistakes are costly â the higher tier is justified here.
Ready-made prompts (copy and paste)
Three prompts to tell the orchestrator match model to task. Notice the pattern: you say the tier e a reason â and keep the cheap work on Haiku and the expensive work on Opus.
Use um subagente em Haiku pra escanear /auth e me
trazer sĂł os trechos que tocam o login. Depois,
com esse resumo, use Opus sĂł pra decidir onde estĂĄ
o bug. NĂŁo rode o Opus na varredura.
Crie um subagente "doc-summarizer" read-only com
model: haiku â a tarefa Ă© sĂł ler docs e resumir,
entĂŁo quero o tier mais barato e rĂĄpido.
Esse é um revisor de segurança: coloque model: opus.
O erro aqui Ă© caro, entĂŁo quero o raciocĂnio mĂĄximo,
mesmo custando mais. Mantenha o agente read-only.
Simulated screen: each subagent's model
This is how the choice appears in the terminal. The lead launched three subagents, and the status line shows, for each one, which model is running. Notice the design: the scanning fleet in Haiku, the builder in Sonnet, and only the security reviewer in Opus â expensive boss, cheap workers.
â Illustrative recreation of the terminal (not a real screenshot). The status line reveals each subagent's model â and the cheap fleet carries most of the workload.
Exercise: assign a model to 6 tasks
For each of the 6 tasks below, choose the tier â Haiku, Sonnet or Opus â and write one sentence justifying. Use the decision table as a guide.
The 6 tasks
- Search which of the project's 300 files the function
parseTokenis called. - Decide how to reorganize the folder architecture of a monorepo that has grown too large.
- Implement the phone number mask in a form field, following the projectâs pattern.
- Summarize a 4,000-line build log into the 5 errors that matter.
- Audit a payment endpoint for authorization flaws.
- Review a 60-line diff that adds a button and adjusts CSS.
â Verification criteria â annotated answer key
Check your answer against this answer key. Getting it right tier matters, but getting the reason matters more â it's what you'll reuse in new tasks.
- 1.Haiku â it's pure "find and report," high volume, zero deep reasoning.
- 2.Opus â architecture: a far-reaching decision thatâs costly to get wrong.
- 3.Sonnet â build well-defined code following a pattern: the worker.
- 4.Haiku â summarizing a log is reading compression, disposable and fast.
- 5.Opus â payment security: think like an attacker; mistakes are extremely costly.
- 6.Sonnet â review a trivial diff: standard review work, with no high risk.
Tier scorecard: Haiku Ă2 · Sonnet Ă2 · Opus Ă2. If you threw everything at Opus, reread topic 3 â Opus is the minority.
Solved example
Task: "search where parseToken is called in all 300 files.â Tier: Haiku. Reason: is a "find and report" sweepâhigh volume, disposable reading, no tough decisions; paying for Sonnet or Opus here would be burning money.
â Module summary
Next module:
3.2 â The real savings. Smart boss + Haiku fleet, CLAUDE_CODE_SUBAGENT_MODEL, maxTurns and why multi-agent work costs ~15Ăâand when itâs worth it.