[BUG] Team agent teammates don't inherit [1m] context window variant from leader (v2.1.80)
Bug Description
Team agent teammates (spawned via TeamCreate + Agent with team_name) inherit the leader's model ID (claude-opus-4-6) but NOT the [1m] context window variant. The leader runs on claude-opus-4-6[1m] (1M context), but spawned teammates resolve to claude-opus-4-6 (200k context).
This is distinct from #32368 (model ID inheritance, fixed in v2.1.72) — the model ID inherits correctly, but the context window modifier is stripped.
Steps to Reproduce
- Start Claude Code on Max plan —
/modelshows "Default (recommended) — Opus 4.6 with 1M context" selected - Configure
~/.claude/settings.json:
{
"model": "opus[1m]",
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
"CLAUDE_CODE_SUBAGENT_MODEL": "opus[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6[1m]"
}
}
- Create a team:
TeamCreate - Spawn a teammate:
Agentwithteam_nameparameter - In the teammate's pane, run
/model
Expected Behavior
Teammate's /model shows option 1: "Default (recommended) — Opus 4.6 with 1M context" ✔
Actual Behavior
Teammate's /model shows option 5: "Opus 4.6 — claude-opus-4-6" selected (200k, no 1M)
The teammate's system prompt confirms: "You are powered by the model named Opus 4.6. The exact model ID is claude-opus-4-6." — no [1m] suffix.
Notes
- Standalone subagents (no
team_name) DO correctly inheritopus[1m]viaCLAUDE_CODE_SUBAGENT_MODEL— their system prompt showsclaude-opus-4-6[1m] - Team teammates spawned via
TeamCreate+Agent(team_name=...)do NOT pick upCLAUDE_CODE_SUBAGENT_MODEL,model, orANTHROPIC_DEFAULT_OPUS_MODELfor the[1m]variant - The model ID itself inherits correctly (teammates get
claude-opus-4-6, not a different model) — only the[1m]context modifier is lost - v2.1.72 changelog says "Fixed team agents to inherit the leader's model" — this fixed the model ID but not the context window variant
Environment
- Claude Code: v2.1.80
- Plan: Claude Max
- OS: macOS (Darwin 25.3.0, M5 Max)
- Terminal: iTerm2 with tmux teammate mode
- Leader model:
claude-opus-4-6[1m](confirmed via/model→ option 1)
Related Issues
- #32368 — Team agents model inheritance (fixed in v2.1.72, but
[1m]variant still stripped) - #29231 — Task tool subagent spawning ignores model context window variant
- #33154 — Cowork forces
claude-opus-4-6[1m]causing rate limits
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗