[Bug] Context limit reached with no recovery path when local file exceeds token limit
Resolved 💬 3 comments Opened Nov 22, 2025 by Electro-Jam Closed Nov 26, 2025
Bug Description
I am getting "Context low - Run / compact to compact & continue" -- but the issue here is that there seems to be a local file that gets too big and then none of these commands will work. The only way out of this is to fully restart fresh. I have had this happen to me know several times this week and the challnege is that I am in middle of working on an issue, I get this error, and my ONLY option is to do full restart and lose all of what I had going on in the session.
Environment Info
- Platform: win32
- Terminal: mintty
- Version: 2.0.50
- Feedback ID: b50c915a-b80c-4ee4-a8d7-d7d0bfacd9f8
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 202448 tokens > 200000 maximum\"},\"request_id\":\"req_011CVNsBs87Tir5my4EKvXod\"}\n at H9.generate (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:397:36433)\n at WT.makeStatusError (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1309:2195)\n at WT.makeRequest (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1309:5419)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async j41.model (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3838:14446)\n at async j41 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2081:1872)\n at async oW9 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3838:14598)\n at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3838:7946\n at async us1 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1468:1971)\n at async VIA (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:3838:7916)","timestamp":"2025-11-22T11:41:27.349Z"},{"error":"Error: Conversation too long. Press esc twice to go up a few messages and try again.\n at hQ1 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1885:1660)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2849:47)\n at async e$3 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2791:6844)\n at async R89 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2791:4962)\n at async Jw3 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2798:1925)\n at async PP (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2796:1820)\n at async Me2 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2705:2304)\n at async RZ0 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2705:1406)\n at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2717:1423","timestamp":"2025-11-22T11:41:27.383Z"},{"error":"Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.\n at Object.call (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2850:185)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async e$3 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2791:6844)\n at async R89 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2791:4962)\n at async Jw3 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2798:1925)\n at async PP (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2796:1820)\n at async Me2 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2705:2304)\n at async RZ0 (file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2705:1406)\n at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2717:1423\n at async file:///C:/Users/direc/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2702:4714","timestamp":"2025-11-22T11:41:27.384Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗