What
CLAUDE_CODE_SUBAGENT_MODEL is the environment variable that picks the model for subagents, the helpers Claude Code starts to handle parts of a task. Two changes affect it.
- Desktop repository settings: when settings are applied for the desktop Code tab (
firstPartyCodeTab), the value is accepted only if it is empty,inherit,haiku,sonnet,opus, or a claude-haiku, claude-sonnet or claude-opus model id. It is refused if a policy forces the model. Refused values are logged with the reason "desktop repository model". - Session info: an optional, internal field
subagentModelnow reports the model ID thatCLAUDE_CODE_SUBAGENT_MODELnames, for a host that starts another session.
Why
A repository opened in the desktop Code tab can no longer point subagents at an arbitrary value or override a model your policy forces. Desktop and other host apps that start sessions can now see which subagent model is in use.
Names in the bundleCLAUDE_CODE_SUBAGENT_MODEL