[BUG] The API is rejecting the request because internal "thinking" blocks from a previous response were modified before being sent back.

Resolved 💬 3 comments Opened Feb 5, 2026 by johngwilliams Closed Feb 9, 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?

After a short conversation with Claude VS Code agent, one of my conversations started to reply with

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

Another conversation confirmed that this was:
What it means: The API is rejecting the request because internal "thinking" blocks from a previous response were modified before being sent back. These blocks must be preserved exactly as-is.

Possible causes:

The Claude Code client may have a bug in how it handles conversation history
A conversation was resumed/restored incorrectly
Memory compaction or session continuation corrupted the message history

What Should Happen?

I was expecting text response to a specific question.

Error Messages/Logs

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

Steps to Reproduce

I just typed a message into a Conversation prompt in VS Code and this is the error that came back.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude-opus-4-5-20251101

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

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 ↗