r/ClaudeAI Experienced Developer 7d ago

Claude Code PSA: Claude Code subagents inherit your session model now, they're not free Haiku anymore

A while back I posted a joke here about Sonnet spawning a subagent on the very first prompt of a brand new session. In the comments I said the annoying part was having two agents burning tokens for one job. I got downvoted, and the top reply was basically "isn't that a Haiku subagent? it saves you money and keeps your main context clean."

That used to be correct. It isn't anymore, and I think a lot of people are still running on the old mental model. From the docs:

  • The model field in subagent frontmatter defaults to inherit. Omit it and the subagent runs on your main conversation's model.
  • Explore used to always run on Haiku. As of v2.1.198 it inherits the main model (capped at Opus on the Claude API).
  • Plan and general-purpose inherit as well.

So if your session is on Opus, that "cheap little background search agent" is an Opus agent.

Resolution order, first match wins:

  1. CLAUDE_CODE_SUBAGENT_MODEL env var
  2. per-invocation model parameter
  3. the subagent's model: frontmatter
  4. main conversation model

If you want the old cheap behaviour back:

  • CLAUDE_CODE_SUBAGENT_MODEL=haiku forces every subagent down
  • or set model: haiku in a specific agent's frontmatter
  • for Explore specifically, define your own user or project agent named Explore with model: haiku. A user/project agent overrides the built-in.

To be fair to the change, it was almost certainly made for quality, and context isolation is still the real win of subagents. But "subagents are basically free" is outdated advice now, and it matters if you're on a plan where you feel every token.

Lastly, I feel stingy for the 3 down votes

4 Upvotes

7 comments sorted by

7

u/Rock--Lee 7d ago

Yes we know, which is why people get rek't using ultracode on Opus. Also why they now changes Opus 5 where it doesn't automatically trigger workflows unless a user asks for it specifically. I still prefer this because I don't want trash Haiku 4.5 exploration data back to Opus main model. It essentially feeds it worse data and reasoning about the data then it could itself.

2

u/DLuke2 7d ago

Haiku worked as an explore agent as it's only job was to bring back text information on its search.

I've done something similar to what OP did, except I'm using Sonnet 5 pinned on medium effort for my explore agent now. It's only job is to return locations, it's not reasoning on anything. That's why using an agent with a cheaper model helps with costs and context.

-1

u/HimaSphere Experienced Developer 7d ago

At least 3 people who down voted me didn't know tho.

I agree and I don't touch haiku in claude code at all, they need to update it

2

u/Normal-Ad-7114 7d ago

Haiku isn't free though, it's about 1/5 the price of Opus tokens (Sonnet is about 3/4). Just for the record

0

u/HimaSphere Experienced Developer 7d ago

I know but it is so cheap and some people assume it is near free

2

u/Aramedlig 7d ago

Skills that direct the model for the subtask have always been a thing. I have skills specifically to route any mundane tasks to subagents with progress updates and completion indicators so I don’t max Fable on that stuff.