What
A subagent is a helper that Claude Code starts to handle part of a task. The new environment variable CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL sets the model for subagents started inside a workflow run. An environment variable is a named setting passed to a program when it starts.
- If it is unset, empty or
inherit(in any capitalisation), nothing changes. - Any other value is used as the model for workflow subagents, and only in workflow runs.
- A model named for one agent inside the workflow is then ignored, and Claude Code logs a message saying so.
- If
CLAUDE_CODE_SUBAGENT_MODEL_FORCEis also set, the workflow value is checked again and may be ignored.
The reference Claude uses when writing workflows also treats this variable like CLAUDE_CODE_SUBAGENT_MODEL_FORCE, so its guidance changes when the variable is set.
Why
You can now keep workflow subagents on a different model from ordinary subagents.
Names in the bundleCLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's release notes agree
Added CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL to run every workflow agent on one model while other subagents keep theirs
The name it cites is new in this build
New in this build: CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL