[Bug] Anthropic API Error: Cannot modify thinking blocks during compaction
Resolved 💬 3 comments Opened Dec 10, 2025 by victor2ai Closed Dec 14, 2025
Bug Description
got this issue when compacting
/compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.63: 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_011CVyc8us7bDo3tvdoTmevz"}
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.61
- Feedback ID: 1bd42ca5-656d-45ea-8732-d690a1bce6d1
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/victor/.local/share/claude/versions/2.0.61 (expected in multi-process scenarios)\n at Eh0 (/$bunfs/root/claude:2714:1622)\n at mCA (/$bunfs/root/claude:2714:1300)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:41:05.394Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:52:43.975Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:53:00.899Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:54:33.805Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:54:54.292Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:55:10.313Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:55:34.013Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:55:53.838Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:56:28.343Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:56:46.749Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:175:10668)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:174:5634)\n at request (/$bunfs/root/claude:177:2147)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T17:57:07.280Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.3.content.149: `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_011CVwafz1mnouX9TyNKVyNz\"}\n at generate (/$bunfs/root/claude:109:10367)\n at makeRequest (/$bunfs/root/claude:1237:5434)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-12-09T18:24:29.573Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.3.content.149: `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\":\"re
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗