[BUG] Hardcoded `us.` prefix in Haiku model ID causes AWS Bedrock authentication failures for multi-agents
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using Claude Code with AWS Bedrock, spawning multi-agents (via the Task tool) fails with a 400 error because the Haiku model ID is hardcoded with the deprecated us.anthropic. prefix instead of the correct global.anthropic. prefix. The main conversation works fine, but any sub-agents immediately fail
What Should Happen?
Multi-agents should successfully spawn and execute using the AWS Bedrock model ID with the global. prefix:global.anthropic.claude-3-5-haiku-20241022-v1:0
This would match the modern AWS Bedrock cross-region inference model ID format.
Error Messages/Logs
API Error (us.anthropic.claude-3-5-haiku-20241022-v1:...): 400 The provided model identifier is invalid.
Steps to Reproduce
Environment Setup:
# Set environment variables
export ANTHROPIC_MODEL="global.anthropic.claude-sonnet-4-5-20250929-v1:0"
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_DEFAULT_REGION="eu-central-1"
Steps:
- Start Claude Code:
claude
- Attempt to spawn any multi-agent by using a command that invokes the Task tool. For example:
User: "Can you use the claude-code-guide agent to look up how hooks work?"
- Observe the immediate error:
API Error (us.anthropic.claude-3-5-haiku-20241022-v1:...): 400 The provided model identifier is invalid.
- Note that the main conversation (using Sonnet) works fine - only sub-agents fail.
Minimal Example:
Any Task tool invocation will reproduce this. The simplest way:
- Main model (Sonnet with global. prefix): ✅ Works
- Sub-agent model (Haiku with hardcoded us. prefix): ❌ Fails
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.71 (Claude Code)
Platform
AWS Bedrock
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Additional Information
Configuration:
- Claude Code Version: 2.0.71
- Platform: Kubeflow notebook pod (Linux), but affects all platforms
- Region:
eu-central-1(issue affects all non-US regions) - Working Environment Variables:
ANTHROPIC_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0CLAUDE_CODE_USE_BEDROCK=1AWS_DEFAULT_REGION=eu-central-1
Root Cause Analysis:
Inspection of the Claude Code binary (v2.0.71) reveals hardcoded model IDs:
# From the minified Claude Code binary:
FUA = {
firstParty: "claude-3-5-haiku-20241022",
bedrock: "us.anthropic.claude-3-5-haiku-20241022-v1:0", // ❌ Hardcoded old prefix
vertex: "claude-3-5-haiku@20241022",
foundry: "claude-3-5-haiku"
}
The main conversation model is configurable via ANTHROPIC_MODEL (allowing users to use global.), but sub-agent models use these hardcoded values with the deprecated us. prefix.
Why This Matters:
AWS Bedrock has migrated to cross-region model IDs using the global. prefix. The us. prefix is deprecated and causes failures in regions outside of us-east-1 and us-west-2.
This should be applied to all models including:
- Claude 3.5 Haiku
- Claude Haiku 4.5
- Claude Sonnet 4/4.5
- Claude Opus 4/4.1/4.5
Current Workaround:
Avoid using multi-agent features until fixed. Main conversation works fine.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗