IssueRaiser

[BUG] API Error 400 - Thinking Block Modification Error

### Preflight Checklist - [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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? The Claude Code session became completely unresponsive with repeated API 400 errors. Every subsequent user input triggered the same error, making recovery impossible. **Symptom**: Session entered an error loop where the conversation history reached a corrupted state: 1. A previous assistant response contained thinking blocks 2. The system attempted to modify or replay that message's thinking blocks 3. The API correctly rejected this (thinking blocks are immutable once sent) 4. The error persisted because the corrupted state remained in conversation history **Error Pattern**: The error occurred at `messages.71.content.8` (71st message, 8th content block), indicating: - Deep conversation history (71 messages) - Specific content block contained thinking blocks that couldn't be modified - Every subsequent user input triggered the same error **Contributing Factors**: - **Long session**: Nearly 15k lines of transcript suggests extended conversation - **Complex workflow**: Multiple tool calls, file reads, git operations - **Repeated questions**: Same question asked multiple times may have confused state - **Message editing attempt**: The sy

Posted by WamBamBoozle on Oct 23, 2025, 6:22 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

[BUG] API Error 400 - Thinking Block Modification Error

WamBamBoozleOct 23, 2025, 6:22 PM

### Preflight Checklist - [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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? The Claude Code session became completely unresponsive with repeated API 400 errors. Every subsequent user input triggered the same error, making recovery impossible. **Symptom**: Session entered an error loop where the conversation history reached a corrupted state: 1. A previous assistant response contained thinking blocks 2. The system attempted to modify or replay that message's thinking blocks 3. The API correctly rejected this (thinking blocks are immutable once sent) 4. The error persisted because the corrupted state remained in conversation history **Error Pattern**: The error occurred at `messages.71.content.8` (71st message, 8th content block), indicating: - Deep conversation history (71 messages) - Specific content block contained thinking blocks that couldn't be modified - Every subsequent user input triggered the same error **Contributing Factors**: - **Long session**: Nearly 15k lines of transcript suggests extended conversation - **Complex workflow**: Multiple tool calls, file reads, git operations - **Repeated questions**: Same question asked multiple times may have confused state - **Message editing attempt**: The sy

Comments (0)

No comments yet. Start the discussion.

Comment on this issue