[BUG]: request issue with logined by claude console (create an api key), #1334

Closed
opened 2026-02-16 17:30:29 -05:00 by yindo · 7 comments
Owner

Originally created by @jinzhongjia on GitHub (Aug 16, 2025).

Originally assigned to: @thdxr on GitHub.

Version: v0.5.4
Platform: windows 11 24h2

I met this error:

AI_APICallError: OAuth token lacks required scopes. Token must have the following scopes: user:inference 
Image
Originally created by @jinzhongjia on GitHub (Aug 16, 2025). Originally assigned to: @thdxr on GitHub. Version: v0.5.4 Platform: windows 11 24h2 I met this error: ``` AI_APICallError: OAuth token lacks required scopes. Token must have the following scopes: user:inference ``` <img width="2628" height="804" alt="Image" src="https://github.com/user-attachments/assets/12d32ec5-de2b-4a60-bf5e-e124e1f39261" />
yindo closed this issue 2026-02-16 17:30:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 16, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #417: How does opencode work with Claude Code OAuth tokens when AI SDK fails?

The error message "OAuth token lacks required scopes. Token must have the following scopes: user:inference" suggests this is related to OAuth token scope issues, which is discussed in detail in issue #417.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 16, 2025): This issue might be a duplicate of existing issues. Please check: - #417: How does opencode work with Claude Code OAuth tokens when AI SDK fails? The error message "OAuth token lacks required scopes. Token must have the following scopes: user:inference" suggests this is related to OAuth token scope issues, which is discussed in detail in issue #417. Feel free to ignore if none of these address your specific case.
Author
Owner

@jinzhongjia commented on GitHub (Aug 16, 2025):

I was using opencode yesterday and everything was working fine, but now I have a problem

@jinzhongjia commented on GitHub (Aug 16, 2025): I was using opencode yesterday and everything was working fine, but now I have a problem
Author
Owner

@rekram1-node commented on GitHub (Aug 16, 2025):

Hmm will look into this

@rekram1-node commented on GitHub (Aug 16, 2025): Hmm will look into this
Author
Owner

@jinzhongjia commented on GitHub (Aug 16, 2025):

I did a relogin in between because I was trying to debug something

Then I encountered this problem, I suspected that anthropic modified something

@jinzhongjia commented on GitHub (Aug 16, 2025): I did a relogin in between because I was trying to debug something Then I encountered this problem, I suspected that anthropic modified something
Author
Owner

@rekram1-node commented on GitHub (Aug 16, 2025):

ahhh i can replicate thanks for finding this!

@rekram1-node commented on GitHub (Aug 16, 2025): ahhh i can replicate thanks for finding this!
Author
Owner

@thdxr commented on GitHub (Aug 18, 2025):

fixed in latest

@thdxr commented on GitHub (Aug 18, 2025): fixed in latest
Author
Owner

@jinzhongjia commented on GitHub (Aug 18, 2025):

oh, thanks

@jinzhongjia commented on GitHub (Aug 18, 2025): oh, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1334