claude-code - 💡(How to fix) Fix macOS keychain credentials not reused after auto-update — forces re-login on every version bump [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#49167Fetched 2026-04-17 08:48:59
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

On macOS, Claude Code stores OAuth credentials in the login keychain under service Claude Code-credentials. After every auto-update, the new binary cannot read the existing keychain item and falls back to the OAuth login flow, repeating the cycle on the next update.

Root Cause

On macOS, Claude Code stores OAuth credentials in the login keychain under service Claude Code-credentials. After every auto-update, the new binary cannot read the existing keychain item and falls back to the OAuth login flow, repeating the cycle on the next update.

Fix Action

Workaround

Set DISABLE_AUTOUPDATER=1 in ~/.claude/settings.json and update manually with claude update.

RAW_BUFFERClick to expand / collapse

Summary

On macOS, Claude Code stores OAuth credentials in the login keychain under service Claude Code-credentials. After every auto-update, the new binary cannot read the existing keychain item and falls back to the OAuth login flow, repeating the cycle on the next update.

Likely cause

Claude Code is installed at a version-specific path (~/.local/share/claude/versions/<version>/) with ~/.local/bin/claude as a symlink. macOS keychain ACLs bind to the signed binary, so the new versioned binary is not on the ACL of the keychain item created by the previous version, and a new item is written in its place.

Evidence

  • security find-generic-password -s "Claude Code-credentials" shows cdat and mdat both equal to the moment of the most recent /login, confirming replacement (not reuse).
  • Token in the entry is valid (refresh token present, expiresAt in the future), so this is not an expiry issue.

Environment

  • Claude Code 2.1.110
  • macOS Darwin 25.4.0
  • Install path: ~/.local/share/claude/versions/2.1.110

Workaround

Set DISABLE_AUTOUPDATER=1 in ~/.claude/settings.json and update manually with claude update.

Suggested fix

Re-grant the keychain ACL to the new binary on update, or install to a stable non-versioned path.

extent analysis

TL;DR

The most likely fix is to re-grant the keychain ACL to the new binary on update or install to a stable non-versioned path to prevent the loss of OAuth credentials after auto-updates.

Guidance

  • Verify the issue by checking the security find-generic-password output to confirm the keychain item is being replaced on each update.
  • Consider setting DISABLE_AUTOUPDATER=1 in ~/.claude/settings.json and updating manually with claude update as a temporary workaround.
  • To mitigate the issue, explore installing Claude Code to a stable, non-versioned path to maintain consistency in the keychain ACL.
  • Investigate the possibility of programmatically re-granting the keychain ACL to the new binary on update to automate the process.

Example

No code snippet is provided as the issue does not require a specific code change but rather a change in installation path or update process.

Notes

The suggested fix assumes that re-granting the keychain ACL or installing to a non-versioned path will resolve the issue. However, the effectiveness of these solutions may depend on the specific implementation details of Claude Code and macOS keychain management.

Recommendation

Apply the workaround by setting DISABLE_AUTOUPDATER=1 and updating manually until a more permanent solution, such as installing to a stable path or automating ACL re-granting, can be implemented. This reason for this choice is to immediately prevent the loss of OAuth credentials while a more robust solution is developed.

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 macOS keychain credentials not reused after auto-update — forces re-login on every version bump [1 comments, 2 participants]