[Bug] Anthropic API Error 400: Compact Command Failed

Resolved 💬 3 comments Opened Dec 12, 2025 by campbellmcgregor Closed Dec 15, 2025

Bug Description
Compact fails with API error 400

Environment Info

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

Errors

[{"error":"AggregateError\n    at G8A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:158:14882)\n    at YU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:10016)\n    at YU.emit (node:events:531:35)\n    at YU.emit (node:domain:489:12)\n    at oC1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:3432)\n    at ClientRequest.emit (node:events:531:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:105:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:519:28)\n    at wHA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async _H0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4654:3924)","timestamp":"2025-12-10T17:00:04.392Z"},{"error":"AggregateError\n    at G8A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:158:14882)\n    at YU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:10016)\n    at YU.emit (node:events:531:35)\n    at YU.emit (node:domain:489:12)\n    at oC1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:3432)\n    at ClientRequest.emit (node:events:531:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:105:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:519:28)\n    at wHA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async _H0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4654:3924)","timestamp":"2025-12-10T17:00:21.735Z"},{"error":"AggregateError\n    at G8A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:158:14882)\n    at YU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:10016)\n    at YU.emit (node:events:531:35)\n    at YU.emit (node:domain:489:12)\n    at oC1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:3432)\n    at ClientRequest.emit (node:events:531:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:105:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:519:28)\n    at wHA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async _H0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4654:3924)","timestamp":"2025-12-10T17:00:38.135Z"},{"error":"AggregateError\n    at G8A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:158:14882)\n    at YU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:10016)\n    at YU.emit (node:events:531:35)\n    at YU.emit (node:domain:489:12)\n    at oC1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:3432)\n    at ClientRequest.emit (node:events:531:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:105:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:519:28)\n    at wHA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async _H0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4654:3924)","timestamp":"2025-12-10T17:01:11.520Z"},{"error":"AggregateError\n    at G8A.from (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:158:14882)\n    at YU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:10016)\n    at YU.emit (node:events:531:35)\n    at YU.emit (node:domain:489:12)\n    at oC1.<computed> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:3432)\n    at ClientRequest.emit (node:events:531:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at emitErrorEvent (node:_http_client:105:11)\n    at TLSSocket.socketErrorListener (node:_http_client:518:5)\n    at TLSSocket.emit (node:events:519:28)\n    at wHA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:1

Note: Error logs were truncated.

/compact

⎿  Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5.content.1: 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_011CW2MRGCgr4ucAZWGQ1XbN"}

/compact

⎿  Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5.content.1: 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_011CW2MXaVwSJg5aZUu9b6jA"}

View original on GitHub ↗

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