[Bug] Compact command fails with "Conversation too long" error despite sufficient context window available

Resolved 💬 3 comments Opened Oct 29, 2025 by gdigora Closed Nov 2, 2025

Bug Description

/compact

⎿  Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.

/feedback

⎿  Feedback / bug report cancelled

/context

⎿  
Context Usage
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ ⛁ claude-sonnet-4-5-20250929 · 111k/200k tokens (56%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ System prompt: 2.6k tokens (1.3%)
⛁ ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ System tools: 13.3k tokens (6.7%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ MCP tools: 560 tokens (0.3%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Memory files: 3.7k tokens (1.9%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Messages: 46.1k tokens (23.0%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝ ⛶ Free space: 89k (44.4%)
⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ Autocompact buffer: 45.0k tokens (22.5%)
⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝

MCP tools · /mcp
└ mcp__ide__getDiagnostics (ide): 560 tokens

Memory files · /memory
└ Project (/Users/digora/Documents/Documents_cloud/Work/RedSense/Pyru3.7k
Backup For 2025-05-06 13-08-41/CLAUDE.md): tokens

SlashCommand Tool · 0 commands
└ Total: 864 tokens

Environment Info

  • Platform: darwin
  • Terminal: pycharm
  • Version: 2.0.28
  • Feedback ID: 22432d34-6e7c-431f-9f92-f0fc8c1e7fa2

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at YD (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4413)\n    at file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:5401\n    at Array.map (<anonymous>)\n    at YD (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:5372)\n    at file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:5288\n    at Array.map (<anonymous>)\n    at YD (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:5277)\n    at file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4141\n    at Array.map (<anonymous>)\n    at OF (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4132)","timestamp":"2025-10-29T07:12:31.296Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at YD (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4413)\n    at file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4141\n    at Array.map (<anonymous>)\n    at OF (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4132)\n    at YTQ (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1797:6306)\n    at Vw (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:73:19414)\n    at Qo (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:75:42806)\n    at T9 (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:75:38347)\n    at zc (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:75:38275)\n    at Lw (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:75:38129)","timestamp":"2025-10-29T07:12:31.297Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at YD (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4413)\n    at file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4141\n    at Array.map (<anonymous>)\n    at OF (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1175:4132)\n    at YTQ (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1797:6306)\n    at Vw (file:///Users/digora/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:73:19414)\n    at Qo (file:///Users/digora/.claude/local

Note: Error logs were truncated.

View original on GitHub ↗

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