[BUG] API Error 403 Please run /login
Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Oct 2, 2025 · closed Jan 18, 2026
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?
I'm a Claude Pro user and using Claude Code via Claude Code for VS Code plugin.
I tried it on both VS Code and Cursor; after logging in to Claude Code, I was immediately and repeatedly asked to run /login.
I tested it on both Ubuntu 22.04 and Windows 11.
I also checked the .credentials.json, the subscriptionType property seems weird.
{"claudeAiOauth":{"accessToken":"sk-ant-oat01-","refreshToken":"sk-ant-ort01-","expiresAt":1759435078288,"scopes":["user:inference","user:profile"],
"subscriptionType":null}}
What Should Happen?
As a Pro user, I should be able to interact with Claude Code without seeing the error message below.
Error Messages/Logs
API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login
Steps to Reproduce
- Open Claude Code window on VS Code or Cursor
- Login
- Type anything you like then submit
- Error Message
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
I don't know
Claude Code Version
2.0.1
Platform
Pro user
Operating System
Ubuntu 22.04 and Windows 11
Terminal/Shell
Cursor and VS Code
Additional Information
_No response_
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I am experiencing this every time I restart my terminal sessions
``
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CTiXPrP6kSphfbe4iZxn4"} · Please run /login``Nah man. It's not the same. Your access token is working, your token seems not stored correctly. My token doesn't work at all, I can't do anything with it
Not a duplicate
Not a duplicate
Nah man. It's not the same. Your token is working, they're not stored correctly. My token doesn't work at all, I can't do anything with it.
Ah my mistake, I'll see if there is another issue for mine
Search for "persistence", there are a lot of issues related to yours.
solution:
-> https://github.com/anthropics/claude-code/issues/8007#issuecomment-3384179638
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.
for me: claude code in command work normally,but vscode -claude code not.
my solution:
windows path:
,delete
and
,then try again.
Which still keeps the saved conversations.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.