CLAUDE_CODE_SUBAGENT_MODEL becomes a default instead of an override in Claude Code
From Claude Code 2.1.251, CLAUDE_CODE_SUBAGENT_MODEL sets the default subagent model only; an agent definition's model field and an explicit per-spawn model now take precedence over it. Claude Code 2.1.257 adds CLAUDE_CODE_SUBAGENT_MODEL_FORCE to restore the old override behaviour.
What does this mean for me?
Action needed
Engineering leadership
Cost, risk, timeline, team impact Action neededIf you set CLAUDE_CODE_SUBAGENT_MODEL to hold subagents on a cheaper or approved model, that pin stopped working in Claude Code 2.1.251. Have the team set CLAUDE_CODE_SUBAGENT_MODEL_FORCE (2.1.257 or later) or expect subagent spend and model usage to drift to whatever agent definitions name.
Engineer
What to change, what breaks, what to test Action neededFrom 2.1.251, an agent's model: frontmatter and an explicit per-spawn model override CLAUDE_CODE_SUBAGENT_MODEL. To restore the old override behaviour, upgrade to 2.1.257 and set CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1; otherwise audit your agent definitions for model: fields you no longer want.
General consumer
Using the Claude apps, not the API No impactNothing to do. This is a Claude Code environment-variable change and does not affect the Claude apps.
Claude Code 2.1.251 (August 28, 2026) changes the precedence of CLAUDE_CODE_SUBAGENT_MODEL. It used to override every subagent’s model. It now sets the default only: an agent definition’s model: frontmatter and an explicit model passed when spawning an agent win over it. Teams that set the variable to pin subagents to a cheaper or approved model will find agents with their own model: field running on that model instead after the upgrade.
Claude Code 2.1.257 (September 1, 2026) adds CLAUDE_CODE_SUBAGENT_MODEL_FORCE, which applies CLAUDE_CODE_SUBAGENT_MODEL (or the main model when it is unset) to every subagent, ignoring per-spawn and agent-definition overrides. Setting it restores the pre-2.1.251 behaviour.
Related in the same window: 2.1.259 fixes frontmatter model: on custom commands and skills being ignored in interactive sessions, and auto mode no longer runs a turn on an unsupported model named by a command’s frontmatter; 2.1.267 fixes effort: frontmatter being ignored on models whose default effort is pinned.
API surface
| Parameter | Change | Breaking | Models |
|---|---|---|---|
CLAUDE_CODE_SUBAGENT_MODEL | changed | yes | |
CLAUDE_CODE_SUBAGENT_MODEL_FORCE | added | no |
Topics: Agents and tool use, Coding tools