Repository navigation
fix(shim): support Codex Desktop 26.1117's App server host launch chain - #980
Conversation
…s the main app-server Desktop now starts its local app-server through an App server host utility (Desktop -> utility -> shim). The Shim classified every depth > 1 caller as a native tool helper and exec'd the official CLI, so the Host chain never started and the Launcher timed out after 30 s. An indirect invocation is the main app-server only when its argv carries the Desktop local app-server signature, CODEX_INTERNAL_ORIGINATOR_OVERRIDE is Codex Desktop, and the parent chain is a utility from the same validated bundle directly under the validated Desktop root. Browser and Computer Use app-servers (app-server --listen stdio://) stay helpers. Direct Desktop -> Shim invocations are unchanged. Helper routing and lease admission share one classification.
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. Summary
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82c1da2f3f
ℹ️ 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".
| return if depth == 1 | ||
| || (depth == 2 | ||
| && marked | ||
| && originator == Some(OsStr::new(super::DESKTOP_ORIGINATOR)) | ||
| && child.executable.starts_with(bundle)) |
There was a problem hiding this comment.
Update the documented macOS launch-chain contract
For Desktop 26.1117's Desktop -> App server host -> Shim invocation, this branch now intentionally classifies a depth-2 caller as Main, but docs/platforms/macos/macos-native-tools.md lines 89–90 still state that only a direct Desktop child retains Host routing and every deeper descendant uses the stock CLI. That leaves the feature's compatibility guidance and future regression criteria describing the opposite behavior; document this validated indirect-main exception alongside the implementation.
AGENTS.md reference: AGENTS.md:L102-L103
Useful? React with 👍 / 👎.
Codex Desktop 26.1117.31558 starts its local app-server as Desktop ->
App server hostutility -> shim. The Shim treated every depth > 1 caller as a native tool helper and exec'd the official CLI, so Host Node never started and the Launcher timed out (Codex Desktop did not start the codexhost Host chain before timeout).An indirect call is now the main app-server only when all of these hold: its argv has the Desktop local app-server signature,
CODEX_INTERNAL_ORIGINATOR_OVERRIDEisCodex Desktop, and the parent chain is a utility from the same validated bundle directly under the validated Desktop root. Computer Use app-servers (app-server --listen stdio://) stay helpers; direct Desktop -> Shim is unchanged. Helper routing and lease admission use one classification. The Launcher's Shim -> Node check is not relaxed.Validation:
cargo test --locked -p codexhost-shim --features codexhost-shim/test-utils(88 passed, 5 ignored; the new indirect-main test failed before the change). An isolated debug launch on Desktop 26.1117.31558 reachedHost chain readyin 4.0 s (Desktop -> utility -> shim -> Node). Not exercised: the browser helper.Risk: the argv signature is a Desktop implementation detail; if a later Desktop changes it, indirect calls fall back to helper and need re-sampling.