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

Resolved 💬 3 comments Opened Dec 20, 2025 by uelkerd Closed Dec 24, 2025

Bug Description
Title: API Error 400: thinking/redacted_thinking blocks cannot be modified

Description: > Encountered a 400 Invalid Request Error during a session. It appears the CLI is attempting to send a request where the previous assistant message's thinking blocks were modified or omitted, triggering an API rejection.

Error String: > API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.39: thinking or redacted_thinking blocks in the latest assistant message cannot be modified."}}

Steps to Reproduce: > This occurred during a standard back-and-forth conversation while I was in the later stages of a planned task.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.61
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at cS (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:171:1137)\n    at Unzip.<anonymous> (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:172:9852)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)\n    at wHA.request (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async qS2 (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2064:6679)","timestamp":"2025-12-20T21:33:24.737Z"},{"error":"AbortError: The operation was aborted\n    at abortChildProcess (node:child_process:759:27)\n    at onAbortListener (node:child_process:829:7)\n    at process.processTicksAndRejections (node:internal/process/task_queues:84:11)","timestamp":"2025-12-20T21:33:42.909Z"},{"error":"AxiosError: Request failed with status code 403\n    at cS (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:171:1137)\n    at Unzip.<anonymous> (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:172:9852)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)\n    at wHA.request (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async Wv7 (file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3138:460)\n    at async Promise.all (index 0)\n    at async file:///Users/minervae/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3124:6918","timestamp":"2025-12-20T21:34:55.412Z"}]

View original on GitHub ↗

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