[Bug] Infinite loop with empty Bash consuming tokens but not doing anything
Resolved 💬 5 comments Opened Dec 7, 2025 by dnickerson Closed Feb 8, 2026
Bug Description
claude code is in an endless loop using tokens and not doing anything: BashOutput(Reading shell output)
⎿ (No content)
● BashOutput(Reading shell output)
⎿ (No content)
● BashOutput(Reading shell output)
Environment Info
- Platform: linux
- Terminal: WezTerm
- Version: 2.0.60
- Feedback ID: a09eedca-6971-4753-bfb8-03ce6947ff94
Errors
[{"error":"AxiosError: Request failed with status code 401\n at cS (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:1137)\n at IncomingMessage.<anonymous> (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:9852)\n at IncomingMessage.emit (node:events:536:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at wHA.request (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async qS2 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2064:6679)","timestamp":"2025-12-07T14:47:57.117Z"},{"error":"AxiosError: Request failed with status code 401\n at cS (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:1137)\n at IncomingMessage.<anonymous> (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:9852)\n at IncomingMessage.emit (node:events:536:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at wHA.request (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async U_7 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2874:8387)\n at async file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2874:9281","timestamp":"2025-12-07T14:47:57.128Z"},{"error":"AxiosError: Request failed with status code 401\n at cS (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:171:1137)\n at IncomingMessage.<anonymous> (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:172:9852)\n at IncomingMessage.emit (node:events:536:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at wHA.request (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:174:2130)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async U_7 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2874:8387)\n at async file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2874:9281","timestamp":"2025-12-07T14:47:57.313Z"},{"error":"MaxFileReadTokenExceededError: File content (59917 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 I12 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1446:10603)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.call (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1455:963)\n at async file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1671:1465","timestamp":"2025-12-07T15:07:47.987Z"},{"error":"MaxFileReadTokenExceededError: File content (59917 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 I12 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1446:10603)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.call (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1455:963)\n at async file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1671:1465","timestamp":"2025-12-07T15:08:15.988Z"},{"error":"MaxFileReadTokenExceededError: File content (59917 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 I12 (file:///home/dananickerson/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1446:1
Note: Error logs were truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗