Skip to content

[macOS][Compatibility] OpenCodex bridge breaks native Computer Use/Appshot and cannot currently coexist with third-party routing #32

Description

@deSkyl1ne

Summary

On macOS Apple Silicon, simply launching OpenCodex for the first time can immediately break ChatGPT Desktop's native Computer Use and Cmd+Cmd Appshot, even when the user has not enabled a provider, added a model, or intentionally turned on the gateway.

There is a second, more fundamental compatibility concern: if a future fix only delays bridge registration until a third-party model is enabled, native Computer Use/Appshot may still be unavailable while that third-party model is active if OpenCodex continues to replace the entire Codex runtime through a global CODEX_CLI_PATH. True coexistence requires runtime isolation, not only delayed registration.

Environment

  • macOS 26.6.0 (Apple Silicon)
  • OpenCodex 1.2.0
  • ChatGPT Desktop 26.803.41515
  • Codex 0.147.0-alpha.6.5
  • Bundled Computer Use plugin 1.0.1000633

Reproduction A: startup takeover

  1. Start with native ChatGPT Desktop Computer Use and Cmd+Cmd Appshot working.
  2. Launch OpenCodex for the first time.
  3. Do not add a provider, enable a model, or intentionally enable the gateway.
  4. Leave OpenCodex open and try Cmd+Cmd or native Computer Use.

Actual behavior

Computer Use/Appshot fails immediately after OpenCodex starts:

  1. OpenCodex registers a CODEX_CLI_PATH override pointing to:
    /Applications/OpenCodex.app/Contents/Resources/dist/codex-provider-bridge
  2. A stale global [mcp_servers.computer-use] entry can remain, using a relative path under Codex Computer Use.app and marked disabled.
  3. The ChatGPT log selects the OpenCodex bridge with codexCliPathSource=env-override.
  4. Cmd+Cmd still registers successfully, but capture fails with:
    Codex Computer Use Apple Event error -1743: Unknown error
  5. The macOS Privacy & Security → Automation list does not contain ChatGPT/Codex.

Clicking “Restore native” does not reliably undo the startup takeover for the currently running ChatGPT process; manual cleanup and a ChatGPT restart are still required.

The installed startup code appears to call registerProviderBridgeEnvironment(...) during gateway initialization, before the user has explicitly enabled a provider/model. The environment is only detached later during the gateway stop path.

Reproduction B: third-party model coexistence

If bridge registration is merely moved from startup to “third-party model enabled”, the global CODEX_CLI_PATH still points the ChatGPT/Codex process at the OpenCodex provider bridge.

This can leave the native Computer Use/Appshot path unavailable while third-party routing is active. Therefore, “register only when needed” fixes the startup regression but does not by itself prove that third-party models and native Computer Use can work simultaneously.

Recovery

The native integration recovered after:

  1. Fully quitting OpenCodex.
  2. Running codex mcp remove computer-use.
  3. Removing the stale CODEX_CLI_PATH bridge line from ~/.codex/config.toml.
  4. Running tccutil reset AppleEvents com.openai.codex.
  5. Restarting ChatGPT Desktop.

After recovery:

  • codex mcp list showed the bundled launcher:
    ~/.codex/plugins/cache/openai-bundled/computer-use/1.0.1000633/bin/computer-use-client-launcher
    with status enabled.
  • ChatGPT selected the official bundled Codex path rather than the OpenCodex bridge.
  • Cmd+Cmd Appshot succeeded and returned both screenshot and accessibility text.

Expected behavior

Startup

Launching OpenCodex without enabling a provider/model must not change the native ChatGPT/Codex Computer Use or Appshot runtime.

Third-party model mode

When a third-party model is enabled, one of these must be true:

  1. Preferred: third-party requests are routed through an isolated OpenCodex bridge while the official ChatGPT/Codex runtime and native Computer Use/Appshot remain available; or
  2. If process-level switching is unavoidable, the UI must clearly document the limitation and provide a reliable one-click switch that stops the bridge, clears all global environment/config state, restarts ChatGPT, and verifies native Computer Use/Appshot before reporting success.

Restore native

Clicking “Restore native” must completely restore the official runtime without manual cleanup. It should:

  • clear any OpenCodex CODEX_CLI_PATH process/launch environment;
  • remove or stop shadowing stale global Computer Use MCP entries;
  • restart the currently running ChatGPT/Codex process if it inherited the bridge;
  • avoid breaking native Computer Use Apple Events integration;
  • verify Appshot and Computer Use after restoration;
  • correctly handle the unified ChatGPT Desktop app with ChatGPT Work and Codex modes.

Suggested fix

Add a strict opt-in, runtime-isolation, and restore-native health-check path that:

  • does not register the provider bridge on app startup alone;
  • does not use a global launchctl CODEX_CLI_PATH override for all Codex work when native Computer Use must remain available;
  • routes third-party requests through an isolated child/process/request-level bridge;
  • unregisters all OpenCodex launch environment variables during restore/quit;
  • removes or disables only OpenCodex-owned MCP/config entries;
  • restarts the official ChatGPT Desktop process with a clean environment;
  • tests both native Computer Use/Appshot and third-party model routing in regression tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions