[BUG] VS Code extension: subagents are shown running with the main session model despite `CLAUDE_CODE_SUBAGENT_MODEL` being set
Summary
With the subagent model forced to Sonnet in ~/.claude/settings.json, the VS Code extension shows subagents running on Opus. The same UI showed Sonnet for subagents before; the change appeared within the last two extension versions.
Steps to reproduce
- Set in
~/.claude/settings.json:
``json``
{
"env": {
"CLAUDE_CODE_SUBAGENT_MODEL": "sonnet",
"CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
}
}
- Start a session in the VS Code extension with Opus as the main model.
- Have Claude spawn a built-in subagent (Explore) without passing a model.
- The UI shows the subagent on Opus.
Both variables are present in the session's process environment.
Expected
Per Run every subagent on one model: "If you set both variables, subagents run on the model in CLAUDE_CODE_SUBAGENT_MODEL", and while forcing is on, "Claude Code ignores the model field of every subagent definition, including the built-in Explore and Plan subagents."
Environment
- VS Code extension
anthropic.claude-code2.1.283 (darwin-arm64); the docs state forcing requires v2.1.257 or later - macOS 26.6.2, Apple Silicon
- Anthropic API
Why this matters
Subagent model choice drives cost and usage limits. Configured Sonnet work showing as Opus means either the more expensive model is running, or the UI misreports the model; neither can be checked from the settings alone.
Related
- #43869 — subagent routing resolving to the parent's Opus (Windows, filed before
CLAUDE_CODE_SUBAGENT_MODEL_FORCEexisted) - #77655 — subagent view showing the main session's model
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗