[BUG] Error: Failed to load usage data

Open 💬 31 comments Opened Sep 30, 2025 by galcianuk

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?

When I try to use the /usage command, it just replies with Error: Failed to load usage data

What Should Happen?

I should get my usage data,

Error Messages/Logs

Error: Failed to load usage data

Steps to Reproduce

  1. Launch Claude Code CLI in a WML2 environment
  2. Make claude write some code.
  3. Use /usage command

<img width="823" height="181" alt="Image" src="https://github.com/user-attachments/assets/4df818d5-cd83-46fc-95f4-23c4b7994627" />

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Version: 2.0.1

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

31 Comments

akamalov · 9 months ago

I second this error:

Claude Code Version:

2.0.1 (Claude Code)

Issuing /usage command:

> /usage
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Settings:  Status   Config   Usage   (tab to cycle)

 Error: Failed to load usage data

 Esc to exit
nick442 · 9 months ago

Log out and log in again, it will work

peterbedorjr · 9 months ago

Refreshing the auth token worked for me.

akamalov · 9 months ago

Thanks @peterbedorjr . Yes, I concur that it works once auth token is refreshed.

jveko · 9 months ago

Yes relogin can fix these issue, because the new claude code need more permission

<img width="885" height="236" alt="Image" src="https://github.com/user-attachments/assets/e3ede605-77b4-43aa-8356-e6b01e640cca" />

cowwoc · 9 months ago

Hint to Anthropic: improve the UI. If you need additional permissions, explain as much. Ask the user to relogin.

tdi · 9 months ago

Logout works

samodadela · 9 months ago

Not working for me... tried logout/login - still the same. Then I remembered I had CLAUDE_CODE_OAUTH_TOKEN set.
Unsetting it solved the problem.

I also miss some more info why some thing is not working... this is one example. Other's are why pasting images does not work, why terminal setup doesn't work, etc...

Here are the logs (-d):

[DEBUG] Shell snapshot created successfully (286825 bytes)
[DEBUG] AutoUpdaterWrapper: Installation type: npm-global, using native: false
[DEBUG] Writing to temp file: /home/s/.claude.json.tmp.938123.1759592317405
[DEBUG] Preserving file permissions: 100600
[DEBUG] Temp file written successfully, size: 29987 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/s/.claude.json.tmp.938123.1759592317405 to /home/s/.claude.json
[DEBUG] File /home/s/.claude.json written atomically
[ERROR] AxiosError: AxiosError: Request failed with status code 403
    at fN (file:///home/s/.nvm/versions/node/v20.12.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:715:1077)
    at Unzip.z0 (file:///home/s/.nvm/versions/node/v20.12.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:716:9955)
    at Unzip.emit (node:events:530:35)
    at Unzip.emit (node:domain:488:12)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at vQ1.request (file:///home/s/.nvm/versions/node/v20.12.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:718:2088)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async E3B (file:///home/s/.nvm/versions/node/v20.12.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:2208:3700)
    at async J (file:///home/s/.nvm/versions/node/v20.12.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:2208:5193)
$ uname -a
Linux c 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
tekn0x · 9 months ago

I also get the same error.

marcospgp · 9 months ago

Logging out and back in fixed this for me. But it definitely feels like something that should be fixed regardless.

tispratik · 8 months ago

+1

jackbackes · 8 months ago

Can confirm this remains an issue. I'm on version 2.0.24 on a Mac M3.

<img width="516" height="159" alt="Image" src="https://github.com/user-attachments/assets/8fc8f1be-0006-4a5f-aee1-5ef347f17276" />

I logged out and logged back in, fixed claude doctor issues, refreshed my OAUTH key, disabled my OAUTH key... nothing has helped.

ivanamato · 8 months ago

+1

ismailsunni · 8 months ago

logout and login fixes the issue for me. Claude 2.0.29

dsoldo · 8 months ago

After logging out, when I try to log in again, I get the error "Rate exceeded." I can’t log in either through the console or the UI.

https://claude.ai/api/auth/send_magic_link -> Internal servere error 500

ismailsunni · 8 months ago

@dsoldo that's may be because of https://status.claude.com/incidents/zdxjv49ydg0f

dsoldo · 8 months ago
@dsoldo that's may be because of https://status.claude.com/incidents/zdxjv49ydg0f

Yup, that's why... when I wrote the comment, the status page was "green" ...in any case, Claude is currently partially down and we have to wait...

christiaan-bronkhorst · 8 months ago

I am still having this issue... Claude Code 2.0.31

vicinzu · 8 months ago

I had the same issue. Logging out and back in didn’t help.

Then I remembered that I had set the ANTHROPIC_API_KEY environment variable. After removing it and restarting the shell, I logged back into Claude. Now it works.

christiaan-bronkhorst · 8 months ago

I had to unset CLAUDE_CODE_OAUTH_TOKEN to get it to work as well

kompre · 7 months ago

I have this issue for a while now, across several CC version.

In v2.0.50 it raises:

Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth     
 token does not meet scope requirement
 user:profile","details":{"error_visibility":"user_facing"}},"request_id":"<req  hash>"} 

I've tried to re-run the claude setup-token but nothing has changed. I can see only one env variable CLAUDE_CODE_SSE_PORT in my terminal.

By the way CC is laughably bad at its own documentation: I asked how to fix the error, and multiple times it suggest to run a command that does not exist (claude auth logout): it will only launch code with auth logout as prompt, and the CC will say "oh I see you're trying to do something with auth, do you want me to ...` and proceed to get confused with the content of the directory where it was launched. Then when confronted with the fact it does not work like that, it downplays the error as just "cosmetics"

github-actions[bot] · 6 months ago

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.

eric-summersault · 6 months ago

I am getting this issue still

 Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth
  token does not meet scope requirement
  user:profile","details":{"error_visibility":"user_facing"}},"request_id":"req_hash"}```
peroxy · 6 months ago
I am getting this issue still `` Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth token does not meet scope requirement user:profile","details":{"error_visibility":"user_facing"}},"request_id":"req_hash"}` ``

Same here, ubuntu 24.04

aiarcheology · 5 months ago

Still an issue.
Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth token does not meet scope requirement
user:profile","details":{"error_visibility":"user_facing"}},"request_id":"req_011CXbMKMaKi...."}

paulboul1013 · 5 months ago

same issue in the wsl2 ubuntu-22.04
Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth token does not meet scope requirement user:profile","details {"error_visibility":"user_facing"}},"request_id":"req_011CXpANw7YHNiJSAM6QGGb2"}

philsimon · 5 months ago

Same issue using my MBP M1 running Tahoe. Logging out and then back in doesn't permanently resolve it. Frustrating AF.

oozoofrog · 4 months ago

Same issue here too, from almost 3 weeks ago.

  • plan : max20
  Settings:  Status   Config   Usage  (←/→ or tab to cycle)


  Error: Failed to load usage data: {"type":"error","error":{"type":"permission_error","message":"OAuth token does not meet scope
  requirement user:profile","details":{"error_visibility":"user_facing"}},"request_id":"req_011CYYbCC6xHNaDe9dsnqR2n"}
KernelBypass · 1 month ago

Issue still persists intermittently.

stasadev · 1 month ago

For me the problem was in:

CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

https://code.claude.com/docs/en/env-vars

Shouldn't I see my usage even when this environment variable is set?