⌨️CLAUDE_CODE_SUBAGENT_MODEL
Also known as CLAUDE_CODE_SUBAGENT_MODEL environment variable
It sets the model for helpers that have none.
Think of it like
It is like the shoes you hand a helper who did not bring any.
Example
Jack works on Opus but wants cheap helpers. He sets this to haiku, and every subagent with no model of its own runs on Haiku.
Why it matters
Helpers can run on a cheaper model while the main chat stays on a strong one.
Definition
Example code
bash
export CLAUDE_CODE_SUBAGENT_MODEL=haiku
claudeCommon mistake
Key takeaways
- 1Fills the gap. Agents with no model.
- 2Two things beat it. The call and the file.
- 3inherit means unset. Same as leaving it out.