[BUG] API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)
Environment
- Claude CLI version: Claude Code
- Operating System: <!-- e.g. macOS
- Terminal:
Bug Description
Error: File has not been read yet. Read it first before writing to it. ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10) ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10) ⎿ API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10) ⎿ API Error (Request timed out.) · Retrying in 4 seconds… (attempt 4/10) ⎿ API Error (Request timed out.) · Retrying in 8 seconds… (attempt 5/10) ⎿ API Error (Request timed out.) · Retrying in 18 seconds… (attempt 6/10)
I'm on the Max $200 plan, but I'm getting these issues again and again.
I am having the same issue. I have to exit and create another claude terminal but it only works for a little bit and then i get API errors again
I got the same thing. This seems to line up with the day the Google had their outage
https://www.tomsguide.com/news/live/google-cloud-down-jun-12-outage
Also having this issue...
getting the same issue and I tried reporting it to claude with the /report tool
the problem is "env": { "MAX_THINKING_TOKENS": "32000" } , remove it
this is VERY FRUSTRATING OVER and OVER again
⏺ Update Todos ⎿ ☐ Créer SPEC_ECOSYSTEM_ARCHITECTURE.md - Vision globale de l'architecture modulaire ☐ Créer SPEC_SSO_MODULE_DEPLOYMENT.md - Spécification du module SSO ☐ Mettre à jour le pipeline CI/CD avec l'approche modulaire ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10) ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10) ⎿ API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10) ⎿ API Error (Request timed out.) · Retrying in 4 seconds… (attempt 4/10)
✻ Exploring… (354s · ↑ 0 tokens · esc to interrupt)
Environment Claude CLI version: Claude Code Operating System: <!-- e.g. macOS Terminal in VS CODE:
I keep losing my tokens because of this problem, any workaround to fix?
I keep losing my tokens because of this problem, any workaround to fix?
why using API instead of using normal Claude Web Account ?, it wil be more benefit for you to use your registering account
This is what I made,
I changed my claude folder (as stupid it seems to be)
instead of calling claude from /drive/folder1/sub-folder I"m calling claude from /drive/folder1/ after deleting and cleaning all claude files and cache (.claude/xxx)
anyway he's still getting access to all sub-folder
since then, no problem anymore
hope this will help
why using API instead of using normal Claude Web Account ?,
because it was for trying claude, and I saw a website says $100 to access claude code
but it was too late to learn I could purchase a pro account instead.
I changed my claude folder (as stupid it seems to be) instead of calling claude from /drive/folder1/sub-folder I"m calling claude from /drive/folder1/ after deleting and cleaning all claude files and cache (.claude/xxx)
I'm already calling it from /projects folder, shall I call it from a different folder or from / itself?
the thing is that by simply subscribing to this claude chat https://claude.ai (the normal one) you will use your subscription for Web chat and for CODE
no API tokens to manage only normal usage limit begnning from PRO model (20$)
if needed you can increase your subscription model to MAX (low level) or max (high level) in case of intensive usage
I'm using MAX (high level 200$/month) and I can even open Claude Code twice in my vs Code to perform 2 tasks at once it automatically switches from Opus model to Sonnet model when my usage is too high
Thank you, will purchase next month looks like.
From Anthropic Support to me:
"The timeout issues with long todo lists appear to be related to the extended processing time required for complex multi-step tasks, which can exceed the default API timeout limits. As a workaround, you can increase the API timeout by setting the API_TIMEOUT_MS environment variable before launching Claude Code. For example, you can use the export API_TIMEOUT_MS=600000 command to set it for 10 minutes. The default appears to be 30 seconds (30000ms), but you can increase it significantly for complex tasks like long todo lists."
This worked for me personally.
you need to clear; "env": { "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "XXX", "MAX_THINKING_TOKENS": "ZZZ" } i dont think it relevant to remove this but it worked.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.