Repository navigation
Description
Summary
On macOS, an existing executable selected by CODEX_CLI_PATH exited with code 127 before starting the Codex app-server. Desktop then displayed the blocking "Organization settings could not be loaded" dialog with network, proxy, firewall, and account troubleshooting suggestions. The dialog did not expose the local process failure or the active CLI override, which made the actionable cause difficult to identify.
The immediate cause was a custom local wrapper with an outdated assumption about the bundled CLI location. This report concerns the desktop error message and diagnostics for that failure, not a request to preserve private application-bundle paths.
Environment
- OS: macOS.
- Desktop version:
26.924.22138(build11645). - Bundle identifier:
com.openai.codex. - Installed application bundle name:
ChatGPT.app. - Bundled CLI version:
0.158.0-alpha.2.1. - An executable wrapper was selected through
CODEX_CLI_PATHin the GUI launch environment.
Observed incident and verified checks
The blocking organization-settings dialog appeared after an application update. Retry returned to the same failure. The dialog offered Retry, Sign out, and Quit.
Local diagnostic requests independently reproduced the backend failure without deliberately breaking or restarting the working GUI:
| Backend selected | Result for the same initialization/configuration-read sequence |
|---|---|
| Bundled CLI invoked directly | configRequirements/read succeeded with requirements: null |
| Custom wrapper invoked as the backend | Process exited with code 127; stderr: Codex proxy could not find the bundled CLI |
The custom wrapper searched for a now-absent bundle-relative executable, Contents/Resources/codex. The installed executable was present at Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex.
Inspection of this installed build's startup code showed that the early organization-settings check maps an app-server launch/initialization failure on the path to configRequirements/read to the generic dialog. The Sign out path also depends on the same backend being available. That code path explains why Sign out cannot complete when the backend cannot start; the follow-up investigation did not trigger another live GUI sign-out attempt. Quit closes the application.
The examined early-startup path uses an in-memory logging buffer and records the startup failure before the normal application bootstrap. Quitting at this point can discard that buffered diagnostic. This code observation does not establish that every other logging channel is empty.
After updating the local wrapper's path resolution, the same initialization/configuration-read sequence succeeded through the wrapper as well. The application's organization-policy check was not bypassed.
Expected behavior
Keep the organization-policy check enforced, but distinguish a local backend launch/initialization failure from a network failure or a returned organization policy.
For this case, show an actionable message such as:
The local Codex backend exited before organization settings could be read (exit code 127). A custom CODEX_CLI_PATH override is active. Check that executable and its dependencies, then retry.
Provide a local diagnostic detail or copyable error containing the selected backend source, exit status, and a bounded stderr excerpt. Persist a sanitized startup diagnostic so quitting the dialog does not remove the useful failure detail. Explain when Sign out cannot complete because the backend is unavailable.
Automatic silent fallback from an explicit custom CLI override is not required by this report. Any recovery path must still perform the normal organization-policy check successfully.
Suggested minimal reproduction for maintainers
These are proposed controlled reproduction steps, not a second GUI reproduction performed on the reporting user's machine:
- In an isolated macOS test environment, create an executable backend stub that writes a fixed non-sensitive diagnostic to stderr and exits with status 127.
- Launch a fresh desktop process with
CODEX_CLI_PATHset to that existing executable for that process only. - Observe the startup dialog, the available local diagnostics, and whether Retry and Sign out communicate the backend failure accurately.
- Launch a clean process without the override and compare the startup result.
The stub does not need to implement the app-server protocol, because the reported failure happens before protocol initialization. Avoid setting a persistent GUI environment variable on a normal working account for this test.
Related report
#28474 describes a Windows browser-policy error masking a missing local CLI path. It is relevant as a similar error-classification problem, but its platform, feature, and trigger differ from this macOS startup case. The targeted search did not establish an exact duplicate of this report.
No conversation transcript, personal filesystem path, credentials, or raw log attachment is included.
Activity
furkancak1r commentedon Sep 28, 2026
Same symptom on 11645, but with no
CODEX_CLI_PATHoverride — the bundled CLI is never spawnedReporting a variant of this issue that the current diagnosis does not explain. Same version, same blocking dialog, but the local backend is never launched at all, so there is no exit-127 wrapper to fix.
Environment
26.924.22138(build11645), bundle idcom.openai.codex, bundle nameChatGPT.app0.158.0-alpha.2.1atContents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex1. No override is configured
launchctl getenv CODEX_CLI_PATH→ emptyCODEX_CLI_PATHabsent from~/.zshrc,~/.zprofile,~/.zshenv,~/.bash_profile,~/.bashrc,~/.profilecodex_cli_command/codex_cli_pathabsent from~/.codex/config.tomland~/.codex/.codex-global-state.jsonThe backend selection therefore falls through to the bundled path, which exists and is executable.
2. The bundled CLI works when invoked directly
Using the exact handshake the desktop app sends (
clientInfo: codex_desktop,capabilities: { experimentalApi: true }), theninitialized, then:Reproduced over plain stdio and through
app-server proxyon the control socket. The control socket also completes a normal WebSocket upgrade (101 Switching Protocols).3. Policy validation cannot be the blocker
Given
{requirements: null}, the startup validator resolves tounrestrictedand returns without throwing. So the failure occurs strictly before validation, in the app-server read itself. Supplying or changing a policy value cannot affect this case.4. The app never spawns the app-server
Across four launches, polling for 60s each: zero
codexchild processes, and 0 bytes of application-level log on stdout/stderr. Enabling Electron logging produces only Chromium-internal lines.For comparison, the immediately previous build
26.924.20706(build11431) on the same machine logs:and reports zero
Desktop startup policy read failedentries. Rolling back one build is the current workaround.This also independently confirms the in-memory-log-buffer concern raised above: on 11645 the buffered startup diagnostic is never flushed, so quitting the dialog destroys the only copy.
5. Everything else verified healthy on 11645
codesign --verify --deep --strict→ exit 0, including the nestedCodexCLI.app(notarized, ticket stapled, Team ID2DC432GLL2)/etc/codex/managed_config.tomlabsent; no forced managed preference forcom.openai.codexkeyrequirements_toml_base64configRequirements/readreturnsrequirements: null, i.e. correctlyunrestricted6. Not network-dependent
Reproduced on two unrelated networks (home connection and phone hotspot). In the same session the Rust app-server client receives
200 OKfromchatgpt.com/backend-api/..., so connectivity is not the differentiator.Requested
If the app-server never spawns, the dialog should say so instead of implying an organization or network restriction — the current wording sends people toward proxy/firewall/VPN troubleshooting, and in this case toward signing out of a workspace that was never the problem. Surfacing the resolved backend path plus the launch error (even
ENOENT/EACCES/immediate exit) would have made this diagnosable in minutes.jeffsutton-hlx commentedon Oct 15, 2026
Any updates on this issue? We also tried the instructions for clearing CODEX_CLI_PATH and it's still not working. Most users can use the app but a handful have this problem.