[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant message during compaction
Resolved 💬 3 comments Opened Dec 11, 2025 by mael-ha Closed Dec 15, 2025
Bug Description
/compact command hits an issue: ``Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.82: 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_011CVzyMJB5cg8ZgqWgo8aAg"}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.0.65
- Feedback ID: 55561dfd-3f86-49cb-a4af-b693d48e94c3
Errors
[{"error":"AbortError: The operation was aborted.\n at unknown\n at abortChildProcess (node:child_process:937:42)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (/$bunfs/root/claude:4593:12624)","timestamp":"2025-12-11T10:40:31.676Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.82: `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_011CVzmE8BUNzcgfZgzDmZWd\"}\n at generate (/$bunfs/root/claude:125:10428)\n at makeRequest (/$bunfs/root/claude:814:5434)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:44:40.590Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.82: `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_011CVzmE8BUNzcgfZgzDmZWd\"}\n at N1A (/$bunfs/root/claude:1807:1570)\n at async call (/$bunfs/root/claude:2945:56)\n at async Lb$ (/$bunfs/root/claude:1881:5728)\n at async cTE (/$bunfs/root/claude:1881:3891)\n at async Bb$ (/$bunfs/root/claude:1892:2128)\n at async nO (/$bunfs/root/claude:1890:554)\n at async Go$ (/$bunfs/root/claude:2692:14561)\n at async oMA (/$bunfs/root/claude:2692:13724)\n at async <anonymous> (/$bunfs/root/claude:2716:2988)\n at async <anonymous> (/$bunfs/root/claude:2690:6193)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:44:40.594Z"},{"error":"Error: Error during compaction: Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.82: `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_011CVzmE8BUNzcgfZgzDmZWd\"}\n at call (/$bunfs/root/claude:2946:189)\n at async Lb$ (/$bunfs/root/claude:1881:5728)\n at async cTE (/$bunfs/root/claude:1881:3891)\n at async Bb$ (/$bunfs/root/claude:1892:2128)\n at async nO (/$bunfs/root/claude:1890:554)\n at async Go$ (/$bunfs/root/claude:2692:14561)\n at async oMA (/$bunfs/root/claude:2692:13724)\n at async <anonymous> (/$bunfs/root/claude:2716:2988)\n at async <anonymous> (/$bunfs/root/claude:2690:6193)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:44:40.594Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.82: `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_011CVzmyMZ66oC6JzW9FR9HB\"}\n at generate (/$bunfs/root/claude:125:10428)\n at makeRequest (/$bunfs/root/claude:814:5434)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-11T10:54:26.634Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1.content.82: `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_011CVzmyMZ66oC6JzW9FR9HB\"}\n at N1A (/$bunfs/root/claude:1807:1570)\n at async call (/$bunfs/root/claude:2945:56)\n at async Lb$ (/$bunfs/root/claude:1881:5728)\n at async cTE (/$bunfs/root/claude:1881:3891)\n at async Bb$ (/$bunfs/root/claude:1892:2128)\n at async nO (/$bunfs/root/claude:1890:554)\n at async Go$ (/$bunfs/root/claude:2692:14561)\n at async oMA (/$bunfs/root/claude:2692:13724)\n at async <anonymous> (/$bunfs/root/claude:2716:2988)\n at async <anonymous> (/$bunfs/root/claude:26
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗