Network Timeout Errors Occurring Frequently in API Calls
Resolved 💬 30 comments Opened Feb 26, 2025 by ppamment Closed May 5, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
ApiError: read ETIMEDOUT happening almost every request. Some response tokens are generated, but it halts after a short whle with this error
Environment Info
- Platform: linux
- Terminal: undefined
- Version: 0.2.9
- Feedback ID: 27c8403f-88b9-4205-8e8c-5e8f1af9e755
30 Comments
Are you using 1P API, Bedrock, or Vertex?
1P API, assuming you mean Anthropic 1st party API?
Still same thing happening, Emphasis added by me.
● I'll analyze your zsh configuration and update your fish config. Let me check the files first.
● Search(pattern: ".zshrc")…
⎿ Found 1 file
● Search(pattern: ".oh-my-zsh/**")…
⎿ Found 100 files
● Search(pattern: "~/.config/fish/config.fish")…
⎿ Found 0 files
● Search(pattern: "/home/user/.config/fish/**")…
⎿ Found 29 files
⎿ API Error: read ETIMEDOUT
! ping anthropic.com
⎿ PING anthropic.com (160.79.104.10) 56(84) bytes of data.
64 bytes from 160.79.104.10 (160.79.104.10): icmp_seq=1 ttl=52 time=14.6 ms
64 bytes from 160.79.104.10: icmp_seq=2 ttl=52 time=18.0 ms
⎿ Terminated
Exit code 143
● Let me examine your zsh and fish configurations to transfer your custom functionality.
● Read(file_path: ".zshrc")…
⎿ # If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
... (+158 lines)
● Read(file_path: ".config/fish/config.fish")…
⎿ if status is-interactive
# Commands to run in interactive sessions can go here
end
... (+1 lines)
● Let me update your fish config with the equivalent functionality from your zsh setup:
● Write(file_path: .config/fish/config.fish)…
⎿ Updated .config/fish/config.fish with 63 additions and 1 removal
1 if status is-interactive
2 # Commands to run in interactive sessions can go here
3 end
REDACTED
66 \ No newline at end of file
∗ Herding… (324s · esc to interrupt)
And we seem to be stuck again. Running WSL2 ubuntu with
SHELL=/bin/bash claudeas I read on another issue it ca have issues with zshLooking into it -- thanks for the report
I also have the same problem. I am using Proton VPN.
I also have the same problem.
⏺ Bash(cd /path/my-project && ./gradlew build -i)…
⎿ Error: spawnSync /bin/sh ETIMEDOUT
Direct access with no other internet issues. claude code not responding anymore.
Having the same issue here.
Getting the same problem ! I'm only 2 messages into the conversation !
This happens occasionally during peak API load times. Wait a bit and try again when it happens. Working on making these less frequent.
It happens every day. Can switching to the Max plan reduce the issue's intensity? Also, what should I type when it breaks during a working pipeline? Will
continuebe enough?@maksimmuravev I'm on Max plan, but I also have this issue.
⎿ 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 5 seconds… (attempt 4/10)
⎿ API Error (Request timed out.) · Retrying in 9 seconds… (attempt 5/10)
⎿ API Error (Request timed out.) · Retrying in 19 seconds… (attempt 6/10)
⎿ API Error (Request timed out.) · Retrying in 39 seconds… (attempt 7/10)
I was having the same issue, and then I uninstalled the claude code npm package and then downloaded it again on my wsl ubuntu "npm install -g @anthropic-ai/claude-code"
I did this because I ran that /doctor and it mentioned it could not update my package
Not sure if this will help, but worth a shot!
Update - Ran into the issue again shortly after, then picked up I had a local install of claude and global
Seems to be working again after removing the local install and just having the global install
Same here still api time out..
Yes on windows PC it works perfect for me. I used it 10 hours today there. Now and then I also want to use claude code on ubuntu server... What a joke, the first 2 commands work maybe, then it API errors 10 out of 10 attempts and fails. This is such a shame because claude code also would be a great help to help me on my server at times... I got the most expensive Max license btw
Your VPN might be causing or worsening the problem. If you're using a popular VPN, you could be encountering rate limits due to many users sharing the same connection node. Try disabling your VPN to see if the issue goes away.
Hey, there same issue for me too with and without Vpn.
I'm not even using a VPN, and I'm still facing the issue. What's the point of paying $200/month :/
!Image
I am not using a VPN or a firewall. I am not saying my network is perfect, but atleast --debug or something should give more info for this problem.
I'm using Claude in WindSurf and if you use --debug, the entire terminal gets filled with the debug logs and you can't scroll up/down to see the issue. I haven't tried it in the native terminal yet
I'm having the same issues. I've tried with and without a VPN. Not sure what's going on with it. Every once in a while it works for easy tasks, which makes me believe that Claude Code utilizes different agents for different tasks, and one of the important agents may not be working? Not sure. I don't know much about the inner workings.
I'll add I've been encountering this issue for 3 days, ever since I installed claude code, so it's not that Claude servers are down.
⎿ 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)
⎿ API Error (Request timed out.) · Retrying in 33 seconds… (attempt 7/10)
⎿ API Error (Request timed out.) · Retrying in 37 seconds… (attempt 8/10)
⎿ API Error (Request timed out.) · Retrying in 35 seconds… (attempt 9/10)
⎿ API Error (Request timed out.) · Retrying in 34 seconds… (attempt 10/10)
same issue occuring, but on restarting laptop its working fine , but restarting everytime doesn't make sense, not sure if its due to some DNS cache clearing or another server getting allocated when restarting laptop
<img width="974" alt="Image" src="https://github.com/user-attachments/assets/b8daa16a-13d5-4a79-8530-7ac41efeaaa6" />
Half of the requests end up the same way — no VPN and a Cyprus location. I guess they prioritize based on some algorithm since this keeps happening. I'm not sure what to do. Sometimes, restarting the
claudebinary helps.Update: Another workaround is to open multiple windows—4 work for me. Run
claude --continuein each. When one starts working well, close the others.+1, having the same issues, almost unusable rn
why this issue is closed?
Try switching to public DNS (8.8.8.8 or 1.1.1.1) in wsl, it worked for me.
In wsl:
sudo nano /etc/resolv.conf
Add:
nameserver 8.8.8.8
nameserver 1.1.1.1
And restart wsl.
For the record @andrej-suty 's method seems to work
also pls. note. You may need to edit
/etc/wsl.confand addto prevent settings from getting erased or overwritten by the default values when wsl is shutdown and restarted. This should make things more stable.
The comment that helped me was to open another terminal with
claude --continueand then close the one with the API issues.Fully uninstall Little Snitch from your macOS. Just disabling it or setting it to ALL ON won't solve the problem. No need to say thank you.
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.