[BUG] "400 Guardrail was enabled" error when using Claude Opus 4.8 with AWS Bedrock

Resolved 💬 4 comments Opened May 28, 2026 by TrevorBurnham Closed Jul 6, 2026

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?

I tried to switch from Opus 4.7 to the new Opus 4.8 in Claude Code, which I've been using with AWS Bedrock. Every query emits a response like this:

❯ What is the 5th prime number?
  ⎿  API Error: 400 Guardrail was enabled but
     input is in incorrect format.

What Should Happen?

The new model is supported in both Claude Code and in Bedrock, so I'd expect it to work with Claude Code using Bedrock.

Error Messages/Logs

Steps to Reproduce

  1. In ~/.claude/settings.json, use Bedrock and set "model": "global.anthropic.claude-opus-4-8"
  2. Start a session
  3. Submit any prompt

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.154 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Other

Additional Information

There was a bug that prevented Opus 4.7 from working in Bedrock when it launched: https://github.com/anthropics/claude-code/issues/49238

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗