Skip to content
← Back to release · 2.1.257
New features / v2.1.257

Force a consistent subagent model

CHANGELOG · original

Added CLAUDE_CODE_SUBAGENT_MODEL_FORCE to apply CLAUDE_CODE_SUBAGENT_MODEL (or the main model) to every subagent, ignoring per-spawn and agent-definition model overrides
Open official changelog ↗

Documentation

Documentation excerpt

Run every subagent on one model

CLAUDE_CODE_SUBAGENT_MODEL is a default, so a subagent's definition or a model Claude passes still takes precedence over it. To apply one model to every subagent, teammate, and workflow agent, also set CLAUDE_CODE_SUBAGENT_MODEL_FORCE to 1. Requires Claude Code v2.1.257 or later.

  • If you set both variables, subagents run on the model in CLAUDE_CODE_SUBAGENT_MODEL.
  • If you set only CLAUDE_CODE_SUBAGENT_MODEL_FORCE, subagents run on the main conversation's model.

For example, to run every subagent on Haiku, set both variables in the env block of a settings file:

{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
    "CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
  }
}

To check that the setting took effect, run /tasks while a subagent is running. The subagent's row shows the model it runs on.

While CLAUDE_CODE_SUBAGENT_MODEL_FORCE is on, Claude Code ignores the model field of every subagent definition, including the built-in Explore and Plan subagents, and Claude can't pass a model when it starts a subagent. Two kinds of subagent still run on the main conversation's model:

When you set only CLAUDE_CODE_SUBAGENT_MODEL_FORCE, the built-in Explore subagent keeps its model cap.

Documentation snapshot · 2026-09-23

Change details