[BUG] "API Error 400: thinking blocks cannot be modified" when context hits 100%

Resolved 💬 3 comments Opened Jan 31, 2026 by kEAmster Closed Jan 31, 2026

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?

"API Error 400: thinking blocks cannot be modified" when context hits 100%
Happened after auto-approve execution completed
Triggered when trying to continue conversation or use /transfer-context

That's a bug in Claude Code itself, not something you caused or can fix on your end.

What likely happened:

Your conversation hit 100% context
Claude Code has internal context management that summarizes/compacts old messages when context fills up
This compaction process likely modified or removed thinking blocks from an earlier assistant turn
When you sent your next prompt, the API rejected the corrupted conversation history
Your work is safe - any file edits Claude made were already written to disk. The error is just blocking further conversation in that session.

Workaround for now:

Start a fresh session manually (Cmd/Ctrl+Shift+P → "Claude: New Session" or just close and reopen)
Your edited files are still there - you can reference them in the new session
If you need to transfer context, just describe what you were working on or paste relevant code snippets
Report the bug:

This is worth reporting at https://github.com/anthropics/claude-code/issues with:

"API Error 400: thinking blocks cannot be modified" when context hits 100%
Happened after auto-approve execution completed
Triggered when trying to continue conversation or use /transfer-context
The Claude Code team needs to ensure their context compaction logic preserves thinking blocks verbatim or removes entire turns rather than modifying them.

/transfer-context [validate fixes and create new datasets from multiple sites]
API Error: 400 messages.3.content.75: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

/transfer-context [we'll validate fixes next]
API Error: 400 messages.3.content.75: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

What Should Happen?

i should be able to run my /transfer-context skill and start a new session

Error Messages/Logs

API Error: 400 messages.3.content.75: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

Steps to Reproduce

i got the message in Claude, itself. i had a complex (for me at least) problem and started a new session to review and refactor the code. once the plan was complete, i chose yes, with auto approve. it finished executing. context shows 100% and i got the error on the next prompt i entered i was attempting to use the "/transfer-context" skill to start a new session to validate the fix

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.19

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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