[BUG] Randomly Hitting “Malformed input request” (HTTP 400) Error on AWS Bedrock with Claude CLI ≥ 0.2.107

Resolved 💬 15 comments Opened May 15, 2025 by indrasvat Closed Dec 9, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [X] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other
  • Claude CLI version: 0.2.115
  • Operating System: macOS 15.3.2 (24D81)
  • Terminal: Warp

Bug Description

Every Claude CLI release after 0.2.106 randomly fails on AWS Bedrock with API Error: 400 Malformed input request, please reformat your input and try again..

Only downgrading to 0.2.106 or below restores the functionality.

Steps to Reproduce

  1. npm i -g @anthropic-ai/claude-code@0.2.115 (or any version ≥ 0.2.107).
  2. Ensure Bedrock is being used, e.g. export CLAUDE_CODE_USE_BEDROCK=1.
  3. Start an interactive shell: claude.
  4. Send a request (or a couple) to claude.
  5. Sometimes, the 400 error appears on the very first request. Other times, it may be after 2-3 requests 🤷‍♂.
  6. Downgrade: npm i -g @anthropic-ai/claude-code@0.2.106 → issue disappears.

!Image

Expected Behavior

The CLI should work as expected with AWS Bedrock.

Actual Behavior

Requests fail with the above error.

View original on GitHub ↗

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