claude-code - 💡(How to fix) Fix Auth credentials not reused between sessions after 2.1.139 auto-update (Max subscription, macOS)

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…

After Claude Code auto-updated to version 2.1.139 on 2026-05-11 ~15:01 UTC, OAuth credentials are no longer persisted between sessions. Every new tmux/SSH session shows "Not logged in · Please run /login" even though /login was completed successfully in a prior session and ~/.claude/.credentials.json contains valid tokens.

Root Cause

After Claude Code auto-updated to version 2.1.139 on 2026-05-11 ~15:01 UTC, OAuth credentials are no longer persisted between sessions. Every new tmux/SSH session shows "Not logged in · Please run /login" even though /login was completed successfully in a prior session and ~/.claude/.credentials.json contains valid tokens.

Fix Action

Workaround

Manually running /login at the start of each Claude Code session.

RAW_BUFFERClick to expand / collapse

Summary

After Claude Code auto-updated to version 2.1.139 on 2026-05-11 ~15:01 UTC, OAuth credentials are no longer persisted between sessions. Every new tmux/SSH session shows "Not logged in · Please run /login" even though /login was completed successfully in a prior session and ~/.claude/.credentials.json contains valid tokens.

Environment

  • Claude Code version: 2.1.139
  • OS: macOS (Intel Mac mini)
  • Shell: zsh
  • Auth method: Claude subscription (Max plan), OAuth — selected via option 1 in /login
  • Running inside: tmux session on a remote mini, accessed via SSH from a MacBook Pro

Steps to reproduce

  1. Be on 2.1.139 (auto-updated from prior version on 2026-05-11)
  2. SSH into the mini
  3. Attach to a tmux session running Claude Code
  4. Get prompted with Not logged in · Please run /login
  5. Run /login, complete OAuth flow in browser, paste code back — succeeds
  6. Send a message — works
  7. Disconnect / restart tmux / new session
  8. New session shows Not logged in · Please run /login again

Expected behavior

After successful /login, credentials should persist across tmux sessions, SSH disconnects, and machine reboots — just like they did on the prior version, which worked stably for 30+ days.

Actual behavior

~/.claude/.credentials.json is written on each /login containing what appear to be valid tokens:

  • claudeAiOauth.accessToken (sk-ant-oat01-...)
  • claudeAiOauth.refreshToken (sk-ant-ort01-...)

But every new session reports "Not logged in." It appears the tokens in .credentials.json are either not being read on session start, or the refresh logic isn't completing successfully against the stored refresh token.

Evidence

  • ~/.local/bin/claude symlink mtime: 2026-05-11 15:01 → points to ~/.local/share/claude/versions/2.1.139
  • ~/.claude/.credentials.json mtime: updated correctly after each /login (most recent: 2026-05-12 12:20)
  • ~/.claude/ shows newly-created plugins/, read-once/, session-env/ directories — confirming 2.1.139 features are in use
  • Behavior is consistent across SSH sessions and direct mini terminal sessions

Workaround

Manually running /login at the start of each Claude Code session.

Notes

This was 100% stable before the 2.1.139 auto-update. Issue started immediately after the update. No config changes were made to ~/.claude/settings.json (last modified 2026-04-27, untouched in the impacted window).

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…

FAQ

Expected behavior

After successful /login, credentials should persist across tmux sessions, SSH disconnects, and machine reboots — just like they did on the prior version, which worked stably for 30+ days.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING