[Bug] OAuth token expiration causing repeated 401 authentication errors during active sessions

Status Open
Reported on v2.1.7
Maintainer reply None cached
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

View original on GitHub ↗

10 Comments

distractedCoding · 7 months ago

Same for me

raw1z · 7 months ago

I'm experiencing the exact same issue since this morning

jk-es335 · 7 months ago

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 claude

and then executing /login.

For reference.

pierrevalade · 7 months ago

same issue since this morning as well.

nkovacic · 7 months ago

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.

risenxxx · 6 months ago

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

dkleecle · 6 months ago

Same, It makes me annoyting either

NuntiusMortis · 4 months ago

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.

lucidbots-sean · 4 months ago

Getting this persistently, even after /logout and /login

hemanthreddy90 · 4 months ago

same for me, even after trying multiple times I am not able to authenticate claude terminal

Showing cached comments. Read the full discussion on GitHub ↗