[BUG] Claude Code gets stuck sporadically
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After I send a message, Claude Code sometimes freezes for 5 minutes straight. The UI shows 0 tokens used and just nothing happens. Eventually Claude Code recovers like nothing was wrong.
What Should Happen?
It should respond normally without the long freeze.
Error Messages/Logs
Steps to Reproduce
- Start Claude Code
- Send any message
- UI freezes with "0 tokens used" showing — this happens sporadically
- Have to wait or restart Claude Code
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Versions from 2025-09 worked without this issue
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Dug into the network requests and realized there's always a pending request to statsig.anthropic.com when this happens.
Quick proof:
- Force resolve
statsig.anthropic.comto localhost - The hang goes away
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/15384
- https://github.com/anthropics/claude-code/issues/15823
- https://github.com/anthropics/claude-code/issues/13317
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
@Anthoooooooony I have the same problem. I'm using a Max X5 license. What license do you have?
@Anthoooooooony I have the same problem. I'm using a Max X5 license. What license do you have?
Same. @mzebrak
@Anthoooooooony I have the same problem. I'm using a Max X5 license. What license do you have?
Same. @mzebrak
I switched to max x20, and I notice the same issue is happening.
+1 for max x20
Have seen hanging behavior consistently for a couple of days. Anecdotally, adding 127.0.0.1 statsig.anthropic.com to /etc/hosts appeared to un-hang the current session immediately, but it didn't help in the long run, saw freezes many times in the hour after.
It has to be an issue with how the VM binds to the network. Once I turned off tailscale, cowork now works. So this is clear direction. I'm going to experiment more with tailscale options (e.g., ignore for local addresses) to see if I can stay connected to my tailnet with claude cowork. Else, it's not super helpful bc I need those network shares.
UPDATE: Cowork hangs indefinitely when connected to any Tailnet, regardless of exit node or local network access settings. Note that Chat and Code work fine on the same Tailnet. This makes it a blocker for anyone who needs network share access for cowork.
There are ways to fix this, but it's app level and not user level. I'm guessing it's binding to 127.0.0.1 and should instead bind at 0.0.0.0. Of course, then needs to reject any IP other than Anthropic's.
UPDATE 2: Found the issue! It's how tailscale handles DNS routing. Anthropic still needs to fix DNS routing (way less complicated than binding), but you can solve IF tailscale is the problem by turning off "Use Tailscale DNS settings". That's actually fine for me since my tailnet boxes now route through adguard DNS, so solves 2 problems :)
Tailscale's DNS resolver is what's breaking Cowork, not the binding or routing. This is actually great news because:
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.