[BUG] Claude Code on windows desktop fails to recover from 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?
You ran into this issue and could not recover.
error API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.109: 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_011Caon6ZHXxT3YBHw1JTLvT"}
Ack. That error = harness bug, not code bug.
Cause: API rejected request because thinking/redacted_thinking block in last assistant message got modified between turns. Anthropic API requires extended-thinking blocks pass back unchanged when tool_use follows.
Common triggers:
Harness re-serializes assistant message, drops/edits thinking block
Mid-stream interrupt then retry without preserving signature
Compaction touched a thinking block it shouldn't
Recovery options:
/clear — fresh conversation, lose context
/compact — compress, may strip thinking blocks cleanly
Restart Claude Code session
Prevention: Not in your control — API/harness contract. If reproducing, file at https://github.com/anthropics/claude-code/issues with request_id: req_011Caon6ZHXxT3YBHw1JTLvT.
What Should Happen?
Respond to prompts.
Error Messages/Logs
Steps to Reproduce
Feedback sent. If you''re working with Anthropic support, include the reference ID below.
a960ac06-7ec2-4d08-88c2-903fba760df6
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.132 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗