[BUG] Agent teams: in-process teammate window header shows the lead's model, not the teammate's actual model
Environment
- Claude Code: 2.1.227 / 2.1.228
- Platform: Linux (Arch, kernel 7.0.10)
- Agent teams:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1,teammateMode: auto(running outside tmux, so teammates use the in-process backend) - Lead session model pinned in
~/.claude/settings.json:"model": "claude-fable-5[1m]" teammateDefaultModel: "sonnet"set via/config→ "Default teammate model"
Bug
When a teammate is spawned (either via the Agent tool with an explicit model, or model-less falling back to teammateDefaultModel) and runs on the in-process backend, the teammate's window/view in the TUI shows the lead session's model ("Fable 5") in the header — not the model the teammate is actually running on.
The teammate genuinely runs the correct model; only the header is wrong.
Repro
- Enable agent teams, run the lead outside tmux (in-process teammate backend), pin the lead to one model (e.g. Fable/Opus) and set "Default teammate model" to a different one (e.g. Sonnet) in
/config. - Spawn a teammate via the Agent tool with
model: "sonnet"(or omitmodelso the default applies). - Switch to the teammate's window in the TUI and look at the model label at the top.
Expected: header shows the teammate's model (Sonnet 5).
Actual: header shows the lead's model (Fable 5).
Evidence that the teammate really runs the right model
- Team roster
~/.claude/teams/session-*/config.jsonrecords the teammate with"model": "sonnet"(and for a model-less spawn,"model": "claude-sonnet-5"resolved fromteammateDefaultModel). - The teammate's transcript (
~/.claude/projects/<proj>/<session>/subagents/agent-a<name>-*.jsonl) stamps every assistant message with"model": "claude-sonnet-5". - Asked to self-report, the teammate answers "I am running as Sonnet 5 (claude-sonnet-5)".
All three disagree with the window header.
Impact
Users conclude that every teammate is burning the expensive lead-tier model and that model routing / teammateDefaultModel is broken, when it is actually working. (That is exactly how this was discovered — an "all my teams spawn as Fable" investigation that turned out to be display-only.) Related-but-different: #68411 reports teammates actually ignoring the configured model; this report is purely the header display for in-process teammates.
🤖 Generated with Claude Code