[Bug] Auto-compact fails when conversation exceeds context limit, blocking manual compaction

Resolved 💬 3 comments Opened Dec 13, 2025 by aronweiler Closed Dec 17, 2025

Bug Description
Claude ran out of context, didn't auto-compact, and now won't let me /compact because "Error: Conversation too long. Press esc twice to go up a few messages and try again.". However, it was working on this problem so long, that the previous message is it's own compaction, so there is nothing to go back to. This effectively loses the conversation for me.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.0.69
  • Feedback ID: 49df7b6d-86c6-40a3-86ce-9da4bc40ee78

Errors

[{"error":"MaxFileReadTokenExceededError: File content (37776 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 oWB (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:956:10569)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:965:897)\n    at async file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3198:1464","timestamp":"2025-12-13T22:10:50.309Z"},{"error":"MaxFileReadTokenExceededError: File content (37776 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 oWB (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:956:10569)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:965:897)\n    at async file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3198:1464","timestamp":"2025-12-13T22:10:50.669Z"},{"error":"MaxFileReadTokenExceededError: File content (37776 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 oWB (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:956:10569)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:965:897)\n    at async file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3198:1464","timestamp":"2025-12-13T22:10:59.115Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:442:20)\n    at file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:429\n    at hI (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:8:8084)\n    at Object.readFileSync (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:404)\n    at rWB (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:4383:20051)\n    at Object.call (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:965:843)\n    at GF8 (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1780:17104)\n    at runNextTicks (node:internal/process/task_queues:65:5)\n    at process.processImmediate (node:internal/timers:453:9)","timestamp":"2025-12-13T22:23:52.737Z"},{"error":"iwB: Diagnostics file path mismatch: expected C:\\Users\\aronw\\.claude\\plans\\purring-doodling-crane.md, got file://c:\\users\\aronw\\.claude\\plans\\purring-doodling-crane.md/)\n    at j_.beforeFileEdited (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1073:54331)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1132:1253)\n    at async GF8 (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1780:17096)","timestamp":"2025-12-13T22:26:48.267Z"},{"error":"AbortError: The operation was aborted\n    at abortChildProcess (node:child_process:716:27)\n    at AbortSignal.onAbortListener (node:child_process:786:7)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)\n    at AbortSignal.dispatchEvent (node:internal/event_target:762:26)\n    at runAbort (node:internal/abort_controller:486:10)\n    at abortSignal (node:internal/abort_controller:457:3)\n    at AbortController.abort (node:internal/abort_controller:505:5)\n    at Timeout._onTimeout (file:///C:/Users/aronw/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:4390:2059)\n    at listOnTimeout (node:internal/timers:588:17)\n    at process.processTimer

Note: Error logs were truncated.

View original on GitHub ↗

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