[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
Resolved 💬 3 comments Opened Feb 5, 2026 by akram-suplari Closed Feb 9, 2026
Bug Description
I get this error without compaction: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.49: 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_011CXqYYcPzxBkrWrxfEgdYj"}
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.32
- Feedback ID: 7484bef4-14d5-478d-ba4c-56437d963cc5
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.3.content.49: `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_011CXqYQFzSbxNUwu7EGzTRX\"}\n at generate (/$bunfs/root/claude:344:8821)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T20:20:02.705Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.3.content.49: `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_011CXqYTHr9HzYjmSRoiJS6V\"}\n at generate (/$bunfs/root/claude:344:8821)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T20:20:44.398Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.3.content.49: `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_011CXqYYcPzxBkrWrxfEgdYj\"}\n at generate (/$bunfs/root/claude:344:8821)\n at makeRequest (/$bunfs/root/claude:361:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-05T20:21:55.916Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗