[Bug] Manual Compaction Fails with "Conversation Too Long" Error
Status Fixed / completed
Maintainer reply ✓ Yes — amorriscode
Activity 8 comments · opened Sep 29, 2025 · closed Nov 3, 2025
💡 Likely answer: A maintainer (amorriscode, contributor)
responded on this thread — see the highlighted reply below.
Bug Description
my attempts to run /compact in advance of running out of space give an error message ( Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try
again.) However if I just keep going down to 0% then auto-compact kicks in and works fine.
NOTE: I also got "Error submitting feedback / bug report" so used to feature to create an issue in GH instead which did work.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.128
- Feedback ID:
Errors
[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at AK (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:1183)\n at file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:911\n at Array.map (<anonymous>)\n at WJ (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:902)\n at bJB (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2912:9380)\n at KC (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n at Mp (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n at V9 (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n at jh (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n at LC (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)","timestamp":"2025-09-27T20:04:07.201Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (node:fs:442:20)\n at Object.readFileSync (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16544)\n at lBB (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3607:659)\n at Object.call (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1712:952)\n at call.next (<anonymous>)\n at Th6 (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:21990)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async HFB (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:18132)\n at async U2B (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1163:31089)\n at async Y8B (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1937:1846)","timestamp":"2025-09-27T20:35:53.146Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (node:fs:442:20)\n at Object.readFileSync (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:16544)\n at lBB (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3607:659)\n at Object.call (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1712:952)\n at call.next (<anonymous>)\n at BO (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1163:30556)\n at file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1790:1328\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-27T20:43:57.495Z"},{"error":"Error: Shell b7988f is not running, so cannot be killed (status: killed)\n at Object.call (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3306:1757)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Th6 (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:21990)\n at async HFB (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:18132)\n at async U2B (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1163:31089)\n at async Y8B (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1937:1846)\n at async Rh6 (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:17325)\n at async Lh6 (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:16266)\n at async vO (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:13530)\n at async vO (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3227:14460)","timestamp":"2025-09-27T21:07:32.723Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: rules\n at file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1149:367\n at Object.useMemo (file:///Users/pauledge/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:25928)\n
Note: Error logs were truncated.
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Note that after restarting claude code, the problem is no longer occurring. Same terminal, same feature branch etc.
i'm also getting this error
auto compact is the only thing working
Same here! After i had just 1% context left, i tried /compact command and it failed. I exited cloude code (ctrl + c -> twice) and then claude --continue and then /compact worked.
This should be fixed! ;)
it's now occuring again after 2.0.21 / 22
<img width="714" height="67" alt="Image" src="https://github.com/user-attachments/assets/fb5d54d0-1187-4e55-8da5-b6b7431a45bc" />
I just closed #9856 as a duplicate, exact same issue 2025-10-18
This should be fixed in
2.0.31.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.