[BUG] API Error: 400
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?
During a multi-turn conversation in the VSCode extension, Claude Code throws an API Error 400 indicating that thinking blocks were modified, blocking further interaction.
Error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.9.content.33: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."},"request_id":"req_011CXaKk27Fnc85C7KskBgyB"}
This appears to be an internal state management issue where the conversation history becomes corrupted, causing thinking blocks to be incorrectly serialized when sent back to the API.
What Should Happen?
The conversation should continue without errors. Thinking blocks should be preserved and managed internally by Claude Code without user intervention.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.9.content.33: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."},"request_id":"req_011CXaKk27Fnc85C7KskBgyB"}
Steps to Reproduce
- Start a conversation in Claude Code (VSCode extension)
- Have a multi-turn conversation (5+ exchanges)
- At some point, the error appears and blocks further interaction
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.12
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗