[Bug] Anthropic API Error: Conversation too long during compaction

Resolved 💬 3 comments Opened Jan 4, 2026 by kromek Closed Jan 4, 2026

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

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.0.76
  • Feedback ID: 0c1d0ffc-72b0-4790-ae5d-84f2b61426e3

Errors

[{"error":"MaxFileReadTokenExceededError: File content (52475 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at EdB (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1018:12169)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1027:996)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T14:58:39.494Z"},{"error":"MaxFileReadTokenExceededError: File content (52475 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at EdB (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1018:12169)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1027:996)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T14:59:13.639Z"},{"error":"v82: Diagnostics file path mismatch: expected C:\\Users\\przem\\.claude\\plans\\effervescent-sparking-pelican.md, got file://c:\\users\\przem\\.claude\\plans\\effervescent-sparking-pelican.md/)\n    at MP.beforeFileEdited (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1212:51449)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1265:1253)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T15:06:40.750Z"},{"error":"v82: Diagnostics file path mismatch: expected c:\\Apps\\Sapro\\Produkcja\\gerrit_SaproProdSupport_VSCODE_v2\\backend\\xlapi\\xlapi_version.py, got file://c:\\apps\\sapro\\produkcja\\gerrit_saproprodsupport_vscode_v2\\backend\\xlapi\\xlapi_version.py/)\n    at MP.beforeFileEdited (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1212:51449)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1873:624)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T15:20:03.662Z"},{"error":"v82: Diagnostics file path mismatch: expected c:\\Apps\\Sapro\\Produkcja\\gerrit_SaproProdSupport_VSCODE_v2\\backend\\xlapi\\cdn_api_net.py, got file://c:\\apps\\sapro\\produkcja\\gerrit_saproprodsupport_vscode_v2\\backend\\xlapi\\cdn_api_net.py/)\n    at MP.beforeFileEdited (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1212:51449)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1873:624)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T15:21:22.815Z"},{"error":"v82: Diagnostics file path mismatch: expected c:\\Apps\\Sapro\\Produkcja\\gerrit_SaproProdSupport_VSCODE_v2\\backend\\xlapi\\cdn_api_net.py, got file://c:\\apps\\sapro\\produkcja\\gerrit_saproprodsupport_vscode_v2\\backend\\xlapi\\cdn_api_net.py/)\n    at MP.beforeFileEdited (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1212:51449)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1873:624)\n    at async Au5 (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2026-01-04T15:21:41.294Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 200029 tokens > 200000 maximum\"},\"request_id\":\"req_011CWnZmNcmoZPAV8oi1Eohp\"}\n    at F9.generate (file:///C:/Users/przem/AppData/Roaming/npm/node_modules/@anthropic-ai/claude

Note: Error logs were truncated.

View original on GitHub ↗

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