[Bug] Anthropic API Error: OAuth token missing user:profile scope

Open 💬 16 comments Opened Nov 19, 2025 by amihos

Bug Description

/usage

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Settings: Status Config Usage (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_011CVJ9dSmiBcFVi2Zo78LBE"}

Environment Info

  • Platform: linux
  • Terminal: wsl-Ubuntu
  • Version: 2.0.47
  • Feedback ID:

Errors

[{"error":"Error: Plugin component file not found: /home/huso/.claude/plugins/marketplaces/anthropic-agent-skills/algorithmic-art for example-skills\n    at Jf1 (/$bunfs/root/claude:1726:8950)\n    at Jf1 (/$bunfs/root/claude:1726:13059)\n    at Mf1 (/$bunfs/root/claude:1726:5600)\n    at async <anonymous> (/$bunfs/root/claude:1726:14042)\n    at async hvI (/$bunfs/root/claude:1726:17416)\n    at async A (/$bunfs/root/claude:1726:18136)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T23:39:47.829Z"},{"error":"Error\n    at wO (/$bunfs/root/claude:59:1143)\n    at <anonymous> (/$bunfs/root/claude:64:10080)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:862:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:66:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T23:39:49.603Z"},{"error":"Error\n    at wO (/$bunfs/root/claude:59:1143)\n    at <anonymous> (/$bunfs/root/claude:64:10080)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:862:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:66:2147)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-11-19T23:39:49.604Z"},{"error":"Error: Tool mcp__openmemory__openmemory_query not found\n    at AhI (/$bunfs/root/claude:1341:507)\n    at C8 (/$bunfs/root/claude:101:19666)\n    at f5 (/$bunfs/root/claude:103:42843)\n    at sT (/$bunfs/root/claude:103:38376)\n    at H0 (/$bunfs/root/claude:103:38304)\n    at OV (/$bunfs/root/claude:103:38158)\n    at rT (/$bunfs/root/claude:103:35233)\n    at wD (/$bunfs/root/claude:101:4818)\n    at OW (/$bunfs/root/claude:103:32479)\n    at <anonymous> (/$bunfs/root/claude:107:1829)","timestamp":"2025-11-19T23:39:51.388Z"},{"error":"Error: Tool mcp__openmemory__openmemory_store not found\n    at AhI (/$bunfs/root/claude:1341:507)\n    at C8 (/$bunfs/root/claude:101:19666)\n    at f5 (/$bunfs/root/claude:103:42843)\n    at sT (/$bunfs/root/claude:103:38376)\n    at H0 (/$bunfs/root/claude:103:38304)\n    at OV (/$bunfs/root/claude:103:38158)\n    at rT (/$bunfs/root/claude:103:35233)\n    at wD (/$bunfs/root/claude:101:4818)\n    at OW (/$bunfs/root/claude:103:32479)\n    at <anonymous> (/$bunfs/root/claude:107:1829)","timestamp":"2025-11-19T23:39:51.624Z"},{"error":"Error: Tool mcp__openmemory__openmemory_store not found\n    at AhI (/$bunfs/root/claude:1341:507)\n    at C8 (/$bunfs/root/claude:101:19666)\n    at f5 (/$bunfs/root/claude:103:42843)\n    at sT (/$bunfs/root/claude:103:38376)\n    at H0 (/$bunfs/root/claude:103:38304)\n    at OV (/$bunfs/root/claude:103:38158)\n    at rT (/$bunfs/root/claude:103:35233)\n   

Note: Error logs were truncated.

View original on GitHub ↗

16 Comments

github-actions[bot] · 7 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/11102

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

gerrywastaken · 7 months ago

TLDR Fix

@amihos Just log out and back in again (make sure you are running the latest version) :

/logout

If that doesn't work, do this: https://github.com/anthropics/claude-code/issues/11985#issuecomment-3695455995

(essentially also logout, but from the API)

----

Yeah I had this same issue when typing /usage in the cli and just figured it out.

I'm am running the latest version. It appears to be session 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_011CVnefk358KyybJ8QPHUVq"}

<img width="1182" height="431" alt="Image" src="https://github.com/user-attachments/assets/b0af6f73-ca6b-46cf-8f42-a3d721f20a10" />

I tried a bunch of things and finally, logging out and back in again worked. So I'm guessing a new permission was added to accounts but it is only applied when you log in, so if somebody has a session from before then it doesn't have the needed permission applied.

:tada:
<img width="872" height="572" alt="Image" src="https://github.com/user-attachments/assets/d30941d3-9e55-44ef-aab0-6826590d70d7" />

---

aside: #11102 is not a dupe as they are complaining about an unexplained usage issue and permissions problem on the website, not the cli. Although the second part is likely related.

Strangely, during my testing of this promblem and not actually making Claude inference requests for the last hour or doing anything other than running /usage. My usage went up by 1% (from 13 to 14%, see screenshots which were taken within a short time) which is similar to what the other user in #11102 was complaining about.

<img width="885" height="525" alt="Image" src="https://github.com/user-attachments/assets/1f18ce93-196f-4668-8952-2bfe5b45f4eb" />

Perhaps there are tokens being consumed simply by launching Claude Code or running /usage?

MisterBiggs · 6 months ago

Logging out did not fix this for me v2.0.75

goofballLogic · 6 months ago

@MisterBiggs I found that I had to unset my CLAUDE_CODE_OAUTH_TOKEN environment variable to clear this problem

codenamezjames · 6 months ago

My ~/.zshrc file now has all of these

unset ANTHROPIC_BASE_URL
unset ANTHROPIC_AUTH_TOKEN
unset CLAUDE_CODE_OAUTH_TOKEN
dglassow · 6 months ago

Confirming this issue on version 2.0.76 (macOS).

Steps tried:

  • Ran claude setup-token - completed successfully but error persists
  • Still getting: OAuth token does not meet scope requirement user:profile

Workaround to try:
Based on @gerrywastaken's comment, will try /logout and logging back in instead of setup-token.

Note: setup-token appears insufficient to fix this - requires full logout/login cycle to obtain token with correct scopes.

Ziyad · 6 months ago

The issue is when you use claude setup-token after a regular login.

To reproduce:

  • Regular (web-flow) log onto Claude Code
  • Check /usage - it will display
  • Mint a headless/long-living token with claude setup-token
  • Check /usage - you will get the OAuth permission error

Tldr:
Long-living token has scopes=["user:inference"], which means OAuth cannot be used to retrieve remaining quota. To make OAuth work, you must obtain a token that includes user:profile, which is provided during the initial Claude Code login flow

shenron0101 · 5 months ago

Im still facing this issue. Logout and login didnt fix it. Unsetting the env var fixed it.

ghcreative869 · 5 months ago

Related Bug: OAuth Token Not Linked to Max Subscription

This OAuth scope issue is part of a broader OAuth → Subscription linking problem affecting Max subscribers since January 2026.

My Environment

  • Claude Code Version: 2.1.27 (CLI)
  • - OS: Ubuntu 25.10 (native Linux)
  • - - Subscription: Claude Max (active)

Symptoms I Experienced

  1. "Osmosing/Scampering 0 tokens" - requests silently rejected
  2. 2. After checking ~/.claude.json: hasExtraUsageEnabled: false despite active Max subscription

Root Cause Analysis

The OAuth authentication pipeline has multiple failure points:

  1. Token generation succeeds ✓
  2. 2. Scope assignment may be incomplete (this issue - missing user:profile)
  3. 3. Subscription verification fails or returns incorrect data ✗
  4. 4. hasExtraUsageEnabled: false is set by default ✗

Workaround

# Clean credentials completely
rm -f ~/.claude.json
rm -rf ~/.claude

# Also unset environment variables if present
unset ANTHROPIC_BASE_URL
unset ANTHROPIC_AUTH_TOKEN
unset CLAUDE_CODE_OAUTH_TOKEN

# Re-authenticate
claude

How to Verify

cat ~/.claude.json | grep -E "(subscriptionType|hasExtraUsageEnabled|rateLimitTier)"

If hasExtraUsageEnabled: false appears after re-authentication, it's the backend bug.

Related Issues

  • #17966 - Main bug report with detailed analysis
  • - #6008 - "0 tokens" symptom
  • - - #20756 - OAuth issues in WSL2

This appears to be a systemic backend issue where the OAuth → Subscription linking pipeline is failing for valid Max subscribers.

jasjisdo · 5 months ago

Still reproducible on v2.1.37 (Linux arm64, Anthropic API). Closing my duplicate #24200 in favor of this one.

jasjisdo · 5 months ago

Clarification: There is no workaround for setup-token users.

The suggested fixes (/logout + re-login, unset CLAUDE_CODE_OAUTH_TOKEN) all bypass setup-token entirely and fall back to the web-based OAuth flow. That defeats the purpose of setup-token, which exists for headless/CI environments or setups without a browser.

The root cause is clear: claude setup-token requests scope=user:inference only. The /usage endpoint requires user:profile. This is a bug in setup-token itself — it needs to request user:profile as an additional scope.

Until this is fixed, anyone relying on long-lived tokens from setup-token simply cannot use the Usage tab in /status.

theholy7 · 5 months ago

Still happening with long lived sessions. After doing /logout and logging in again, I can see /usage.

aprudnikoff · 5 months ago

Neither logout/login nor setup-token doesn't work for me.
Using the latest version 2.1.42

stevensacks · 4 months ago

Issue is still present in version 2.1.47

AfterRealm · 4 months ago

I am going nuts with this issue. Its there and unfixable.

stevensacks · 4 months ago

I resolved it by logging out completely, deleting the oauth token from the Claude settings, and logging back in. The token I got from logging in now has the missing scopes.