Compaction Failure: Conversation Length Exceeds Processing Limit
Status Closed — not planned
Maintainer reply None cached
Activity 12 comments · opened Jun 15, 2025 · closed Jan 10, 2026
Bug Description
/compact
⎿ Error: Error during compaction: Error: Conversation too long.
Press esc to go up a few messages and try again.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 1.0.24
- Feedback ID: 546b7692-9e82-472a-9528-e25979964a6f
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at HZ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8863\n at Q (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n at tJ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8009)\n at HS (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:7090)\n at T6 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11202)","timestamp":"2025-06-15T18:42:19.974Z"},{"error":"Error: Request was aborted.\n at Lw.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:3784)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-15T18:49:08.574Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 202576 tokens > 200000 maximum\"}}\n at h6.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1329:12578)\n at Lw.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:2082)\n at Lw.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async ME2.K11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:22008)\n at async K11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:12203)\n at async ME2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:21854)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17103\n at async yt1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:5151)\n at async Fu (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17073)","timestamp":"2025-06-15T18:55:16.093Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 204960 tokens > 200000 maximum\"}}\n at h6.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1329:12578)\n at Lw.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:2082)\n at Lw.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1344:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async ME2.K11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:22008)\n at async K11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:12203)\n at async ME2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:21854)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17103\n at async yt1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:5151)\n at async Fu (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1698:17073)","timestamp":"2025-06-15T19:18:36.915Z"},{"error":"Error: Conversation too long. Press esc to go up a few messages and try again.\n at BH1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1914:7444)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1977:1674)\n at async FU5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2431:58)\n at async Wp (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2427:19304)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2434:3648","timestamp":"2025-06-15T19:18:36.932Z"},{"error":"Error: Error during compaction: Error: Conversation too long. Press esc to go up a few messages and try again.\n at Object.call (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1977:1963)\n at process.processTicksAndRejections (node:internal/proc
Note: Error logs were truncated.
12 Comments
I am having this also, did you find a solution?
same problem
The error message is missing the twice.
You can hit
esctwice, it will bring up a list of your past prompts, you can go up to previous messages and run the/compactearlier.Thats cool, although its rather slow when switching between messages if you have a really long message
Can't believe the error message is missing such a crucial part of the message. I hit
esctwice and was able to go back to a previous prompt and compact from there.I'm also having the same problem. This is a newly introduced bug as evidenced by the multiple threads reporting the same thing. It's very annoying and I have to babysit runs a lot more now.
This has not always worked for me, and even if it did, I hate that I lose the most relevant context.
I do not understand the reason for this "feature". Just force auto-compact if you cannot do a regular /compact.
Indeed, what if the very last exchange is where it fixed a critical bug and if you jump before that it would lose the information/context about it.
It seems crazy to me that the
/compactcommand should ever fail because of not having enough space. The purpose of calling it is to free up more space. So it needs to resolve its own issues related to space management in order to achieve that goal. If there is not enough space, can it use the same logic as auto compact? Or can it write the context out to a temp file and then summarize that file in a separate ephemeral session? Or can we split the context into two parts, summarize each, and then combine? It is just unreasonable to have this command fail because of not having enough space.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 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 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.