fix(mac): find bundled Codex app CLI#413
Open
atomtanstudio wants to merge 1 commit intobrowser-use:mainfrom
Open
fix(mac): find bundled Codex app CLI#413atomtanstudio wants to merge 1 commit intobrowser-use:mainfrom
atomtanstudio wants to merge 1 commit intobrowser-use:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the bundled Codex.app CLI locations to the macOS PATH enrichment fallback list so Browser Use can detect Codex when the Codex desktop app is installed but
codexis not otherwise discoverable from the Electron app process PATH.This covers the default app bundle locations:
/Applications/Codex.app/Contents/Resources~/Applications/Codex.app/Contents/ResourcesBackground
On macOS, Browser Use can inherit a GUI-launched PATH that does not include the Codex desktop app bundle resources. In that case the Codex install probe fails with
codex not found on PATH, even though Codex.app is installed and~/.codex/auth.jsonis present.I hit this locally with Browser Use 0.0.30. The app log showed the split clearly:
{ "install": { "installed": false, "error": "codex not found on PATH" }, "auth": { "authed": true } }Adding a local
~/.local/bin/codexsymlink to/Applications/Codex.app/Contents/Resources/codexmade the probe succeed, confirming the issue was CLI discovery rather than auth. This patch makes that fallback built in for the installed Codex.app layout.Test
npm run test -- tests/unit/pathEnrich.test.tsResult: 3 passed.
Summary by cubic
Add Codex.app bundled CLI paths to macOS PATH enrichment so the app can find Codex when the desktop app is installed but
codexisn’t on PATH. Fixes the “codex not found on PATH” issue for GUI-launched sessions./Applications/Codex.app/Contents/Resourcesand~/Applications/Codex.app/Contents/Resourcesas macOS fallback dirs.darwin.Written for commit d5e0937. Summary will update on new commits.