[BUG] Claude stuck at 0 tokens
Environment
- Platform (select one):
- [x] Anthropic API (pro subscription)
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- 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.
<img width="1278" height="667" alt="Image" src="https://github.com/user-attachments/assets/8792116a-0c6d-4af6-8cef-2e3583da94ec" />
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
23 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 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:
For me this said "Network is unreachable" while
-4worked.Fix - prefer IPv4
/etc/gai.conf(Linux):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
<img width="841" height="199" alt="Image" src="https://github.com/user-attachments/assets/1e398d4b-881b-4bd1-be77-cde349cd16a4" />
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
UserPromptSubmithook 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:
claude --debugin one sessionless +F ~/.claude/debug/latestin another"Hello"to claude```text
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
How I fixed it:
claude/hooksI'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.
<img width="713" height="60" alt="Image" src="https://github.com/user-attachments/assets/8e9bc587-e674-4a08-92e5-5c2a9710b6ce" />
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: falsebug in the OAuth authentication flow.My Environment
What's Actually Happening
hasExtraUsageEnabled: falsein~/.claude.jsonHow to Verify This is Your Issue
If
hasExtraUsageEnabled: falseappears despite having a Max subscription, this is the bug.Workaround (Temporary Fix for 0 Tokens Symptom)
This resolved the "0 tokens" symptom for me, but
hasExtraUsageEnabled: falsepersists 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?
Tried this fix and couldn't get it to work. nuked and Downgraded to 2.1.7. Cleared project and global configs. Now seems to work.
Same problem for me, this needs to be fixed.
Note: I am experiencing this with
hasExtraUsageEnabled: true, so the issue is not necessarily https://github.com/anthropics/claude-code/issues/17966.**The workaround in https://github.com/anthropics/claude-code/issues/6008#issuecomment-3828941910 does not function, even after re-authenticating multiple times I am still stuck at zero tokens.
Downgrading the version does not fix the issue either.
我也遇到了这个问题,但是似乎静止claude code一段时间,就会自动恢复?也有可能是我的版本过低,在linux上的低版本会出现这个问题,但是在mac上就没有出现过。