Skip to content

OAuth tokens not persisting - requires /login for each web handoff session #17459

@natierau1

Description

@natierau1

Environment

  • OS: macOS 15.6.1 (Sequoia)
  • Claude Code Version: 2.1.4

Problem

OAuth tokens are not being persisted to disk. Each new terminal session requires running /login before the & (web handoff) feature works.

Expected Behavior

After authenticating once, the OAuth tokens should persist across terminal sessions, allowing & web handoff to work without re-authentication.

Actual Behavior

  • ~/.claude.json contains oauthAccount with account metadata (email, org UUID, display name)
  • No accessToken, refreshToken, or expiresAt fields are stored
  • Must run /login in each new terminal session to use & web handoff
  • After /login, web handoff works correctly for that session

Diagnostic Output

$ cat ~/.claude.json | python3 -c "import sys,json; d=json.load(sys.stdin); print(json.dumps(d.get('oauthAccount', {}), indent=2))"
{
  "accountUuid": "...",
  "emailAddress": "...",
  "organizationUuid": "...",
  "hasExtraUsageEnabled": false,
  "displayName": "...",
  "organizationRole": "admin",
  "workspaceRole": null,
  "organizationName": "..."
}

Note: No token fields present. Grep for token|accessToken|refreshToken|expires only returns API usage token counts, not OAuth credentials.

Additional Context

  • ~/.config/claude-code/ directory does not exist
  • No keychain entry found for "claude-code"
  • autoUpdates is set to false in config

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions