Skip to content

Provider plugin load fails from CLI when installed via symlink (Homebrew) #2889

Description

@djbclark

Description

In version 0.48.1, the fix implemented in #2756 successfully prevents a hard crash when the CodexBarCore resource bundle is missing, and the bundle is now correctly shipped inside /Applications/CodexBar.app/Contents/Helpers/.

However, the "Provider plugin load failed" error still occurs when running the CLI via a symlink, which is the default behavior when installing via Homebrew (where /opt/homebrew/bin/codexbar symlinks to /Applications/CodexBar.app/Contents/Helpers/CodexBarCLI).

Because Bundle.module (or the fallback logic in CodexBarCoreResources) appears to probe for the bundle adjacent to the invocation path (/opt/homebrew/bin/) rather than the resolved physical path of the executable, it fails to find CodexBar_CodexBarCore.bundle and gracefully fails out (rendering plugins like OpenRouter unusable from the CLI).

Steps to Reproduce

  1. Install CodexBar via Homebrew (or manually create a symlink to CodexBarCLI).
  2. Run codexbar usage from the symlinked path.
  3. Observe the output: Error: Provider plugin load failed: CodexBarCore resource bundle is missing next to the executable; reinstall or update CodexBar

Workaround

Running the executable directly via its absolute physical path works perfectly:
/Applications/CodexBar.app/Contents/Helpers/CodexBarCLI usage

Or by symlinking the bundle into /opt/homebrew/bin/:
ln -s /Applications/CodexBar.app/Contents/Helpers/CodexBar_CodexBarCore.bundle /opt/homebrew/bin/CodexBar_CodexBarCore.bundle

Suggested Fix

Update the resource resolution logic to resolve symlinks (e.g., using URL(fileURLWithPath: CommandLine.arguments[0]).resolvingSymlinksInPath()) before checking for executable-adjacent bundles.

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

    P1Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions