[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant message
Bug Description
I get API Error: 400 messages.17.content.36: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.
I'm stuck. Even if I exit and then resume, it won't work. Not the first time it happens to me with this version of Claude. One possible cause: Sleep mode on my Mac that interrupts Claude. Then when I wake up the Claude session, it's stuck.
Tried disabling thinking, not a chance.
Compact, no more luck.
/compact
⎿ Error: Error during compaction: API Error: 400 messages.17.content.36: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.
Finally, double Esc to open the message-history rewind, picked a point in the past, and got to a stable state.
Environment Info
- Platform: darwin
- Terminal: goland
- Version: 2.1.153
- Feedback ID: dda2645d-25d8-447f-8275-71c44c53c3d7
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.36: `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_011CbVRnAKyqaU8fXaSdi6Fn\"}\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-28T18:19:09.752Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.36: `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_011CbVRnvL8pFHubJj3DvQ7j\"}\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-28T18:19:19.948Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.36: `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_011CbVRwhPWxNbmqdPUhDMf3\"}\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-28T18:21:19.062Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.36: `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_011CbVS1HHYK1fxVgLhENRzR\"}\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-28T18:22:07.609Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗