claude-code - 💡(How to fix) Fix [Bug] Thinking blocks in resumed conversations cannot be modified, permanently breaking session

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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

Code Example

[API Error: 400 messages.43.content.7: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.]
RAW_BUFFERClick to expand / collapse

Bug Description 400 thinking blocks cannot be modified permanently breaks a resumed conversation

Resuming a specific conversation always fails with: API Error: 400 messages.43.content.7: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response. Every new message in that session reproduces the error, so the conversation is permanently stuck. Other/new conversations work fine.

Context:

  • Model: Opus 4.8 (1M context), extended/adaptive thinking enabled
  • The error points at an assistant message containing a thinking block that is apparently not re-sent byte-for-byte on resume.

Expected: Claude Code should preserve thinking blocks unmodified across resume/compaction, or safely drop them, so the conversation stays usable.

Actual: The session is bricked — no message can be sent.

Repro (suspected):

  1. Have a conversation with extended thinking on Opus.
  2. Trigger a resume / context compaction / model or thinking-setting change / interrupted response mid-thinking.
  3. Send a new message → 400 error, repeats forever.

Environment Info

  • Platform: linux
  • Terminal: ghostty
  • Version: 2.1.154
  • Feedback ID: 64b197a2-aca1-4137-a9e1-df455b173e43

Errors

[API Error: 400 messages.43.content.7: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING