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

Resolved 💬 3 comments Opened Feb 18, 2026 by berntpopp Closed Feb 22, 2026

Bug Description
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5.content.1: 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_011CYFmAk2sjdk1RYvu3dwJd"}

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.45
  • Feedback ID: 347c15a3-cb86-4b25-8a7c-e4e9bb0c291c

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFm6FhgjpGxnNycv58ng\"}\n    at generate (B:/~BUN/root/claude.exe:324:8796)\n    at makeRequest (B:/~BUN/root/claude.exe:363:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:20:42.772Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFm7XawYd8MNuLvQyVBs\"}\n    at generate (B:/~BUN/root/claude.exe:324:8796)\n    at makeRequest (B:/~BUN/root/claude.exe:363:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:21:00.100Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFm9Hn2y66kQPyrHg1CC\"}\n    at generate (B:/~BUN/root/claude.exe:324:8796)\n    at makeRequest (B:/~BUN/root/claude.exe:363:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:21:23.915Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFmAk2sjdk1RYvu3dwJd\"}\n    at generate (B:/~BUN/root/claude.exe:324:8796)\n    at makeRequest (B:/~BUN/root/claude.exe:363:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:21:43.648Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFmBBLtKUyTv5WA7wsMA\"}\n    at generate (B:/~BUN/root/claude.exe:324:8796)\n    at makeRequest (B:/~BUN/root/claude.exe:363:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:21:49.603Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFmBBLtKUyTv5WA7wsMA\"}\n    at o5H (B:/~BUN/root/claude.exe:3191:795)\n    at async <anonymous> (B:/~BUN/root/claude.exe:3436:56)\n    at async JAE (B:/~BUN/root/claude.exe:2211:3675)\n    at async u5f (B:/~BUN/root/claude.exe:2211:1043)\n    at async nZE (B:/~BUN/root/claude.exe:7144:2509)\n    at async hS$ (B:/~BUN/root/claude.exe:7142:3450)\n    at async xqE (B:/~BUN/root/claude.exe:7287:24776)\n    at async Rh$ (B:/~BUN/root/claude.exe:7287:23914)\n    at async <anonymous> (B:/~BUN/root/claude.exe:7297:8172)\n    at async <anonymous> (B:/~BUN/root/claude.exe:7280:5626)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-02-18T15:21:49.606Z"},{"error":"Error: Error during compaction: Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.1: `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_011CYFmBBLtKUyTv5WA7wsMA\"}\n    at <anonymous> (B:/~BUN/root/claude.exe:3437:189)\n    at async JAE (B:/~BUN/root/claude.exe:2211:3675)\n    at async u5f (B:/~BUN/root/claud…

Note: Content was truncated.

View original on GitHub ↗

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