fix(codex-discovery): discover macOS Codex installs - #12
Merged
Conversation
huntharo
force-pushed
the
fix/codex-discovery-chatgpt-app
branch
from
July 9, 2026 21:21
e25aab4 to
1672263
Compare
huntharo
force-pushed
the
fix/codex-discovery-chatgpt-app
branch
from
July 9, 2026 21:24
1672263 to
09df47d
Compare
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
PwrAgent Settings can now show macOS Codex installs even when the desktop app is launched with a sparse GUI
PATH. Discovery checks currentChatGPT.appbundles, legacyCodex.appbundles, and fixed Homebrew install paths (/opt/homebrew/bin/codex,/usr/local/bin/codex) as known auto-candidates.This fixes machines where
/Applications/ChatGPT.app/Contents/Resources/codexexists but/Applications/Codex.appdoes not, and also machines where Codex is installed through Homebrew but/opt/homebrew/binor/usr/local/binis missing from the Electron launch environment. The Homebrew paths use the same Settings-visibleapplicationsource as other known install locations, and the existing Homebrew preflight reader can report symlinked Cellar/Caskroom versions without executing when possible.Normal executable discovery and version sorting still apply across discovered candidates. The returned discovery snapshot continues to expose parsed candidate versions through
candidates[].version; callers can read the selected candidate's version, andresolveCodexCommandreturns the selected command with its parsedversionas well.Verification
pnpm --filter @pwrdrvr/codex-discovery testpnpm --filter @pwrdrvr/codex-discovery typecheckpnpm --filter @pwrdrvr/codex-discovery buildcodex-cli 0.139.0.banner as0.139.0and exposes it on both the selected discovery candidate andresolveCodexCommand.PATH=/usr/bin:/bin:/usr/sbin:/sbinandplatform: "darwin"selected/opt/homebrew/bin/codexat0.144.0, with/Applications/ChatGPT.app/Contents/Resources/codexat0.144.0-alpha.4also returned as a Settings-visibleapplicationcandidate on this machine.Note: this worktree did not have
pnpmon shellPATH, so verification used the repo-pinnedpnpm@10.33.0vianpm execafter installing dependencies.@pwrdrvr/agent-corewas built first so workspace package exports resolved for the filtered checks.