Skip to content

[BUG] v1.0.113 breaks AWS Bedrock: claude-agent-sdk@0.2.129 sends anthropic_beta in request body, causing 400 invalid beta flag #1291

@melong0124

Description

@melong0124

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, 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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions