[BUG] OAuth token expiration causing repeated 401 errors despite re-authentication

Resolved 💬 3 comments Opened Jan 22, 2026 by webshaman Closed Jan 22, 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?

  • 401 authentication_error with "OAuth token has expired"
  • Required 4 login attempts to get past "auth failed"
  • Error recurring even after successful re-authentication
  • Request ID: req_011CXNgZ7zZJY834jK17vSWU

This will help the team track and fix the token refresh/persistence issue
you're experiencing.

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_011CXNgZ7zZJY834jK17vSWU"}

What Should Happen?

it should not have this error :)

Error Messages/Logs

Steps to Reproduce

got this earlier ⎿ 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_011CXNgZ7zZJY834jK17vSWU"} and then I logged out
and logged in, it took four attempts to get it to not have an "auth failed"
and then I'm back in. but then I ran another task and it threw the error
again

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

 1.0.93 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Note, regarding your question of "Which API platform" it's the ClaudeCode direct platform, not Anthropic API, but there wasn't that option in the dropdown

<img width="896" height="661" alt="Image" src="https://github.com/user-attachments/assets/03f85250-499f-44e2-9e10-4721435c1bad" />

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗