Bug Report
Bug Description
The automatic retry mechanism for API timeouts is working incorrectly and creates conflicting sessions. After a brief internet disconnection, the system shows "API Error (Request timed out.) · Retrying in X seconds… (attempt Y/10)", but even after connection is restored and the user continues work, the old retry session continues to work in parallel with the new normal session, leading to conflicts and code breakage.
Steps to Reproduce:
- Start executing a task in Claude Code
- Briefly disconnect internet during execution
- Message appears: "API Error (Request timed out.) · Retrying in X seconds…"
- Restore internet connection
- Stop execution and write "continue"
- AI continues work, but old retry session activates in parallel
- Two sessions start working simultaneously, creating code conflicts
Expected Behavior:
When connection is restored or user manually continues work, all previous retry attempts should be canceled.
Actual Behavior:
Old retry sessions remain active and start working in parallel with new session, breaking the entire process.
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 1.0.77
- Feedback ID:
Errors
[{"error":"AxiosError: Request failed with status code 403\n at LN (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:685:1077)\n at Unzip.V0 (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:686:9955)\n at Unzip.emit (node:events:530:35)\n at Unzip.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1698:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n at bB1.request (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:688:2088)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async vH8 (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2381:470)\n at async Promise.all (index 0)\n at async file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:19497","timestamp":"2025-08-13T12:56:35.752Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0: all messages must have non-empty content except for the optional final assistant message\"}}\n at Z6.generate (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:936:2303)\n at QS.makeStatusError (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:953:2101)\n at QS.makeRequest (file:///home/eduard/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:953:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-13T12:56:35.861Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗