-
Notifications
You must be signed in to change notification settings - Fork 2k
Provider plugin load fails from CLI when installed via symlink (Homebrew) #2889
Copy link
Copy link
Closed
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Description
Activity
Metadata
Metadata
Assignees
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExempts this issue from stale automation.Exempts this issue from stale automation.
Description
In version 0.48.1, the fix implemented in #2756 successfully prevents a hard crash when the
CodexBarCoreresource 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/codexbarsymlinks to/Applications/CodexBar.app/Contents/Helpers/CodexBarCLI).Because
Bundle.module(or the fallback logic inCodexBarCoreResources) 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 findCodexBar_CodexBarCore.bundleand gracefully fails out (rendering plugins like OpenRouter unusable from the CLI).Steps to Reproduce
CodexBarCLI).codexbar usagefrom the symlinked path.Error: Provider plugin load failed: CodexBarCore resource bundle is missing next to the executable; reinstall or update CodexBarWorkaround
Running the executable directly via its absolute physical path works perfectly:
/Applications/CodexBar.app/Contents/Helpers/CodexBarCLI usageOr by symlinking the bundle into
/opt/homebrew/bin/:ln -s /Applications/CodexBar.app/Contents/Helpers/CodexBar_CodexBarCore.bundle /opt/homebrew/bin/CodexBar_CodexBarCore.bundleSuggested Fix
Update the resource resolution logic to resolve symlinks (e.g., using
URL(fileURLWithPath: CommandLine.arguments[0]).resolvingSymlinksInPath()) before checking for executable-adjacent bundles.