claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Compacting Fails Repeatedly with Incorrect "Conversation Too Long" Error

Open Helmi opened this issue 1 year ago • 7 comments

Bug Description Compacting fails over and over again even far before any warning appears. The error then is "Conversation too long" while in fact it's not too long. Ending Claude code, restarting with with --continue and then compacting worked for me in 100% of the cases i tried this since i found out it works.

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 2.0.10
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at pN (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:713:1075)\n    at Unzip.<anonymous> (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:714:9910)\n    at Unzip.emit (node:events:530:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at cQ1.request (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:716:2078)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async lIA (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:877:25947)","timestamp":"2025-10-08T09:45:03.080Z"},{"error":"AxiosError: Request failed with status code 403\n    at pN (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:713:1075)\n    at Unzip.<anonymous> (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:714:9910)\n    at Unzip.emit (node:events:530:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at cQ1.request (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:716:2078)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async qI6 (file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1379:470)\n    at async Promise.all (index 0)\n    at async file:///Users/helmi/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1365:12886","timestamp":"2025-10-08T09:46:13.717Z"}]

Helmi avatar Oct 08 '25 09:10 Helmi

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7692
  2. https://github.com/anthropics/claude-code/issues/9109
  3. https://github.com/anthropics/claude-code/issues/7530

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 08 '25 09:10 github-actions[bot]

I think the others are different in the way that:

  • this happens since 2.0
  • this happens on manual compact mid conversation without a full context
  • this happens very reliably

Helmi avatar Oct 08 '25 10:10 Helmi

👍 from me, i also experience it very consistently, i can almost never do a manual compact. i don't understand why it's not possible to trigger a compact manually, as it does eventually auto compact

Flaxoos avatar Oct 15 '25 12:10 Flaxoos

The workaround appears to be to exit CC and then claude --resume and then /compact works again. I face this when the context has gone down to 0%

lukaso avatar Oct 18 '25 22:10 lukaso

Yeah having an actual solution to this would be amazing. +1 https://github.com/anthropics/claude-code/issues/9109#issuecomment-3434369727

attaway avatar Oct 22 '25 22:10 attaway

This should be fixed in 2.0.31.

amorriscode avatar Nov 03 '25 03:11 amorriscode

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.

github-actions[bot] avatar Nov 10 '25 14:11 github-actions[bot]