[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages

Resolved 💬 2 comments Opened May 28, 2026 by williavs Closed Jun 1, 2026

Bug Description
Read 4 files, listed 1 directory, ran 10 shell commands

● Update(scripts/rebuild_index.py)
Error editing file

Searched for 2 patterns, ran 1 shell command

● Update(scripts/rebuild_index.py)
Error editing file

Searched for 1 pattern, ran 2 shell commands
API Error: 400 messages.33.content.18: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.

✻ Cogitated for 3m 1s AGAIN!!! I JUST FILED THIS ISSUE FROM MY MACBOOK AND NOW IM GETTING SAME THING FROM MY LINUX

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 2.1.150
  • Feedback ID: 6d7c49a4-39ca-443b-a242-6ab5dab7e629

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33.content.18: `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_011CbVLaE9Fa9aJjqkidyFKu\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63341)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:10:53.629Z"}]

View original on GitHub ↗

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