CLAUDE_CODE_SUBAGENT_MODEL vs CLAUDE_CODE_SUBAGENT_MODEL_FORCE
People think CLAUDE_CODE_SUBAGENT_MODEL sets the model for every helper. It does not. A model in the helper's own file wins over it, and so does a model Claude names when it starts the helper. The FORCE switch, set to 1, flips that order. Then your pick wins over both, and every helper runs on it.
CLAUDE_CODE_SUBAGENT_MODEL
It sets the model for helpers that have none.
CLAUDE_CODE_SUBAGENT_MODEL sets the model for helper agents that do not get one some other way. That means subagents, teammates and workflow agents. Two things win over it. One is a model Claude names when it starts the agent, and the other is a model in the agent's own file. It takes an alias such as haiku, or a full name. Set to inherit, it is the same as not set.
CLAUDE_CODE_SUBAGENT_MODEL_FORCE
Set to 1, it puts one model on each helper.
CLAUDE_CODE_SUBAGENT_MODEL_FORCE set to 1 puts the subagent model on each helper agent. It wins over a model Claude names. It also wins over the model in an agent's own file. That covers the Explore and Plan agents that come built in. It needs Claude Code 2.1.257 or later.
In one line
- CLAUDE_CODE_SUBAGENT_MODEL
- It sets the model for helpers that have none.
- CLAUDE_CODE_SUBAGENT_MODEL_FORCE
- Set to 1, it puts one model on each helper.