API Error 400 (invalid_request_error) — page 3
The request itself was malformed or violated a schema constraint.
2,591 issues · 129 open · 2,462 resolved (95%) · first seen Feb 24, 2025
First response · api
What to do now
Most likely: The API rejected or could not complete the request.
- Identify the HTTP status and error type before changing local configuration.
- Retry once with a short backoff; repeated failures should be compared with the official status page.
- If only one project fails, reproduce in a new short session to separate service trouble from request state.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 226 new reports in the last 90 days vs 769 in the 90 before — -71%. The open backlog peaked at 313 in 2026-05 and sits at 129 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
1,099 of these reports name the Claude Code build they were running, spanning 169 releases. Heaviest reporters:
- Claude Code v2.1.154
- Claude Code v2.1.19
- Claude Code v2.0.76
- Claude Code v2.1.153
- Claude Code v2.1.114
- Claude Code v2.1.119
- Claude Code v2.1.126
- Claude Code v2.1.156
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 4 days across 2,462 closures. Of the 2,462 closures with a recorded reason, 18% were closed as completed and 2,008 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
447 of these issues post a workaround someone says worked. The highest-engagement ones:
- API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation. - [Bug] Anthropic API Error: Unexpected 400 Bad Request Response
- …67 (my report) 8887 8893 8894 8895 8897 8903 EDIT (Oct 14): Workaround for tool use/tool result 400 errors: A research-backed solution was posted on Oct 10: Add the provided instructions to your global CLAUDE.md (~/.clau…
Found in the thread of #8763 · resolved - [Bug] VS Code extension: Tool use concurrency error after Jan 23-24 update
- ✅ WORKAROUND FOUND The fix: Install VS Code extension version 2.1.17 while keeping CLI at 2.1.19 Steps: 1. In VS Code, go to Extensions 2. Find "Claude Code for VS Code" 3. Click the dropdown arrow next to Uninstall → "I…
Found in the thread of #20571 · still open - [Bug] Anthropic API Error: Tool Use Concurrency Limitation
- I tried many workaround without success. In my case, it was a specific PDF file causing the issue. Once unreferenced, it works.
Found in the thread of #9002 · resolved - [BUG] Oversized image breaks conversation permanently - no way to recover without starting new chat
- …retry without failed images, or client-side image resizing Workaround Currently, users must start a new conversation and manually reconstruct any important context.
Found in the description of #13480 · resolved - [BUG] Opus 4.7 doesn't work with bedrock
- …pting both shapes) and what Bedrock requires (header only). Workaround for anyone blocked today A ~100 line local HTTP shim that moves → header and forwards to makes Claude Code 2.1.111 + Opus 4.7 work end-to-end. Point…
Found in the thread of #49238 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 201–300
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 2,591 matches; the statistics above cover all 2,591.
- Despite thinking being enabled, I can not run slash-commands due to clear_thinking_20251015 strategy
- [Bug] `/context` command not functioning with sonnet[1m]
- [BUG] Persistent API Error After Teleporting Session
- Unstable Terminal UI: Unexpected Scroll Jumps Disrupting Code View
- [BUG] alwaysThinkingEnabled not translated to thinking:{type:"adaptive"} on Opus 4.8 — sessions silently run without thinking; 400 on xhigh effort with WebSearch
- [BUG] CLI 2.1.154 builds invalid request after context ops (compact/clear/model-switch): system role at messages[0], and modified signed thinking blocks → 400 Error -> Wedged
- Persistent 400 'thinking blocks in the latest assistant message cannot be modified' — interleaved thinking persisted with empty text + signature bricks sessions
- [BUG] 400 "cache_control cannot be set for empty text blocks" when pasting an image without a caption
- [Bug] Anthropic API Error: Out of extra usage despite remaining quota
- [BUG] Session resume fails with "Invalid signature in thinking block" - thinking block signatures not persisted
- API Error: 400 due to tool use concurrency issues when reading multiple files
- [BUG] API Error 400 "tool use concurrency issues" on every tool call in VSCode extension
- [BUG] VS Code Extension: "tool_use ids must be unique" API 400 error during multi-step operations
- [Bug] Context limit reached prematurely before /context indicates 20% remaining
- /compact fails with 'tools: Tool names must be unique' error
- [BUG] Conversation Compaction Corrupts Tool Use/Result Pairs
- Bug Report I have tried to give command Claude Code its start to work and after generating some tokens it stopped automatically without saying anything
- Anthropic API Context Limit Exceeded During Compaction
- OpenAI API: Unexpected Opus 4 Availability Restriction in Pro Plan
- Invalid Thinking Block Parameters in API Request
- I used $10.63 of Claude Code, and have set my account...
- Keyboard Interrupt Handling Breaks Text Input Context
- Image File Type Handling Error in Claude Analysis
- [BUG] Notion MCP connector (both project .mcp.json and claude.ai OAuth connector) triggers 400 input_schema oneOf/allOf/anyOf error in interactive main loop
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant message
- [BUG] API Error 400 persists after claiming $100 third-party usage credit
- [BUG] API Error: 400
- [BUG] API 400 error: assistant message thinking blocks serialized with `text` before `thinking` in conversation replay
- API Streaming Stalls Causing 59-138 Second Delays and Timeouts
- conversation compression
- [Bug] Anthropic API Error: Tool Use Concurrency Blocking Requests
- [Bug] Anthropic API Error: Tool Use IDs Without Tool Result Blocks When Parsing PDFs
- My Claude Code stops running after a few seconds during use. Even after restarting, it still doesn’t work properly, and I can’t use max200 normally.
- Feature Request: Checkpoint Rollback Mechanism for Conversation Recovery This title captures the core feature request of adding a way to roll back to previous conversation states, particularly to help recover from tool use errors or other blocking issues
- Documented MCP import from Claude Desktop fails due to tool name length validation
- WebSearch always returns HTTP 400 when session effort is xhigh/max on Opus 5 (regression from v2.1.219 default flip)
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant message
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
- [BUG] API Error 400: "Image format image/png not supported" — Claude Code auto-generated screenshots rejected
- Opus 4.7 via Bedrock application inference profiles fails with thinking.type.enabled error
- Opus 4.7 on Bedrock fails with "invalid beta flag" - Claude Code sends unsupported beta headers
- Unrecoverable session after dropped tool_result — rewind/restore/summarize all fail
- [Bug] MCP server "claude-vscode" fails with "Method not found" causing tool use concurrency 400 errors
- [Bug] Anthropic API Error: 400 - Tool Use Concurrency Issues
- Can you turn OFF the hook succeeded messages or option
- [Bug] Playwright Screenshot: Persistent API Error for Large Image Dimensions
- Invalid JSON Parsing: High Surrogate Character Causing 400 Bad Request Error
- [BUG] Randomly Hitting “Malformed input request” (HTTP 400) Error on AWS Bedrock with Claude CLI ≥ 0.2.107
- API 400 "thinking blocks cannot be modified" permanently bricks session during agent activation (interleaved thinking + tool use)
- [BUG]API Error: 400 messages: text content blocks must be non-empty
- [BUG] I am getting out of usage error but already have tokens and limits API Error: 400 - Invalid Request You're out of extra usage. Add more usage credits at: https://claude.ai/settings/usage Then retry your request
- [Bug] Context indicator wraps character-by-character in narrow terminals
- [Bug] Degraded code generation quality and increased correction rate
- API Error: 400 due to tool use concurrency issues in VS Code extension
- [BUG] Claude Desktop: Cannot remove LOCAL DEV MCP connectors — server rejects legacy -1p-internal IDs
- [Bug] Anthropic API Error: Image base64 data does not match media type with Figma MCP
- Invalid JSON Request: Malformed Low Surrogate in API Payload
- Invalid Model Name in Model Selection Command
- Bedrock: thinking.type.enabled not supported by newer models behind inference profile ARNs
- [Bug] Anthropic API Error: Internal server error (500)
- [BUG] VS code Claude Code extension fails - Bedrock API Compatibility Issue - `eager_input_streaming` Parameter
- [BUG] Compacting throws an error
- [BUG] Opus 4.5 showing in Claude Code CLI, but not showing in Claude Code VSCode extension
- [BUG] API issue: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."
- [BUG] Bedrock Sonnet API error when connecting to Claude Code: Unexpected value for `anthropic-beta` header
- [BUG] VSCode Diagnostics makes CC throw 400 errors
- API Error 400 suggests non-existent /rewind command
- [BUG] API Error 400: Tool name exceeds 200 character limit causing complete session failure
- WebStorm: Shift+Enter Shortcut Not Working in Reworked Terminal
- [BUG] API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"system: Invalid model name"}}
- Image dimension error blocks all subsequent commands, requiring context clear
- unable to write commands inside claude code box in vscode...
- "Image Loading Failure: Unrecoverable Error with Large Image Files"
- Credit balance is too low - but I have credit
- Session rename mid-server-tool-call injects a turn that permanently corrupts the transcript (400 on every future prompt)
- Opus 4.8: thinking blocks broken by context compaction — 400 error on every turn after first compaction
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
- [Bug] Thinking blocks causing task progression blocked without user modification
- [BUG] [BUG] Claude Code on the Web: empty text block with cache_control causes 400 after sending an image, permanently breaks the session
- [BUG] Background agents fail with cache_control TTL ordering error (1h after 5m)
- [BUG] vs code claude extension 2.1.74 need disable adaptive thinking when the custom end point not support the adaptive parameter
- [BUG] Regression in 2.1.72 (VS Code, Bedrock): `400 tools.0.custom.eager_input_streaming: Extra inputs are not permitted`
- API Error: thinking blocks in assistant message cannot be modified
- [Bug] Compaction fails with "Conversation too long" error when context limit reached
- [BUG] API Error 400 'tool use concurrency issues' in VSCode extension on simple operations
- [BUG] Tool search fails when MCP tool names exceed 64 chars
- [BUG] API Error when continuing conversation with thinking blocks
- [Bug] Anthropic API Error: Image does not match the provided media type
- [BUG] Conversations that have errors during chat title generation (i.e., what the chat is about) don't appear in --resume list
- [Bug] Anthropic API Error: Duplicate tool names in subagent invocation
- [BUG] Pro account switching to sonnet[1m] started throwing API 400 error
- [Bug] Anthropic API Error: Invalid Tool Use Input Parameters
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- Terminal Resize Causes Unexpected UI Scroll Position Reset
- [BUG] Attaching/pasting an image fails with 400 ... str is not valid UTF-8: surrogates not allowed
- 2.1.154 regression: bridge/remote-control session replay re-sends persisted (empty-text, signed) thinking blocks -> 400 'thinking blocks cannot be modified', session unrecoverable
- [Bug] Anthropic API Error: Thinking blocks cannot be modified with extended thinking mode
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
- API 400 error when submitting image-only message (empty text content block)