Skip to content

fix(mac): find bundled Codex app CLI#413

Open
atomtanstudio wants to merge 1 commit intobrowser-use:mainfrom
atomtanstudio:fix-macos-codex-app-cli-detection
Open

fix(mac): find bundled Codex app CLI#413
atomtanstudio wants to merge 1 commit intobrowser-use:mainfrom
atomtanstudio:fix-macos-codex-app-cli-detection

Conversation

@atomtanstudio
Copy link
Copy Markdown

@atomtanstudio atomtanstudio commented May 7, 2026

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 codex is 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/Resources

Background

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.json is 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/codex symlink to /Applications/Codex.app/Contents/Resources/codex made 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.ts

Result: 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 codex isn’t on PATH. Fixes the “codex not found on PATH” issue for GUI-launched sessions.

  • Bug Fixes
    • Adds /Applications/Codex.app/Contents/Resources and ~/Applications/Codex.app/Contents/Resources as macOS fallback dirs.
    • Adds a unit test to verify both paths are appended on darwin.

Written for commit d5e0937. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant