Skip to content

[Bug] Claude OAuth refresh failure prevents new sessions on Windows #2678

Description

@katanumahotori

Environment

  • OS: Windows 11 x64
  • Paseo: 0.2.5
  • Claude Code: native 2.1.220
  • Subscription: Claude Max via claude.ai OAuth

What happened

A new Claude Code session launched from Paseo failed with:

Failed to authenticate: OAuth session expired and could not be refreshed

The first failure was recorded at 2026-07-30 22:51:30 UTC. Paseo then retried the same prompt on the same connection and created another Claude session, which failed with the same error at 22:52:11 UTC.

After completing the browser OAuth login again, claude auth status reported a valid Max login and a diagnostic Claude session launched from Paseo returned AUTH_OK.

Evidence and suspected cause

This may be a credential refresh race between Claude Code and Paseo's Claude usage-fetcher. Both can access ~/.claude/.credentials.json, and the usage-fetcher appears to refresh and write credentials after a 401/403 response. I cannot prove which process invalidated the token in this incident, but the failure pattern is consistent with concurrent refresh/write activity.

The same prompt was retried automatically after the authentication failure, which created a second failed session instead of presenting a clear re-login path.

Expected behavior

  • A transient OAuth refresh failure should not invalidate the user's working session.
  • Credential refreshes should be coordinated with Claude Code's credential handling.
  • Paseo should avoid automatically retrying the identical prompt after authentication_failed, or should clearly request re-authentication first.

Workaround

Separating Paseo's Claude agent configuration with CLAUDE_CONFIG_DIR allowed the agent to authenticate independently. This is only a local workaround, not a proposed product fix.

No OAuth tokens, account identifiers, or prompt contents are included here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReproducible unintended behaviorp1Serious issue to investigate or fix nextplatform:windowsWindows specifictriagedReviewed by maintainer triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions