[Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
Bug Description
Claude is still going nuts trying to execute this refactor plan. It's now saying
it has to undo stuff it's done in the previous phases - there are about 12 phases in all and it's near the end. Then
it threw an api error. Here's some of the log:
play_burst was modified to use M.max_media_time_us only (TMB path), but legacy tests expect clip boundary clamping via
get_min_clip_end_us. Let me fix play_burst to branch on M._tmb.
⏺ Searched for 1 pattern, read 1 file (ctrl+o to expand)
⏺ I need to add the legacy clip boundary computation.
⎿ Interrupted · What should Claude do instead?
❯ why do you have to go back to the legacy versions? why are you undoing the migration?
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5.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_011CYH5fivok8hktGUQV13tp"}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.45
- Feedback ID: aa4b849a-0562-469a-a85d-5c5cc29efa49
Errors
[{"error":"Error: 1P event logging: 5 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n at queueFailedEvents (/$bunfs/root/claude:2101:2350)\n at async doExport (/$bunfs/root/claude:2101:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-19T03:24:38.016Z"},{"error":"Error: {\"message\":\"Failed to export 5 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\",\"originalLine\":\"2101\",\"originalColumn\":\"1409\",\"line\":\"2101\",\"column\":\"1409\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: Failed to export 5 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\\n at doExport (/$bunfs/root/claude:2101:1409)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/claude:2144:25028)\n at <anonymous> (/$bunfs/root/claude:2096:20332)\n at mk7 (/$bunfs/root/claude:2096:20876)\n at <anonymous> (/$bunfs/root/claude:2097:17366)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-19T03:24:38.016Z"},{"error":"Error\n at <anonymous> (/$bunfs/root/claude:43:10685)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/claude:42:5642)\n at request (/$bunfs/root/claude:45:2149)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-19T03:30:28.825Z"},{"error":"Error: 1P event logging: 43 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/claude:2101:2350)\n at async doExport (/$bunfs/root/claude:2101:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-19T03:34:03.886Z"},{"error":"Error: {\"message\":\"Failed to export 43 events (code=ECONNABORTED, timeout of 10000ms exceeded)\",\"originalLine\":\"2101\",\"originalColumn\":\"1409\",\"line\":\"2101\",\"column\":\"1409\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: Failed to export 43 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n at doExport (/$bunfs/root/claude:2101:1409)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n …
Note: Content was truncated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗