[BUG] Intermittent Task/subagents fail with API Error: 400 The provided model identifier is invalid while main agent succeeds (Bedrock)
Resolved 💬 4 comments Opened Dec 31, 2025 by bameur Closed Jan 12, 2026
# Intermittent Task/Subagent failure: `400 The provided model identifier is invalid` (Bedrock)
## Summary
When running Claude Code with AWS Bedrock enabled, `Task` subagents fail intermittently (~2 runs out of 3) with a 400 error.
## Error
```text
API Error: 400 The provided model identifier is invalid
invalid model: us.anthropic.claude-sonnet-4-5-20250929-v1:0
subagent failed after 3 attempts
Expected
Subagents invoked via Task should reliably use the same provider/model configuration as the parent run, and should not fall back to an invalid default model identifier.
Configuration (env + settings.json)
Environment variables
CLAUDE_CODE_USE_BEDROCK=1
CLAUDE_PROVIDER=bedrock
BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet
AWS_REGION=eu-west-3
ANTHROPIC_MODEL=eu.anthropic.claude-haiku-4-5-20251001-v1:0
ANTHROPIC_SMALL_FAST_MODEL=eu.anthropic.claude-sonnet-4-5-20250929-v1:0
ANTHROPIC_DEFAULT_HAIKU_MODEL=eu.anthropic.claude-haiku-4-5-20251001-v1:0
settings.json (as written)
{
"env": {
"AWS_ACCESS_KEY_ID": "${AWS_ACCESS_KEY_ID}",
"AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}",
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_REGION": "${AWS_REGION}",
"ANTHROPIC_MODEL": "${ANTHROPIC_MODEL}",
"ANTHROPIC_SMALL_FAST_MODEL": "${ANTHROPIC_SMALL_FAST_MODEL}",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "${ANTHROPIC_DEFAULT_HAIKU_MODEL}",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "50000",
"MAX_THINKING_TOKENS": "1024"
},
"permissions": {
"allow": [
"Bash(dir:*)",
"Bash(cat:*)",
"Bash(find:*)",
"Bash(nul)",
"Bash(findstr:*)",
"Bash(git diff:*)",
"Bash(git grep:*)"
],
"deny": [],
"ask": []
}
}
Note
I’m not explicitly selecting us.anthropic.claude-sonnet-4-5-20250929-v1:0 anywhere; it appears as a fallback/default during Task subagent execution.
Question
Will the Bedrock model/region configuration issue be fixed in the next release? It’s mentioned in several issues.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗