claude-code - 💡(How to fix) Fix [BUG] API 400 error: thinking/redacted_thinking blocks cannot be modified after Claude Opus 4.8

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 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.101: 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_011CbZ1NFZYk1a2pwkUCuXMw"}

Root Cause

This is extremely frustrating because it wastes both time and usage limits. I’m subscribed to the Max 5 plan, but I end up having to spend additional quota just to redo work that was already in progress.

Fix Action

Fix / Workaround

When this error happens, I cannot properly continue, resume, or restart the session. The only workaround is to start a completely new session from scratch.

Code Example

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.101: `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_011CbZ1NFZYk1a2pwkUCuXMw"}

---

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.101: `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_011CbZ1NFZYk1a2pwkUCuXMw"}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Title: API 400 error: thinking/redacted_thinking blocks cannot be modified after Claude Opus 4.8

Body: I’m reporting a recurring API 400 error in Claude Code that prevents me from continuing or resuming a session.

Error message:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.101: `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_011CbZ1NFZYk1a2pwkUCuXMw"}

This has been happening constantly since Claude Opus 4.8.

When this error happens, I cannot properly continue, resume, or restart the session. The only workaround is to start a completely new session from scratch.

This is extremely frustrating because it wastes both time and usage limits. I’m subscribed to the Max 5 plan, but I end up having to spend additional quota just to redo work that was already in progress.

Environment:

  • Product: Claude Code
  • Plan: Max 5
  • Model: Claude Opus 4.8
  • Error type: API Error 400
  • Impact: Session cannot be resumed or continued; a new session is required

Expected behavior: The session should continue normally without failing due to unmodified thinking or redacted_thinking blocks.

Actual behavior: Claude Code fails with API Error 400 and the current session becomes unusable.

Please investigate this issue, because it is blocking normal usage for paid users.

What Should Happen?

.

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.101: `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_011CbZ1NFZYk1a2pwkUCuXMw"}

Steps to Reproduce

.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

v2.1.158

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No 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

claude-code - 💡(How to fix) Fix [BUG] API 400 error: thinking/redacted_thinking blocks cannot be modified after Claude Opus 4.8