API Error: thinking blocks in assistant message cannot be modified

Resolved 💬 6 comments Opened Feb 1, 2026 by jamie8johnson Closed Mar 19, 2026

Bug Description

Session faulted out with API error preventing continued conversation:

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

Required /clear to continue working.

Expected Behavior

Conversation should continue without requiring manual intervention.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-5-20251101 (extended thinking enabled)
  • Platform: WSL2 on Windows

Notes

Error suggests thinking block mutation during message handling. User had to clear context to recover.

View original on GitHub ↗

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