Skip to content

[Feature][macOS] Discover the Codex desktop app's bundled CLI (ChatGPT.app) as a runtime candidate #6973

Closed

Description

@lidge-jun

Area

Catalog / models

What are you trying to accomplish?

Let OpenCodex Desktop (and any proxy started with the macOS GUI PATH) find Codex when the only installation is the Codex desktop app, as asked in #6963 ("Desktop App doesnt pick up codex").

What prevents this today?

installedCodexCandidates in src/codex/runtime.ts lists Windows' Codex App directory (#4458) and WSL's (#5635) but on macOS only ~/.codex/packages/standalone, ~/.local/bin, /usr/local/bin and /opt/homebrew/bin. The Codex desktop app ships its CLI at /Applications/ChatGPT.app/Contents/Resources/codex (bundle id com.openai.codex, measured in devlog/_fin/260913_cross_platform_desktop_app_restart/001_platform_topology.md). The Desktop sidecar's GUI PATH never contains it.

What should OpenCodex do?

Add the app-bundled CLI as an installed candidate on macOS, with an explicit contract:

  • Handover policy: an automatically persisted CLI selection must not silently move to a newer app binary unless that is intended (resolveCodexRuntimeSteps handover rules, issue 4204).
  • Compatibility: verify debug models --bundled and debug prompt-input against the app binary, and cover unsupported-command, malformed-output and spawn failures through the catalog and prompt consumers; the prompt consumer resolves with probeVersion: false.
  • Identity: check the bundle identifier (read-only, bounded) or document the candidate as a conventional path, for /Applications and ~/Applications.

Example usage or interface

ocx doctor under Desktop: "Selected runtime: /Applications/ChatGPT.app/Contents/Resources/codex (installed)".

Alternatives or workarounds

Set CODEX_CLI_PATH or install the Codex CLI with Homebrew so it lands in /opt/homebrew/bin.

Additional context

Audit notes: devlog/_plan/261012_6963_desktop_codex_shim/020_plan_r3.md.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. added
    enhancement
    on Oct 12, 2026
  2. added
    catalog
    platform
    on Oct 12, 2026
  3. Ingwannu commented on Oct 12, 2026

    @Ingwannu
    Owner

    This is a runtime-candidate discovery request, distinct from #6980's compiled self-launch argv fix and #6971's permission to install a shim while Desktop supervises a proxy. Finding an app-bundled executable alone should not grant a new supervisor or overwrite the operator's selected CLI.

    Please define the candidate's precedence relative to an explicit executable override and the existing durable CLI discovery, then pin a version/app-copy-aware fixture for unavailable, moved, unsupported and valid bundles. Reuse the existing runtime candidate/probe path and retain diagnostics rather than adding an independent hard-coded launch path. Actual macOS bundled-CLI behavior and project-owner acceptance remain unverified; no Desktop/native CLI was launched during this triage.

  4. lidge-jun commented on Oct 12, 2026

    @lidge-jun
    OwnerAuthor

    Fixed on dev by #7011 (commit 57d9e2a051, merge bf57900f55): on macOS the CLI bundled in the Codex app is an installed candidate after every existing one, only when the bundle id is com.openai.codex. Both Contents/Resources/codex-cli/bin/codex (current, verified on 26.1007) and Contents/Resources/codex are recognized; a persisted CLI selection is never silently moved to it. Ships in 2.84.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    catalogenhancementplatform

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions