Skip to content

deerbox: first-run auth fails with 401 until deer runs first #272

Description

@KakkoiDev

Description

Fresh install of deer + deerbox (same install.sh run). Running deerbox first results in a 401 authentication error. Running deer (TUI) first succeeds. After that, deerbox works too.

No macOS Keychain access dialog was shown in either case.

Reproduction

  1. Fresh install via curl -fsSL https://raw.githubusercontent.com/zdavison/deer/main/install.sh | bash
  2. Run deerbox in a repo - auth fails with 401
  3. Run deer in same repo - auth succeeds
  4. Run deerbox again - auth succeeds

Environment

  • macOS (Darwin 24.5.0, arm64)
  • Credentials stored in macOS Keychain under Claude Code-credentials
  • No ~/.claude/agent-oauth-token file, no CLAUDE_CODE_OAUTH_TOKEN env var

Analysis

Both binaries use security find-generic-password -s "Claude Code-credentials" -w to read the Keychain. Possible causes:

  • Cold-start race in Bun's subprocess spawning of security
  • Keychain access grant is shared between the two binaries (same codesign/install), but requires one successful access before the other works

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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