claude-code - 💡(How to fix) Fix [BUG] OAuth token expires frequently despite refresh_token presen [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47092Fetched 2026-04-13 05:41:42
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Authentication drops multiple times per day. ~/.claude/.credentials.json contains a refreshToken but it doesn't auto-refresh. Requires manual /login each time.

What Should Happen?

Token should auto-refresh using the stored refreshToken without requiring manual /login. Sessions should stay authenticated indefinitely.

Error Messages/Logs

Steps to Reproduce

  1. /login in one session
  2. Run Claude Code in multiple tmux sessions
  3. After some hours all sessions lose auth simultaneously

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.92 (native installer)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The most likely fix is to investigate and potentially update the authentication token refresh mechanism to properly utilize the stored refreshToken in ~/.claude/.credentials.json.

Guidance

  • Investigate the authentication token refresh logic to ensure it is correctly implemented and utilizing the refreshToken.
  • Verify that the refreshToken is valid and not expired, and that the refresh mechanism is being triggered as expected.
  • Check for any changes in the authentication flow or token management between the current version (2.1.92) and the previous working version.
  • Consider testing the authentication flow in a single session to isolate the issue and determine if it's related to multiple tmux sessions.

Example

No code snippet is provided as the issue lacks specific implementation details.

Notes

The issue may be related to a regression in the authentication token refresh mechanism, and investigating the changes between the current and previous working versions may help identify the root cause.

Recommendation

Apply workaround: Implement a temporary solution to manually refresh the authentication token at regular intervals to mitigate the issue until a permanent fix is found. This is recommended because the root cause of the issue is unclear, and a workaround can help alleviate the problem while further investigation is conducted.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] OAuth token expires frequently despite refresh_token presen [1 comments, 2 participants]