Repository navigation
Re-land #8395: fix(codex): probe the app-bundled CLI when no Codex CLI resolves - #8404
Conversation
A macOS Child whose only Codex is the CLI inside ChatGPT.app reported
`ocx connect status` readiness as `unverified` ("the selected local Codex
runtime did not report the reasoning levels it supports").
Runtime discovery only offers the app candidate after it classifies the
bundle's XML `Info.plist` identity, so a bundle whose identity it cannot read
leaves the selection on the bare `codex` sentinel. The bundled-catalog probe
then asked a command that does not exist while a real Codex sat inside the
app, and the readiness check had no ladder to compare the installed catalog
against.
When the resolver ends on that bare sentinel, the catalog loader now also
tries the known ChatGPT.app locations, system before per-user, reusing
`macCodexAppCommands`. The candidate list grants no trust: every execution
still passes the app-bundle signature and ownership gate in exec-boundary.ts,
so an unverifiable bundle still yields no ladder and stays `unverified`.
Windows needs no change because its LOCALAPPDATA Codex install root is already
enumerated by `installedCodexCandidates`.
Closes #8360
(cherry picked from commit 57cb4bb)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bb9c190d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (candidates.some(command => command.includes("/") || command.includes("\\"))) return candidates; | ||
| const exists = deps.existsSync ?? existsSync; | ||
| return [...candidates, ...macCodexAppCommands(deps).filter(command => exists(command))]; |
There was a problem hiding this comment.
Restrict app fallback to an actually unresolved runtime
On macOS, a successfully selected runtime can also be a bare command: resolveCodexRuntimeSteps accepts CODEX_CLI_PATH verbatim and can select a runnable bare codex fallback. For example, with CODEX_CLI_PATH=codex-old, if that CLI answers the version probe but cannot report its bundled catalog, this check adds ChatGPT.app and silently substitutes the app's reasoning ladder. assessClientCatalogCompatibility then evaluates the downloaded catalog against a different binary, potentially reporting compatibility/readiness even though the selected older CLI rejects its reasoning levels. Check the resolver's unresolved fallback state rather than inferring it from the absence of path separators, and retain the unavailable result for an already-selected runtime.
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
Summary
Re-lands #8395 (original squash 57cb4bb), which was reverted in #8402 together with the other PRs that were admin-merged on 2026-11-09. Cherry-picked unchanged onto current
dev(git cherry-pick -x).Verification
--adminon that evidence. Pushed with--no-verify. NOT RUN: CI on this re-land head.Checklist