anthropics / anthropics/claude-code-action
[BUG] v1.0.113 breaks AWS Bedrock: claude-agent-sdk@0.2.129 sends anthropic_beta in request body, causing 400 invalid beta flag
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### What's Wrong?
Starting from `claude-code-action@v1.0.113` (released 2026-05-06), all workflows using AWS Bedrock fail immediately with:
```
API Error: 400 invalid beta flag
```
The previous version `v1.0.112` (released 2026-05-04) worked correctly.
### Root Cause
`v1.0.113` bumped `@anthropic-ai/claude-agent-sdk` from `0.2.128` to `0.2.129`. The new SDK sends beta flags in the **request body** (`anthropic_beta` field) when talking to Bedrock, but Bedrock only accepts them as the `anthropic-beta` **HTTP header**. Any value in the body causes a 400 error.
This is the same root cause documented in [anthropics/claude-code#49238](https://github.com/anthropics/claude-code/issues/49238), now surfacing in the Agent SDK layer.
### Evidence from Action Logs
```
CLAUDE_CODE_USE_BEDROCK: 1
+ @anthropic-ai/claude-agent-sdk@0.2.129 ← new SDK version
API Error: 400 invalid beta flag
at readMessages (.../claude-code-action/v1/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:60:18101)
```
Fails on the very first API call (`num_turns: 1`, `duration_ms: 1226`, `input_tokens: 0`).
### Why CLI Workarounds Don't Help
`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and `CLAUDE_CODE_SIMULATE_PROXY_USAGE=1` are Claude Code **CLI** flags. They have no effect on `claude-agent-sdk`'s internal HTTP transport, which is what actually sends Bedrock requests in the action context.
### Steps to Reproduce
1. Use `anthropics/claude-code-action@v1` (resolves to v1.0.113 as of 2026-05-06)
2. Configure with `use_bedrock: "true"` and `CLAUDE_CODE_USE_BEDROCK: "1"`
3. Use model `us.anthropic.claude-opus-4-7` (Bedrock inference profile)
4. Trigger the action → immediate `400 invalid beta flag`
### Expected Behavior
The SDK should send beta flags via the `anthropic-beta` HTTP header, not in the request body, when targeting a Bedrock endpoint.
### Workaround
Pin to the last known working version:
```yaml
uses: anthropics/claude-code-action@v1.0.112
```
### Environment
- **claude-code-action**: v1.0.113 (broken) vs v1.0.112 (working)
- **claude-agent-sdk**: 0.2.129 (broken)
- **Provider**: AWS Bedrock (`bedrock-runtime`)
- **Model**: `us.anthropic.claude-opus-4-7` (cross-region inference profile)
- **Region**: us-east-1
Contributor guide
Research direction
Compare the dependency versions resolved by claude-code-action v1.0.112 and v1.0.113, then inspect the failing request path in @anthropic-ai/claude-agent-sdk/sdk.mjs:60:18101. Reproduce with AWS Bedrock, use_bedrock enabled, and the listed model. Done means the beta flag is sent as the anthropic-beta header and the first API call no longer returns 400 invalid beta flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100