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

[Bug] Auto-Compact fails with "Conversation too long" error repeatedly

Open garshythoel opened this issue 10 months ago • 1 comments

Bug Description I am unable to compact any conversations they keep failing w/ ⎿ Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.

I have auto compaction on but it just never successfully works. Have to open a new convo every time i hit compaction

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.7
  • Feedback ID: 8be170b6-5e01-4780-8324-82ea19a1cef9

Errors

[{"error":"Error: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at Object.V [as sendNotification] (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:27003)\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:33856)","timestamp":"2026-01-15T21:00:29.733Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/packages/server-utilities/src/avatars.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)","timestamp":"2026-01-15T21:00:29.734Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/packages/server-utilities/src/avatars.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)","timestamp":"2026-01-15T21:00:29.734Z"},{"error":"Error: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at Object.V [as sendNotification] (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:27003)\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:33856)","timestamp":"2026-01-15T21:00:38.225Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/packages/server-utilities/src/avatars.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)","timestamp":"2026-01-15T21:00:38.226Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/packages/server-utilities/src/avatars.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)","timestamp":"2026-01-15T21:00:38.226Z"},{"error":"Error: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at Object.V [as sendNotification] (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:27003)\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:33856)\n    at runNextTicks (node:internal/process/task_queues:60:5)\n    at process.processImmediate (node:internal/timers:454:9)\n    at process.topLevelDomainCallback (node:domain:160:15)\n    at process.callbackTrampoline (node:internal/async_hooks:128:24)","timestamp":"2026-01-15T21:01:00.267Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/apps/inku-app/src/sheets.types.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)\n    at runNextTicks (node:internal/process/task_queues:60:5)\n    at process.processImmediate (node:internal/timers:454:9)\n    at process.topLevelDomainCallback (node:domain:160:15)\n    at process.callbackTrampoline (node:internal/async_hooks:128:24)","timestamp":"2026-01-15T21:01:00.267Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/apps/inku-app/src/sheets.types.ts: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:34032)\n    at runNextTicks (node:internal/process/task_queues:60:5)\n    at process.processImmediate (node:internal/timers:454:9)\n    at process.topLevelDomainCallback (node:domain:160:15)\n    at process.callbackTrampoline (node:internal/async_hooks:128:24)","timestamp":"2026-01-15T21:01:00.267Z"},{"error":"Error: Cannot send notification to LSP server 'plugin:typescript-lsp:typescript': server is error\n    at Object.V [as sendNotification] (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:27003)\n    at D (file:///Users/harshytgoel/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2443:33856)","timestamp":"2026-01-15T21:01:16.071Z"},{"error":"Error: Failed to sync file open /Users/harshytgoel/Projects/inkrepo/apps/inku-app/src/screens/AvatarSetShowcase/compon

Note: Error logs were truncated.

garshythoel avatar Jan 15 '26 21:01 garshythoel

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/18211
  2. https://github.com/anthropics/claude-code/issues/14274
  3. https://github.com/anthropics/claude-code/issues/14053

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 Jan 15 '26 21:01 github-actions[bot]

Confirming this is still reproducible and matches my experience.

After auto-compaction triggers once:

  • subsequent prompts silently fail (revert to draft, no generation)
  • occurs across web, desktop, and iOS
  • also reproducible in brand-new conversations after their first compaction
  • attachments worsen the failure (prompt never submits)

This looks like conversation-state corruption caused by the compaction pipeline, not a client issue.

I previously filed #18482, which appears to be a duplicate of this issue.

elfieelfieelfie avatar Jan 16 '26 05:01 elfieelfieelfie

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 Jan 24 '26 14:01 github-actions[bot]