[Bug] Anthropic API Error: Invalid thinking parameter in requests

Resolved 💬 6 comments Opened Dec 11, 2025 by Dimonka2 Closed Feb 28, 2026

Bug Description
I have an constant 400 errors related to "thinking" after Claude Code restart. Whatever I ask or enable/disable thinking - getting:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.43.content.7: 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_011CW199azwZceA5p6ujPbTY"}

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.0.65
  • Feedback ID: b5bc0b69-6ad4-455c-b820-24f775adead4

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.43.content.7: `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_011CW199azwZceA5p6ujPbTY\"}\n    at B9.generate ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:122:10379)\n    at MR.makeStatusError ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:860:2195)\n    at MR.makeRequest ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:860:5419)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async dsA.model ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:4026:11283)\n    at async dsA ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:1009:34744)\n    at async mg2 ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:4026:11437)\n    at async {path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:4026:3864\n    at async An1 ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:1411:2037)\n    at async TZA ({path_to_env}/bin/nodejs/node-v22.14.0-win-x64/node_modules/@anthropic-ai/claude-code/cli.js:4026:3834)","timestamp":"2025-12-11T15:32:07.874Z"}]

View original on GitHub ↗

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