[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.
16 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
TLDR Fix
@amihos Just log out and back in again (make sure you are running the latest version) :
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
/usagein the cli and just figured it out.I'm am running the latest version. It appears to be session issue:
<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?Logging out did not fix this for me v2.0.75
@MisterBiggs I found that I had to
unsetmy CLAUDE_CODE_OAUTH_TOKEN environment variable to clear this problemMy ~/.zshrc file now has all of these
Confirming this issue on version 2.0.76 (macOS).
Steps tried:
claude setup-token- completed successfully but error persistsOAuth token does not meet scope requirement user:profileWorkaround to try:
Based on @gerrywastaken's comment, will try
/logoutand logging back in instead ofsetup-token.Note:
setup-tokenappears insufficient to fix this - requires full logout/login cycle to obtain token with correct scopes.The issue is when you use
claude setup-tokenafter a regular login.To reproduce:
/usage- it will displayclaude setup-token/usage- you will get the OAuth permission errorTldr:
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
Im still facing this issue. Logout and login didnt fix it. Unsetting the env var fixed it.
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
Symptoms I Experienced
~/.claude.json:hasExtraUsageEnabled: falsedespite active Max subscriptionRoot Cause Analysis
The OAuth authentication pipeline has multiple failure points:
user:profile)hasExtraUsageEnabled: falseis set by default ✗Workaround
How to Verify
If
hasExtraUsageEnabled: falseappears after re-authentication, it's the backend bug.Related Issues
This appears to be a systemic backend issue where the OAuth → Subscription linking pipeline is failing for valid Max subscribers.
Still reproducible on v2.1.37 (Linux arm64, Anthropic API). Closing my duplicate #24200 in favor of this one.
Clarification: There is no workaround for
setup-tokenusers.The suggested fixes (
/logout+ re-login,unset CLAUDE_CODE_OAUTH_TOKEN) all bypasssetup-tokenentirely and fall back to the web-based OAuth flow. That defeats the purpose ofsetup-token, which exists for headless/CI environments or setups without a browser.The root cause is clear:
claude setup-tokenrequestsscope=user:inferenceonly. The/usageendpoint requiresuser:profile. This is a bug insetup-tokenitself — it needs to requestuser:profileas an additional scope.Until this is fixed, anyone relying on long-lived tokens from
setup-tokensimply cannot use the Usage tab in/status.Still happening with long lived sessions. After doing
/logoutand logging in again, I can see/usage.Neither logout/login nor setup-token doesn't work for me.
Using the latest version 2.1.42
Issue is still present in version 2.1.47
I am going nuts with this issue. Its there and unfixable.
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.