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

Resolved 💬 2 comments Opened May 28, 2026 by notagrouch Closed Jul 1, 2026

Bug Description
This keeps popping up on every interaction in a particular session: "API Error: 400 messages.15.content.14: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.145
  • Feedback ID: 57641961-cca1-4bf7-af1c-c6973aaad68a

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.15.content.14: `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_011CbVHzQUBc7Lx4pugUoUzv\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:62581)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:37:01.022Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.15.content.14: `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_011CbVJ1ZJXc65isVtLpcBuE\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:62581)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:37:16.846Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.15.content.14: `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_011CbVJMR7xUQEUwQ7y2DnPE\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:62581)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:41:47.581Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.15.content.14: `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_011CbVKPzRrLU1cVYm3Xsy9h\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:62581)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:55:27.936Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.15.content.14: `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_011CbVKhKu7C3U3CenVqsaA9\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:62581)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:59:23.316Z"},{"error":"Error: Error during compaction: API Error: 400 messages.15.content.14: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\n    at Mj7 (/$bunfs/root/src/entrypoints/cli.js:5718:1316)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T16:59:23.337Z"}]

View original on GitHub ↗

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