Task tool ignores model configuration when using AWS Bedrock

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Jan 27, 2026 · closed Jan 27, 2026

Description

When using Claude Code with AWS Bedrock, the Task tool for spawning subagents ignores all model configuration and uses a hardcoded model ID that doesn't exist.

Environment

  • AWS Bedrock
  • Model configured in settings.json: us.anthropic.claude-opus-4-5-20251101-v1:0

Expected Behavior

Task tool should use the model from:

  1. Explicit model parameter in Task tool call
  2. model field in agent frontmatter (e.g., ~/.claude/agents/my-agent.md)
  3. model in ~/.claude/settings.json

Actual Behavior

Task tool always uses .anthropic.claude-sonnet-4-5-20250929-v1:0 which:

  1. Is missing the us prefix required for Bedrock
  2. References a Sonnet version that doesn't exist

Error

API Error (.anthropic.claude-sonnet-4-5-20250929-v1:0): 400 The provided model identifier is invalid.

Reproduction Steps

  1. Configure Claude Code for AWS Bedrock with settings.json:
{
  "model": "us.anthropic.claude-opus-4-5-20251101-v1:0",
  "env": {
    "CLAUDE_CODE_USE_BEDROCK": "1",
    "AWS_REGION": "us-east-1"
  }
}
  1. Create a custom agent in ~/.claude/agents/test-agent.md:
---
name: test-agent
description: Test agent
tools: Bash
model: opus
---
Test prompt: $ARGUMENTS
  1. Try to spawn the agent or use Task tool directly with model: "opus" parameter
  1. Observe error - Task tool ignores all model settings and uses broken hardcoded model

Workaround

Use MCP tools directly instead of spawning subagents. MCP tools run in the main conversation which respects the model setting.

Impact

All custom agents and Task tool subagents are completely broken when using Bedrock.

View original on GitHub ↗

4 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16594
  2. https://github.com/anthropics/claude-code/issues/18873
  3. https://github.com/anthropics/claude-code/issues/11489

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

svailla4 · 8 months ago

not a duplicate this affects custom sub agents

svailla4 · 8 months ago

IT misconfiguration

github-actions[bot] · 8 months ago

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.