Claude Code Subagents Model Selection: One Model per Job
Choosing models for Claude Code subagents comes down to one question: what does a wrong answer cost in this job? Running a test suite and reporting the result is cheap to get wrong, because you can rerun it. Choosing an architecture is expensive to get wrong. We assign models by that cost, and this article shows how we split the jobs, how to set it up, and when a failed check moves up a tier. It is one part of our multi-agent workflow.
Three jobs, three models
Run and report: a small, fast model (Haiku). It runs exact commands we give it and returns a pass/fail table with the first failing line and a log path. It does not explore, and it changes no files. Test suites, lint, type checks and headless browser scripts all fit here.
Build and triage: a mid-tier model (Sonnet) at high effort. It writes the change, writes new check scripts, and looks into a red check: rerun, compare with the base branch, write a minimal reproduction.
Hard calls: the strongest model (Opus) at medium effort. We use it when the builder cannot settle a failure, and for design questions and reviews of risky changes. We run it at medium effort.
Setting it up
In Claude Code a subagent is a Markdown file with YAML frontmatter, kept in .claude/agents/ for a project or ~/.claude/agents/ for all projects. Only name and description are required. model takes an alias such as haiku, sonnet or opus, a full model ID, or inherit. We checked this against Anthropic’s subagent documentation on 3 December 2026; the product changes quickly, so check it again before you copy anything.
---
name: check-runner
description: >
Runs given commands and reports
pass or fail. For test suites,
lint and type checks.
Changes no files.
tools: Bash, Read, Grep, Glob
model: haiku
---
The trap is in the default. If nothing sets a model, the subagent uses the model of the conversation that started it. A helper you meant to be cheap quietly runs on your main model. So each role gets its own file with its model set, and we never dispatch a built-in agent without naming a model.
Escalating after a failed check
A red check moves up exactly one step, and then it stops:
- The check runner reports the failure with the first failing line and a log path.
- A builder-tier model reruns only the failing part, once. If it passes, the cause was a flake under load. Name the timing it depends on.
- The same check runs against the base branch. If it fails there too, the failure was already on the base branch and is not this change’s.
- Otherwise it is a regression. Write the smallest reproduction, the likely cause with file and line, and the fix.
- If the builder-tier model cannot settle it, the strongest model looks.
- After that, stop and tell a person. Do not loop.
One more case: a server that stopped mid-run, with “connection refused” in the log, is an environment problem. Restart it and rerun; never report it as a test failure.
Do not switch the main session’s model for a check
It is tempting to drop the main session to a cheaper model for a test run. We do not. The prompt cache belongs to one model, so the next turn re-reads the whole conversation at full price. Switching down also leaves the design context with a weaker model, which then makes build decisions. Change a session’s model only between stages, and preferably upward.
Where the hours go
Checks use more time than most people expect. On one of our native apps, we measured a day of work: test suites took 62% of 35 worker-hours, while compiling and installing took two minutes. So on that app we stopped running suites for every change. Each change gets a compile, an install and a read-only review, and the full suites run before a release. Do not apply this to a web app with fast CI; it is a trade-off for apps where suites are slow and a release gate exists.
What goes wrong
A cheap model gets a vague job. “Check that it works” produces a confident, shallow answer. Give exact commands, ports and output folders, and ask for a table.
The strongest model runs everything. It works, and it is slow and expensive. Reserve it for what the lower tiers could not settle.
Nobody checks the model actually used. Whoever dispatches a subagent should confirm which model it ran on, especially after changing a default.
A reviewer uses the same model as the author. That undermines the review. Review by a different model is the rule that keeps the choice honest.
Questions
Which model should a Claude Code subagent use?
Match the model to the cost of a wrong answer. We use a small, fast model such as Haiku to run checks and report, a mid-tier model such as Sonnet at high effort to build, and the strongest model such as Opus for hard design calls and risky reviews.
What happens if a subagent has no model set?
It uses the same model as the conversation that started it. A subagent you meant as a cheap helper therefore runs on your main, most expensive model without any warning. Set the model in each subagent's file, and pass one explicitly when you dispatch a built-in agent.
When should a failed check go to a stronger model?
Right away, and one step at a time. The check runner hands the red to a builder-tier model, which reruns the failing part once and compares it with the base branch. If it cannot find the cause, the strongest model looks. After that, stop and tell a person.