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

Resolved 💬 3 comments Opened Jan 28, 2026 by Zig1375 Closed Feb 1, 2026

Bug Description
Very often I get such messages during the plan mode:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.28: `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_011CXaa22yfqvkm8u2w1dNuP"}

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.22
  • Feedback ID: 16412b2c-3ed3-481f-a2c0-b2c15ae90a2d

Errors

[{"error":"Error: ENOENT: no such file or directory, scandir '/Library/Application Support/ClaudeCode/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:2063)\n    at rW (/$bunfs/root/claude:11:35454)\n    at readdirSync (/$bunfs/root/claude:12:2024)\n    at DQR (/$bunfs/root/claude:1758:380)\n    at DQR (/$bunfs/root/claude:1758:1350)\n    at <anonymous> (/$bunfs/root/claude:1758:4670)\n    at <anonymous> (/$bunfs/root/claude:1758:5401)\n    at A (/$bunfs/root/claude:11:7259)\n    at mb8 (/$bunfs/root/claude:4820:4342)","timestamp":"2026-01-28T22:14:41.130Z"},{"error":"Error: ENOENT: no such file or directory, scandir '/Users/zig/.claude/skills'\n    at readdirSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:2063)\n    at rW (/$bunfs/root/claude:11:35454)\n    at readdirSync (/$bunfs/root/claude:12:2024)\n    at DQR (/$bunfs/root/claude:1758:380)\n    at DQR (/$bunfs/root/claude:1758:1350)\n    at <anonymous> (/$bunfs/root/claude:1758:4713)\n    at <anonymous> (/$bunfs/root/claude:1758:5401)\n    at A (/$bunfs/root/claude:11:7259)\n    at mb8 (/$bunfs/root/claude:4820:4342)","timestamp":"2026-01-28T22:14:41.130Z"},{"error":"Error: LSP server plugin:rust-analyzer-lsp:rust-analyzer crashed with exit code 1\n    at <anonymous> (/$bunfs/root/claude:1726:21457)\n    at emit (node:events:98:22)\n    at #handleOnExit (node:child_process:520:14)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-28T22:14:42.086Z"},{"error":"Error: Request was aborted.\n    at AIR (/$bunfs/root/claude:1663:44936)\n    at tR0 (/$bunfs/root/claude:5089:7219)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-28T22:20:45.306Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:742)\n    at rW (/$bunfs/root/claude:11:35454)\n    at readFileSync (/$bunfs/root/claude:12:701)\n    at wvB (/$bunfs/root/claude:5169:28420)\n    at call (/$bunfs/root/claude:3539:945)\n    at call (/$bunfs/root/claude:3535:6569)\n    at bX8 (/$bunfs/root/claude:3045:12583)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-28T22:21:15.056Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:742)\n    at rW (/$bunfs/root/claude:11:35454)\n    at readFileSync (/$bunfs/root/claude:12:701)\n    at wvB (/$bunfs/root/claude:5169:28420)\n    at call (/$bunfs/root/claude:3539:945)\n    at call (/$bunfs/root/claude:3535:6569)\n    at bX8 (/$bunfs/root/claude:3045:12583)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-28T22:21:18.447Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (10 -> 11 messages). Message structure: [0] user; [1] assistant(id=msg_018BqkwgwNcuYwJiz1kY8dzw, tool_uses=[toolu_01DC7dA4Ekwt1kSUTUCLGu5H]); [2] user(tool_results=[toolu_01DC7dA4Ekwt1kSUTUCLGu5H]); [3] assistant(id=msg_01KgqgxHqGxozcjGmLSqaBRp, tool_uses=[toolu_018wmwvB2tNRqMQdaJXDPdfG,toolu_013udEL6f2mekWt8mV3vD472,toolu_01QLLXD3ECXxoNULzLL1MTYC]); [4] user(tool_results=[toolu_01QLLXD3ECXxoNULzLL1MTYC,toolu_018wmwvB2tNRqMQdaJXDPdfG,toolu_013udEL6f2mekWt8mV3vD472]); [5] assistant(id=msg_01WA9yCDgdu4BBwyUZcoEANH, tool_uses=[toolu_01UDMc3PrYqVrY3THg8XdYA3,toolu_01MPTm2nq4oxdVs5Z9WUe18f,toolu_01U2hUGuXEnCdkuzzv1VE6D5,toolu_011q8PVuGmxtpNBQr2Aa565s]); [6] user(tool_results=[toolu_01UDMc3PrYqVrY3THg8XdYA3,toolu_01MPTm2nq4oxdVs5Z9WUe18f,toolu_01U2hUGuXEnCdkuzzv1VE6D5,toolu_011q8PVuGmxtpNBQr2Aa565s]); [7] assistant(id=msg_01U2fZyPjfXwu1KnP3dAkGYM, tool_uses=[toolu_015r6DD76R6Ds2nmJdvJ8FdP]); [8] assistant(id=msg_013jx6hKonSRQoHyuRQQvMEh, tool_uses=[toolu_01VMWhXRBRQnSxvc7rASEVyf,toolu_01KtK1H6P6duvyaW3wJ1SC1W,toolu_01KKkPRcjWgPKXpBkDUuhVnf]); [9] user(tool_results=[toolu_015r6DD76R6Ds2nmJdvJ8FdP,toolu_01VMWhXRBRQnSxvc7rASEVyf,toolu_01KtK1H6P6duvyaW3wJ1SC1W,toolu_01KKkPRcjWgPKXpBkDUuhVnf])\n    at FgB (/$bunfs/root/claude:3903:6910)\n    at tR0 (/$bunfs/root/claude:5087:5986)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-28T22:21:23.581Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (12 -> 13 messages). Message structure: [0] user; [1] assistant(id=msg_018Bqkw…

Note: Content was truncated.

View original on GitHub ↗

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