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

[Bug] Infinite compaction loop preventing task execution

Open fburkitt opened this issue 2 months ago • 1 comments

Bug Description Claude keeps doing compaction after compaction after compaction after compaction...it writes three lines on the screen and then does another compaction. it is stuck in a loop where it says it is going to do a task, it doesn't do it, then it compacts and comes back and says the same thing again. It is wasting my time and tokens. I want a refund for the last 24 hours, it has eaten up my weekly allocation and basically accomplished nothing.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.0.73
  • Feedback ID: 4655c2f1-e83d-4e61-9412-49b22d855d8e

Errors

[{"error":"MaxFileReadTokenExceededError: File content (34126 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 vcB (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1007:12169)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1016:996)\n    at async file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3611:1459","timestamp":"2025-12-19T13:29:04.401Z"},{"error":"Error: Request was aborted.\n    at u0A._createMessage (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:503:3157)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-12-19T13:29:36.378Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 210631 tokens > 200000 maximum\"},\"request_id\":\"req_011CWG8eo2zR13RvzMEVxPjc\"}\n    at I9.generate (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:499:11051)\n    at gT.makeStatusError (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:2195)\n    at gT.makeRequest (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PV9.qG1.model (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6345)\n    at async qG1 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1335:19526)\n    at async PV9 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6499)\n    at async file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3557\n    at async iQ0 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:996:2037)\n    at async xd (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3528)","timestamp":"2025-12-19T13:34:31.971Z"},{"error":"Error: Request was aborted.\n    at u0A._createMessage (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:503:3157)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-12-19T13:36:38.368Z"},{"error":"Error: Failed to get summary response from streaming\n    at WX1 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1764:1221)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async uP2 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1838:3203)\n    at async Iq (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2200:2365)\n    at async Iq (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2200:7692)\n    at async Iq (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2200:7692)\n    at async Iq (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2200:7692)\n    at async file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2766:1990\n    at async file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2766:2934\n    at async aB7 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2689:5028)","timestamp":"2025-12-19T13:36:38.369Z"},{"error":"Error: Request was aborted.\n    at qG1 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1335:19443)\n    at qG1.next (<anonymous>)\n    at PV9 (file:///Users/fjb_mini/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:1426)\n    at runNextTicks (node:internal/process/task_queues:65:5)\n    at process.processImmediate (node:internal/timers:453:9)\n    at process.topLevelDomainCallback (node:domain:161:15)\n    at process.callbackTrampoline (node:internal/async_hooks:128:24)\n    at async file:///Users/fjb_mini/.npm-glo

Note: Error logs were truncated.

fburkitt avatar Dec 19 '25 19:12 fburkitt