[Bug] Auto-Compact Fails Due to Conversation Length Limit
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Oct 3, 2025 · closed Jan 29, 2026
Bug Description
it fails to compact saying "Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try
again." often. its happened at single digit % and 0% and refuses to move foward. it doesn't even autocompact
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.0.2
- Feedback ID:
Errors
[{"error":"Error: Request was aborted.\n at ng._createMessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:899:4711)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:520:9)","timestamp":"2025-10-01T17:57:35.395Z"},{"error":"Error: Request was aborted.\n at ng._createMessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:899:4711)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-01T23:38:08.778Z"},{"error":"Error: Request was aborted.\n at ng._createMessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:899:4711)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-01T23:38:32.833Z"},{"error":"McpError: MCP error -32603: Attempted to use detached Frame 'A2500192933044A2A27AEB1843F546A7'.\n at mM1._onresponse (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:16569)\n at _transport.onmessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:13741)\n at q30.processReadBuffer (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:2306)\n at Socket.<anonymous> (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:1672)\n at Socket.emit (node:events:518:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-10-02T00:14:21.927Z"},{"error":"McpError: MCP error -32603: Attempted to use detached Frame 'A2500192933044A2A27AEB1843F546A7'.\n at mM1._onresponse (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:16569)\n at _transport.onmessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:13741)\n at q30.processReadBuffer (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:2306)\n at Socket.<anonymous> (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:1672)\n at Socket.emit (node:events:518:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-10-02T00:14:25.499Z"},{"error":"MaxFileReadTokenExceededError: File content (31529 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at Na2 (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1834:404)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1829:1010)\n at async ay6 (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2652:27289)\n at async YYB (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2652:23431)","timestamp":"2025-10-02T00:14:37.741Z"},{"error":"Error: Request was aborted.\n at ng._createMessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:899:4711)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-02T00:14:51.085Z"},{"error":"McpError: MCP error -32603: Attempted to use detached Frame 'A2500192933044A2A27AEB1843F546A7'.\n at mM1._onresponse (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:16569)\n at _transport.onmessage (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1004:13741)\n at q30.processReadBuffer (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:2306)\n at Socket.<anonymous> (file:///Users/aneesh/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1006:1672)\n at Socket.emit (node:events:518:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/stre
Note: Error logs were truncated.
10 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
All the time for me!
Can't Claude Code just have some smart fallback strategy?
e.g.:
sounds like trivial workaround, not perfect, but better then annoying error happening so often... and ofc if rootcause would be addressed still having this fallback , only makes system more resilient and self recoverable in case of regression in the future, so probably good to have such "fallback of last resort" anyway implemented.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This seems to have re-surfaced in latest udpate for me. Auto-compacting reaches zero and locks up sessions (v2.0.64 regression)
yes, i also get this.
Ran into the same issue today. Conversation id: b75bef82-13d1-43a4-ae0a-25e54879328f
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.