[BUG] Claude stuck at 0 tokens
Environment
- Platform (select one):
- [x] Anthropic API (pro subscription)
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.83
- Operating System: 14.3.1
- Terminal: Kitty
Bug Description
Claude gets stuck on 0 tokens. It doesn't show any errors. It just never produces anything.
Steps to Reproduce
- Run
claude --verbose. - Say "hi" or anything else.
- Wait indefinitely.
Expected Behavior
I'd expect proper error messages or actual responses.
Actual Behavior
Nothing happens.
Update: After about 5 minutes of inactivity, claude actually responded normally. Then my next message was also answered promptly. But when I closed and re-opened claude, it again got stuck.
Additional Context
I deleted ~/.claude.json and ~/.claude.
I also tested on a Linux server I had, and things worked fine there. Claude was also working fine on my laptop, but it recently stopped working. I did reinstall claude dozens of times due to all the auth bugs:
- https://github.com/anthropics/claude-code/issues/5244
- https://github.com/anthropics/claude-code/issues/5515
- https://github.com/anthropics/claude-code/issues/5957
- https://github.com/anthropics/claude-code/issues/1222
- https://github.com/anthropics/claude-code/issues/5969
I am running Claude under a proxy using HTTP_PROXY etc. I do not think this is the problem, however, even if it is, claude should generate proper error messages.
Here is claude doctor:
Checking installation status…
Diagnostics
└ Currently running: native (1.0.83)
└ Path: /Users/evar/.local/bin/claude
└ Invoked: /Users/evar/.local/share/claude/versions/1.0.83
└ Config install method: native
└ Auto-updates enabled: false
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/3692
- https://github.com/anthropics/claude-code/issues/3786
- https://github.com/anthropics/claude-code/issues/3799
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
This problem went away itself. But the bug remains; CC should log its operations somewhere so that long delays like this can be debugged.
same problem
I think I may have found the cause. This issue seems related to the Node.js version.
In Node.js 22+, the native fetch uses undici under the hood by default, and it appears undici has some known issues with proxy support (see https://github.com/nodejs/undici/issues/4086).
After downgrading Node.js to version 20 and reinstalling claude, the issue was resolved.
Another possible cause: IPv6 connectivity issues
I had identical symptoms but my issue was DNS returning IPv6 addresses (AAAA records) on a network without working IPv6 routing.
Quick check:
curl -6 -v --connect-timeout 5 https://api.anthropic.com
For me this said "Network is unreachable" while -4 worked.
Fix - prefer IPv4 /etc/gai.conf (Linux):
precedence ::ffff:0:0/96 100
Or just disable IPv6 on your system if you don't use it.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I'm having the same issue. Sometimes it just sits at 0 tokens, and sometimes it responds to my prompt, then sits at 0 tokens and I have to end the session to get a new response
same, seems to correlate with some background task finishing today, never had that before afaict
Same issue here
same here
I am now having this issue too on two separate sessions: "Booping… (esc to interrupt · 1h 27m 40s · ↓ 0 tokens)"
Same issue here
Same issue here
powershell & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable Installing the stable version with this command and then downgrading it to 2.1.7 can resolve this issue. The latest version available at the time of my reply was 2.1.19.
Tried all these fixes and no luck. reinstalled and cleaned out the config. No luck. Stays stuck at 0 tokens and then fires at about 8-10 mins in
same here
For me, the solution was to remove a UserPromptSubmit hook from a seemingly unrelated and older project.
It started at some point yesterday, I'm not sure exactly what triggered it. It may have been when I installed codev, not sure. But every time I would ask claude it would stall for minutes at a time at 0 tokens, and then eventually resolve.
How I found it:
- Ran
claude --debugin one session - ran
less +F ~/.claude/debug/latestin another - sent
"Hello"to claude - found this in debug log:
2026-01-08T00:25:19.495Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined 2026-01-08T00:25:19.495Z [DEBUG] Found 1 hook matchers in settings - thought that i don't remember having any intended hooks for user prompt submit here
How I fixed it:
- Ran
claude - Ran
/hooks - Went to UserPromptSubmit hooks
- found the random one that was there
- removed it
I've been experiencing this issue as well over the past several days. Claude will often sit there for over 2 minutes with 0 tokens before it finally starts doing something.
This is getting extremely frustrating.
Root Cause Identified: OAuth Token Not Linked to Max Subscription
I've been investigating this "0 tokens" issue extensively and found the root cause - it's related to the hasExtraUsageEnabled: false bug in the OAuth authentication flow.
My Environment
- Claude Code Version: 2.1.27 (CLI)
-
- OS: Ubuntu 25.10 (Linux)
-
-
- Subscription: Claude Max (active)
-
What's Actually Happening
- When you authenticate, the OAuth token is generated successfully
-
- However, the subscription verification endpoint fails or returns incorrect data
-
- The system defaults to
hasExtraUsageEnabled: falsein~/.claude.json
- The system defaults to
-
- This causes requests to be silently rejected, displaying "0 tokens"
How to Verify This is Your Issue
cat ~/.claude.json | grep -E "(subscriptionType|hasExtraUsageEnabled|rateLimitTier)"
If hasExtraUsageEnabled: false appears despite having a Max subscription, this is the bug.
Workaround (Temporary Fix for 0 Tokens Symptom)
# Clean all credentials
rm -f ~/.claude.json
rm -rf ~/.claude
# Re-authenticate
claude
This resolved the "0 tokens" symptom for me, but hasExtraUsageEnabled: false persists after re-authentication - this is a backend bug that Anthropic needs to fix.
Related Issue
The detailed bug report is in #17966 - this is a systemic issue with the OAuth → Subscription linking pipeline affecting many Max subscribers since January 2026.
Request to Anthropic Engineering
The subscription verification flow needs investigation. Why is it failing/returning incorrect data for valid Max subscribers?