[Bug] OAuth token expiration causing repeated 401 authentication errors during active sessions
Status Open
Reported on v2.1.7
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Jan 14, 2026
Bug Description
starting today, i keep getting a 401 error during my claude code sessions. i've been using claude code for months and only started getting this error today. I shouldn't need to re-run the /login command multiple times per day. i've gotten it 3 times in a <5 hour window. Error:
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_011CX7zT7Swc35VFkEUZ57Fo"} · Please run /login
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 2.1.7
- Feedback ID: c92426b9-6bb2-454d-98ba-1facb71112ca
Showing cached comments. Read the full discussion on GitHub ↗
10 Comments
Same for me
I'm experiencing the exact same issue since this morning
In my case, I was getting a self-signed certificate error (OAuth error: self signed certificate in certificate chain), and I was able to work around it by running:
NODE_TLS_REJECT_UNAUTHORIZED=0 claudeand then executing
/login.For reference.
same issue since this morning as well.
Cannot pinpoint when this started happening, but it seems to happen more frequently lately.
Also, it seems to happen when a new Claude Code session is started in another repository while existing sessions still do not require re-authing.
Recently, I've started running into this every day when trying to continue a session. In the vscode extension chat, the sign-in screen displays immediately after I send a message. It's very annoying
Same, It makes me annoyting either
Same for me. I got a pro plan yesterday then have to deal with this issue Today, not a good thing.
In my case I had to logout/login to Claude Agent on xCode to solve it.
Getting this persistently, even after
/logoutand/loginsame for me, even after trying multiple times I am not able to authenticate claude terminal