[BUG] `AWS_BEARER_TOKEN_BEDROCK` auth broken in 2.1.92+ (regression from 2.1.91)
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?
Bedrock bearer token authentication stopped working in 2.1.92. Every request returns "403 {"Message":"Authorization header is missing"}" from AWS Bedrock. Downgrading to 2.1.91 fixes the issue immediately without any config changes.
What Should Happen?
Requests should authenticate via AWS_BEARER_TOKEN_BEDROCK set in ~/.claude/settings.json, as they did in 2.1.91.
Error Messages/Logs
Failed to authenticate. API Error: 403 {"Message":"Authorization header is missing"}
Retrying in 4 seconds… (attempt 5/10)
Steps to Reproduce
- Configure
~/.claude/settings.jsonwithCLAUDE_CODE_USE_BEDROCK=1and a validAWS_BEARER_TOKEN_BEDROCK - Run
claudeorclaude -p "test" - Observe 403 {"Message":"Authorization header is missing"}
Notes:
- The token is valid —
aws bedrock list-foundation-models --region us-west-2succeeds with the same token - Setting env vars explicitly before launching (
CLAUDE_CODE_USE_BEDROCK=1 AWS_BEARER_TOKEN_BEDROCK=... claude -p "test") also fails - Downgrading to 2.1.91 fixes it:
ln -sf ~/.local/share/claude/versions/2.1.91 ~/.local/bin/claude - Versions 2.1.92 and 2.1.94 both fail
- macOS Darwin 25.2.0, native install
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.91
Claude Code Version
2.1.94
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Warp
Additional Information
Auth is configured entirely via ~/.claude/settings.json env block — no oauthAccount or primaryApiKey in ~/.claude.json. The settings.json env injection appears to work, but the Bedrock client constructor reads process.env before the injection runs, so the token is missing at request time.
Relevant settings.json structure:
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_BEARER_TOKEN_BEDROCK": "<token>",
"ANTHROPIC_BEDROCK_BASE_URL": "https://bedrock-runtime.us-west-2.amazonaws.com/",
"ANTHROPIC_MODEL": "us.anthropic.claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "us.anthropic.claude-sonnet-4-6"
}
}This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗