Agent Teams: Support per-teammate model configuration
Feature Request
Problem
When using Agent Teams (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS), there is no way to specify different models for individual teammates. All teammates unconditionally inherit the team lead's model (e.g., Opus), regardless of any configuration attempt.
What I've Tried
| Method | Result |
|--------|--------|
| Agent file frontmatter model: sonnet | ❌ Ignored in Teams (works for standalone sub-agents) |
| Natural language "Use Sonnet for each teammate" | ❌ Ignored |
| Full model ID claude-sonnet-4-6 in frontmatter | ❌ Ignored |
| Environment variable CLAUDE_CODE_SUBAGENT_MODEL=sonnet via Bash export | ❌ Not passed to Agent Teams process |
| Environment variable in ~/.claude/settings.json env | ❌ Works for standalone sub-agents, ignored in Agent Teams |
Expected Behavior
Ability to specify per-teammate models in Agent Teams, similar to how standalone sub-agents support the model field in .claude/agents/*.md frontmatter.
Use Case
Running a mixed-model team for cost optimization:
- Opus for complex roles (tech-lead, PM) requiring deep reasoning
- Sonnet for execution-heavy roles (frontend-dev, backend-dev, infra, QA, designer)
This would significantly reduce API costs while maintaining quality where it matters most.
Suggested Solutions (any of these would work)
- Add a
modelparameter to theAgenttool when spawning teammates - Respect the
modelfrontmatter in custom agent files (.claude/agents/*.md) when used in Teams - Add a Teams-specific environment variable (e.g.,
CLAUDE_CODE_AGENT_TEAMS_DEFAULT_MODEL)
Environment
- Claude Code version: latest
- Feature flag:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 - OS: macOS
11 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2172
2.1.72 fix the bug, but I haven't verified it yet.
I tested it and I'm sure it didn't fix it.
v2.1.74 maybe fix it, i tested it
Bro, I still have a problem here. Are you sure you have fixed it? Does teammate inherit the lead model
Indeed, someone have reported that there are still problems, and I need to check it again.
i am sure, it not works
@kodlong — I ran into the same frustration with per-teammate model config. I built claude-alias-patch which patches Claude Code to support custom model aliases beyond sonnet/opus/haiku.
You define aliases via env vars like
ANTHROPIC_DEFAULT_GEMINI_MODEL,ANTHROPIC_DEFAULT_GPT_MODEL, etc. in~/.claude/settings.json. The patch makes them available in the Agent tool's model parameter, agent frontmatter, and the model picker — so you can assign different models to different teammates.It's a single install script that auto-patches your Claude instance. No need to re-patch when you change models — just edit settings and restart.
Until native per-teammate model configuration is supported, you can use a PreToolUse hook on the Agent tool to inject model preferences:
Since standalone agents respect the
modelfrontmatter, you can emulate teams with individual agent spawns:Then use
Agenttool withsubagent_typepointing to specific agents instead ofteam_name.The hook can also log which model each teammate should use, helping you track costs per teammate role.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.