Team agent teammates receive normalized model ID instead of Bedrock model ID, causing 400 errors
Bug Description
When using Claude Code with AWS Bedrock (CLAUDE_CODE_USE_BEDROCK=1), spawning team agent teammates fails because the Bedrock model identifier is normalized to the Anthropic API format, which Bedrock does not recognize.
Environment
- Claude Code version: 2.1.39
- OS: macOS (Darwin 25.2.0)
- API Provider: AWS Bedrock (
CLAUDE_CODE_USE_BEDROCK=1) - Model:
us.anthropic.claude-opus-4-6-v1 - Feature flag:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Steps to Reproduce
- Configure Claude Code to use Bedrock:
``json``
// settings.json
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "us-east-1"
},
"model": "us.anthropic.claude-opus-4-6-v1"
}
- Create a team using
TeamCreate - Spawn a teammate using the
Tasktool withteam_nameparameter
Expected Behavior
The teammate process should be spawned with the full Bedrock model ID:
claude --model us.anthropic.claude-opus-4-6-v1 --agent-id agent-b@team-name ...
Actual Behavior
The teammate process is spawned with a normalized (Anthropic API format) model ID:
claude --model claude-opus-4-6 --agent-id agent-b@team-name ...
This causes:
API Error (claude-opus-4-6): 400 The provided model identifier is invalid.
Evidence
Team config file shows the discrepancy clearly:
{
"members": [
{
"name": "team-lead",
"model": "us.anthropic.claude-opus-4-6-v1" // ✅ Correct Bedrock format
},
{
"name": "agent-b",
"model": "claude-opus-4-6" // ❌ Normalized to Anthropic API format
}
]
}
Actual spawned process (from ps aux):
/Users/.../.local/share/claude/versions/2.1.39 \
--agent-id agent-b@bedrock-comm-test \
--agent-name agent-b \
--team-name bedrock-comm-test \
--model claude-opus-4-6 # ← Should be us.anthropic.claude-opus-4-6-v1
Root Cause
Claude Code's internal model ID normalization logic strips the Bedrock prefix (us.anthropic.) and suffix (-v1) when passing the model identifier to teammate subprocesses. This normalization is appropriate for Anthropic API but breaks Bedrock compatibility.
Impact
- Team/swarm features are completely non-functional when using Bedrock as the API provider
- Both
TeamCreate+Task(withteam_name) and standaloneTasktool teammate spawning are affected - The main session works fine; only spawned teammates fail
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗