Which model actually runs your subagent.
Setting model: opus on a subagent isn’t the whole story. Four things compete to decide, and which one wins changed
in Claude Code 2.1.251. The same unedited configuration resolved to Haiku before that release and
Opus after it, and nothing in the file says which one you got.
Start with a scenario, then change anything. This page has no server and sends nothing anywhere.
Start here
Until 2.1.251, the environment variable won and the agent quietly ran on Haiku. From 2.1.251 on, the definition wins. It is the same file with the opposite answer, and there is no warning either way.
The answer
On 2.1.278, this subagent runs on
opus
The definition’s model: field wins.
-
Warning: Flips at 2.1.251. It resolved to
haikubefore that release andopusfrom it on. That is a silent move up to a more expensive tier, with no edit to any file.
Your configuration
Type a version or drag the slider. The range is 2.1.190 to 2.1.289.
Resuming, or sending a follow-up, behaved differently before 2.1.211.
How it resolved
- Not applicable: No per-invocation model.
- Decided: The definition’s
model: opuswins. - Ignored: The env var
haikuis only a default since 2.1.251, so it is outranked. - Not applicable: The main model isn’t needed.
The same config across every version
Every other control stays put while the version changes. Darker means more expensive.
Select a segment or a flip to move the version control there.
Where the answer flips
- haiku: Tier 1, cheapest
- sonnet: Tier 2
- opus: Tier 3
- fable: Tier 4, most expensive
- unrecognized model ID: No tier, price unknown
Change the version range
The rules are verified through 2.1.289. A longer range assumes nothing changes after that.
Check your own setup
Drop your agent folders and settings files, or paste a few commands’ output, and see which of your agents change across 2.1.251. This page has no server and sends nothing anywhere.
Loading the setup checker…
Releases that change the answer
The Source column says where each rule was verified. A rule marked “docs only” is in the documentation but not the changelog.
| Version | Change | Source |
|---|---|---|
| 2.1.196 | Setting the env var to inherit became equivalent to leaving it unset. Before this release, inherit forced subagents onto the main model and ignored every other source. | docs only |
| 2.1.198 | Built-in Explore began inheriting the main model, capped at Opus, instead of always running on Haiku. Subagents also began inheriting the session’s extended-thinking setting. | changelog + docs |
| 2.1.211 | Resuming a subagent, or sending it a follow-up, keeps its per-invocation model. Before this release, it reverted to the definition’s model field or the main model. (The changelog says “the parent’s model.”) | changelog + docs |
| 2.1.222 | A blocked family alias resolves to the newest permitted version of that family. Before this release, it fell back to the inherited model. | changelog + docs |
| 2.1.223 | A warning appears when a requested subagent model is restricted and the parent model runs instead. | changelog |
| 2.1.232 | Subagent forking became on by default: a fork inherits the full conversation and prompt cache. | changelog |
| 2.1.243 | The /tasks command names the model, and the effort level, on each subagent row. This was the first way to observe the resolved model directly. The docs say 2.1.242, but the changelog has no 2.1.242 entry. | changelog |
| 2.1.251 | The reversal. The env var went from overriding everything to setting a default. The definition’s model: and an explicit per-spawn model now win over it. | changelog + docs |
| 2.1.257 | CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 arrived. It applies the env model, or the main model, to every subagent and ignores per-spawn and definition models. The exemptions for forks and model: inherit skills come from the docs. | changelog + docs |
| 2.1.284 | Explore stopped switching to Opus when the session runs an unrecognized model ID. It now inherits that model. | changelog |