Skip to content

fix(codex): distinguish bundled tool hosts from Desktop - #372

Merged
wxtsky merged 1 commit into
wxtsky:mainfrom
burgerseater:fix/codex-native-parent
Oct 22, 2026
Merged

wxtsky merged 1 commit into
wxtsky:mainfrom
burgerseater:fix/codex-native-parent

Conversation

@burgerseater

Copy link
Copy Markdown
Contributor

Problem

A codex app-server started by ChatGPT's bundled tool host can be misclassified as the shared Desktop app-server. For example, ChatGPT.app/Contents/Resources/cua_node/bin/node_repl has the same outer bundle identifier (com.openai.codex) as ChatGPT.app/Contents/MacOS/ChatGPT. The parent bundle check added in #371 therefore accepts both processes, even though the tool-hosted app-server owns its own sessions.

That classification is shared by hook forwarding and bundled-process discovery. It can give an independently hosted session the Desktop namespace instead of its CLI identity.

Change

Require the direct parent to have the Desktop bundle identifier and an executable in the host app's own Contents/MacOS directory. Bundled resource helpers are excluded; the native Desktop app-server continues to match. This does not pin the Codex executable to either the legacy resource path or the newer nested CodexCLI.app path.

Add a regression using a bundled node_repl parent and assert both outcomes: no Desktop hook bundle, and .session for process discovery.

Validation

  • The live process-role check failed before this change on an independently hosted app-server with a bundled node_repl parent, then passed after the change.
  • Six standalone checks linked against the production CodeIslandCore passed: the actual Desktop app-server, two independently hosted app-servers, the cloud exec-server, a regular CLI under ChatGPT, and a CLI prompt containing app-server.
  • Release builds of the application and bridge succeeded using macOS 26.5 SDK, Yams 5.4.0, and Sparkle 2.9.1.
  • An isolated socket check confirmed that the rebuilt bridge assigns the Desktop bundle to real Desktop hooks even when __CFBundleIdentifier is absent.
  • git diff --check passed.

The XCTest regression is included but was not executed on this machine: its Command Line Tools installation has no XCTest framework. The standalone checks above are separate from the XCTest suite. No local cache, preferences, installers, or machine-specific diagnostic artifacts are part of this PR.

@wxtsky
wxtsky merged commit 8d0ab01 into wxtsky:main Oct 22, 2026
@wxtsky

wxtsky commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Thanks for tracking this down! Merged as 8d0ab01: the Desktop parent now also has to live in the app's own Contents/MacOS, so app-servers started by ChatGPT's bundled tool hosts keep their CLI identity. It will ship in the next release.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants