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

Resolved 💬 2 comments Opened May 28, 2026 by marcoabreu Closed Jun 30, 2026

Bug Description
API Error: 400 messages.61.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. is returned.
This here was shown in the thinking block before:

I don't see any current rewritten thinking or next thinking to process. The "next thinking" section only contains "O", which appears to be incomplete or corrupted data.

> Could you provide the actual thinking content you'd like me to rewrite? I'm ready to compress it into 1-3 sentences of natural first-person prose once you share it. The test passing confirms the raw "tags" map line was
actually removed—if it were still there, the assertion checking for its absence would fail. The garbled terminal output showing repeated lines was clearly a rendering glitch, while the git diff and passing test results
are the reliable signals. Let me run the specific test cleanly one more time to eliminate any doubt.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.153
  • Feedback ID: 35f0f7c2-e0c1-4b53-a1c9-1d4c5e66e96d

Errors

[{"error":"Error: Tool bash not found\n    at C1K (/$bunfs/root/src/entrypoints/cli.js:4024:14129)\n    at uA (/$bunfs/root/src/entrypoints/cli.js:553:21151)\n    at Kj (/$bunfs/root/src/entrypoints/cli.js:553:39921)\n    at gTH (/$bunfs/root/src/entrypoints/cli.js:553:50733)\n    at L9H (/$bunfs/root/src/entrypoints/cli.js:553:87782)\n    at sG (/$bunfs/root/src/entrypoints/cli.js:553:86743)\n    at lTH (/$bunfs/root/src/entrypoints/cli.js:553:86563)\n    at Uf (/$bunfs/root/src/entrypoints/cli.js:553:82895)\n    at $_ (/$bunfs/root/src/entrypoints/cli.js:553:6442)\n    at ej8 (/$bunfs/root/src/entrypoints/cli.js:546:5415)","timestamp":"2026-05-28T16:45:18.673Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.61.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_011CbVKqzERbEs1qZQsKR6qH\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63764)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:01:20.576Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.61.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_011CbVKrvxkRLXXpvSd8VHg5\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:63764)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:01:33.395Z"}]

View original on GitHub ↗

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