infinite loop trying to run multiple bash commands in parallel when one of them was failing
Resolved 💬 3 comments Opened Sep 13, 2025 by paulkellis Closed Sep 16, 2025
Bug Description
There was an infinite loop during this session. Here's what Claude Code had to say:
Yikes. You were in an infinite loop of output there. I typed "Stop" and then you went back to normal. I
hope I haven't just used a metric ton of tokens on that.
⏺ You're absolutely right, and I apologize for that! I got stuck in an infinite loop trying to run
multiple bash commands in parallel when one of them was failing. When you typed "Stop", it broke me
out of that loop and I was able to continue normally.
That was a waste of tokens and not good behavior on my part. I should have:
- Noticed the TypeScript error and stopped to address it properly
- Not tried to run multiple commands when one was clearly failing
- Been more focused and methodical instead of rushing through multiple operations
Thank you for stopping me!
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.112
- Feedback ID: a7434509-6933-4683-9131-7fcf0b1f08bd
Errors
[{"error":"Error: 1: 1 \n at Sl6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1853:4092)\n at async Tl6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1853:1657)","timestamp":"2025-09-12T16:54:05.561Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at hV (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:1184)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:2176\n at Array.map (<anonymous>)\n at hV (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:2147)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:2063\n at Array.map (<anonymous>)\n at hV (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:2052)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:912\n at Array.map (<anonymous>)\n at wX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1768:903)","timestamp":"2025-09-12T17:30:49.435Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 202905 tokens > 200000 maximum\"},\"request_id\":\"req_011CT5QY5pW9xyMbRtLzJW1F\"}\n at J4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:993:2412)\n at gT.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:2131)\n at gT.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T23:52:55.050Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CT5S7y6kkGXwff7c7yuwZ\"}\n at J4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:993:2622)\n at gT.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:2131)\n at gT.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-13T00:13:41.371Z"},{"error":"SyntaxError: Unexpected non-whitespace character after JSON at position 1 (line 1 column 2)\n at JSON.parse (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:733:9932\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:13288)\n at Z2B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1125:1984)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-13T00:13:41.377Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CT5S818YFMyaqp6RM6ocB\"}\n at J4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:993:2622)\n at gT.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:2131)\n at gT.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1010:5344)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async OYB.qY1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1912:29405)\n at async qY1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1912:18004)\n at async OYB (file:///opt/homebrew/lib/node_modu
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗