claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Authentication Key Lost on Claude Code Updates

Open StephenBadger opened this issue 7 months ago • 3 comments

Environment:

Platform: WSL2 Issue: Frequent reauthorization required

Problem Description: Claude Code frequently requires reauthorization and generation of new API keys, particularly after updates. The existing key appears to be lost during the update process, forcing users to generate new keys and clean up old ones. Impact:

User Experience: Disruptive workflow interruption requiring frequent reauth Organizational Overhead: Multiple developers in organization need to manage key cleanup Analytics Degradation: Messes with Cost Per API Key statistics and tracking Key Management Burden: Accumulation of unused keys requires manual cleanup

Steps to Reproduce:

Authenticate Claude Code with API key Update Claude Code Attempt to use Claude Code Observe authentication failure requiring new key generation

Expected Behavior: Authentication should persist across updates, maintaining the same API key. Actual Behavior: Each update invalidates the existing key, requiring new authentication and key generation. Frequency: Occurs consistently with Claude Code updates on WSL2.

StephenBadger avatar May 29 '25 18:05 StephenBadger

I wonder if this is the same as https://github.com/anthropics/claude-code/issues/1414

max-sixty avatar May 29 '25 23:05 max-sixty

Hi! How are you authenticating into Claude Code? Are you using /login, and if so, are you using Max or API? If the latter, which API?

bcherny avatar May 30 '25 23:05 bcherny

@bcherny I follow the prompts when it asks, which is the oauth flow for API. https://console.anthropic.com/, not using a third party. Most recent update did not cause this, two from other day did.

StephenBadger avatar Jun 01 '25 04:06 StephenBadger

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Dec 07 '25 10:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 15 '25 14:12 github-actions[bot]