[Bug] Ralph loop max iterations not respected, stop hook errors with empty iterations
Resolved 💬 4 comments Opened Jan 14, 2026 by sam-1x Closed Feb 27, 2026
Bug Description
when asking claude code to use ralph loop with max iterations the stop hook errors out, it happened multiple times before but this instance is painfully evident,646 iterations 636 of which are empty. mx iterations not respected.
Environment Info
- Platform: darwin
- Terminal: zed
- Claude Code version: 2.1.6
- Feedback ID: ac8a052a-df96-4199-a890-09f0b33b817e
Errors
[{"error":"Error: Request was aborted.\n at DBA._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:494:3157)\n at processTicksAndRejections (node:internal/process/task_queues:103:5)\n at runNextTicks (node:internal/process/task_queues:68:3)\n at process.processTimers (node:internal/timers:538:9)","timestamp":"2026-01-13T22:13:40.247Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (node:fs:435:20)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:464\n at UD (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:34188)\n at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:433)\n at SA2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4728:23205)\n at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:942)\n at AW7 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3323:27232)","timestamp":"2026-01-13T22:14:45.294Z"},{"error":"Error: 1P event logging: 16 events failed to export\n at Va1.queueFailedEvents (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:260:2038)\n at async Va1.doExport (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:260:1195)","timestamp":"2026-01-13T22:18:11.138Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 16 events\\n at Va1.doExport (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:260:1297)\",\"message\":\"Failed to export 16 events\",\"name\":\"Error\"}\n at e$0.error (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2740:34862)\n at Pi1.error (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:254:10496)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:254:41521\n at yh3 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:254:42067)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:20245","timestamp":"2026-01-13T22:18:11.138Z"},{"error":"MaxFileReadTokenExceededError: File content (27457 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 PA2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1681:13298)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:996)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3218:1513","timestamp":"2026-01-13T22:33:32.999Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at nU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:56:10445)\n at nU.emit (node:events:508:28)\n at nU.emit (node:domain:489:12)\n at Timeout.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:55:5608)\n at listOnTimeout (node:internal/timers:605:17)\n at process.processTimers (node:internal/timers:541:7)\n at NUA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:58:2132)\n at runNextTicks (node:internal/process/task_queues:64:5)\n at process.processTimers (node:internal/timers:538:9)\n at async $x0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4986:4241)","timestamp":"2026-01-13T22:37:39.732Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at nU.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:56:10445)\n at nU.emit (node:events:508:28)\n at nU.emit (node:domain:489:12)\n at Timeout.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:55:5608)\n at listOnTimeout (node:internal/timers:605:17)\n at process.processTimers (node:internal/timers:541:7)\n at NUA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:58:2132)\n at runNextTicks (node:internal/process/task_queues:64:5)\n at process.processTimers (node:internal/timers:538:9)\n at async $x0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4986:4241)","timestamp":"2026-01-13T22:47:09.600Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at
Note: Error logs were truncated.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗