[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant message
Resolved 💬 4 comments Opened May 28, 2026 by raychambers Closed Jul 1, 2026
Bug Description
Allowed by auto mode classifier
⏺ Bash(printf 'L1\nL2\nL3\nL4\nL5\n' > /tmp/probe.txt
echo "wc:"; wc -l < /tmp/probe.txt…)
⎿ wc:
5
node-bytes-and-knownhash:
… +3 lines (ctrl+o to expand)
⎿ Allowed by auto mode classifier
⎿ Loaded CLAUDE.md
⎿ API Error: 400 messages.3.content.4: thinking or redacted_thinking blocks in the latest assistant message cannot be modified. These blocks must remain
as they were in the original response.
✻ Worked for 4m 55s · 2 shells still running
※ recap: Goal: a live page comparing our optimiz
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.152
- Feedback ID: a8438842-902b-4cd3-8e48-e665864dd55f
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.137: `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_011CbUvNEK3NFMLxDQHwDZwe\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T11:53:27.022Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.137: `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_011CbUvNjbRSdPtnpoDNiwsx\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T11:53:33.871Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.6: `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_011CbUvefr9cKEoUpyJcAEw3\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T11:57:10.035Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33.content.24: `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_011CbVKt9Qdh1PUsRRHcHZdU\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:01:49.758Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33.content.24: `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_011CbVKuEgAch4eVvyhG9Ru7\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:02:04.682Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33.content.24: `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_011CbVKuPcBrGSg6ikmiAC3Z\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:02:06.649Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33.content.24: `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_011CbVKuTMQwSv1WkzGKPNEr\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:63975)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T17:02…
Note: Content was truncated.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗