CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL

Updated by

CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL is a Claude Code environment variable: Runs every workflow agent on the named model while other subagents keep their own. A value of inherit disables the override, and the existing CLAUDE_CODE_SUBAGENT_MODEL_FORCE still governs whether a forced model wins. Added in v2.1.296 and still present in v2.1.299. It is not in the official reference.

StatusPresent in v2.1.299
AddedAdded in v2.1.296
CategoryAgents and subagents
Official docsNot listed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL": "<value>"
  }
}

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL do?

Runs every workflow agent on the named model while other subagents keep their own. A value of inherit disables the override, and the existing CLAUDE_CODE_SUBAGENT_MODEL_FORCE still governs whether a forced model wins.

Which Claude Code version has CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL?

Added in v2.1.296 and still present in v2.1.299.

How do I set CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL?

Export it before starting Claude Code (export CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.

All variables, searchable: Claude Code environment variables.