[BUG] OAuth token expires excessively — multiple times per day

Resolved 💬 7 comments Opened Mar 21, 2026 by jovimedina Closed May 24, 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?

## Description

As a Max subscription user using Claude Code i am using my work suscription jmedina@surterreproperties.com and, my OAuth authentication token is expiring multiple times per day, requiring me to repeatedly run claude logout && claude login to continue working which is annoying.

This is significantly disrupting my workflow, especially when working in environments where I only have a single terminal session (e.g., cloud-based dev environments) and cannot easily re-authenticate.

  • Claude Code version: 2.1.63
  • Platform: Linux
  • Auth method: OAuth (Max subscription)

What Should Happen?

The OAuth token should have a reasonable lifetime, not expire multiple times within a single working session.

Error Messages/Logs

HTTP 401: authentication_error: OAuth token has expired. Please obtain a new
  token or refresh your existing token.

Steps to Reproduce

  1. Log in to Claude Code using OAuth with a Max subscription (claude login)
  2. Use Claude Code normally for a period of time
  3. After approximately 1-2 hours of use, any command fails with:

HTTP 401: authentication_error: OAuth token has expired

  1. Must run claude logout && claude login to restore access
  2. Token expires again after another 1-2 hours, repeating the cycle
  3. This happens multiple times per day during normal usage

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.63

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="621" height="248" alt="Image" src="https://github.com/user-attachments/assets/a9885b6e-7fbe-42c8-95b3-0b402ca413c2" />

View original on GitHub ↗

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