Skip to content

Claude login pins usage source to OAuth and disables Auto fallback #1970

Description

@Chipagosfinest

Summary

Successful Claude login can persist the Claude usage source as oauth, which disables the auto fallback path. If the current Claude CLI login reports success but CodexBar cannot read OAuth credentials afterward, the app can get stuck repeatedly asking for Claude credentials.

Local repro / observed behavior

Environment:

  • CodexBar app: 0.41.0 (/Applications/CodexBar.app, build commit 27cff88a1)
  • Claude Code: 2.1.201
  • macOS app install, default menu-bar flow

What I saw locally:

  1. CodexBar had Claude enabled with source: "oauth" in ~/.config/codexbar/config.json.
  2. Running codexbar --provider claude --format json --pretty returned:
    Claude OAuth credentials not found. Run claude to authenticate.
  3. App logs included a keychain cache read failure for oauth.claude.
  4. The menu-bar app kept asking for Claude credentials, even though Claude Code itself was installed and authenticated enough for CLI usage.

Workaround:

  • Changing the Claude source in ~/.config/codexbar/config.json from oauth to auto, validating config, and restarting CodexBar stopped the credential prompt loop locally.

Suspected root cause

runClaudeLoginFlow() currently forces:

self.settings.claudeUsageDataSource = .oauth

after the login runner reports success.

That makes the app persist an OAuth-only state immediately after the setup flow. If CodexBar cannot read the OAuth credentials, it never gets to use the app's fallback behavior. Keeping the source on auto is less brittle: OAuth can still be preferred when readable, but CLI/Web fallback remains available when OAuth is not usable.

Related issues

Expected behavior

A successful Claude setup flow should leave CodexBar in a resilient source mode. Out of the box, login should not pin users to OAuth-only if Auto fallback is available and intended as the safer default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions