Conversation Compaction Failure: Unable to Reduce Context Length

Resolved 💬 3 comments Opened Aug 13, 2025 by istorrs Closed Aug 17, 2025

Bug Description
I asked Claude to read a 2.7MB PDF for background context. I got a warning about low context. I was told to use /compact. This produced this error message: "Error: Error during compaction: Error: Conversation too long. Press esc to go up a few messages and try again." - I pressed escape several times to go up messages but nothing got me beyond this error.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 1.0.72
  • Feedback ID: c71a1dae-7e59-439e-812f-fe815c98dad2

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:1184)\n    at file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:912\n    at Array.map (<anonymous>)\n    at LX (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1858:903)\n    at SjB (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2218:5231)\n    at $R (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:19859)\n    at yb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:42848)\n    at Sb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38369)\n    at Ij (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38297)\n    at gR (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38151)","timestamp":"2025-08-12T16:12:06.256Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1782:421\n    at Object.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:26368)\n    at WR9.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)\n    at FC (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1782:313)\n    at $R (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:19859)\n    at yb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:42848)\n    at Sb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38369)\n    at Ij (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38297)\n    at gR (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38151)\n    at jC (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:35214)","timestamp":"2025-08-12T16:17:11.632Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1782:421\n    at Object.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:26368)\n    at WR9.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)\n    at FC (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1782:313)\n    at $R (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:19859)\n    at yb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:42848)\n    at Sb (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38369)\n    at Ij (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38297)\n    at gR (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:38151)\n    at jC (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:329:35214)","timestamp":"2025-08-12T16:19:39.744Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1782:421\n    at Object.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:327:26368)\n    at WR9.useMemo (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)\n    at FC (file:///home/rtp-lab/.nvm/versions/node/v22.17.1/lib/node_modules/@anthro

Note: Error logs were truncated.

View original on GitHub ↗

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