fix(codex): harden Weixin MCP startup in desktop launches - #19
Open
logicrw wants to merge 1 commit into
Open
Conversation
Codex App plugin launches can inherit a sparse PATH and an unpredictable working directory, which made the Weixin MCP server exit before initialize when bun was only available through user shell setup. The plugin MCP config now sets a plugin-relative cwd, normalizes Bun lookup paths, freezes dependency installation to avoid lockfile churn, and keeps CODEX_PLUGIN_ROOT as an override for clients that provide it. The standalone Codex bridge script gets the same PATH handling plus cleanup for the spawned app-server process. Constraint: Codex App can start plugin MCP processes outside a login shell Rejected: Require users to launch Codex from a configured terminal | desktop app launches should work without shell-specific PATH setup Rejected: Hardcode an absolute plugin path in upstream config | installed plugin paths are user-specific Confidence: high Scope-risk: narrow Directive: Do not remove the cwd/PATH setup unless Codex guarantees plugin root cwd and Bun path inheritance Tested: bun test Tested: bun run typecheck Tested: installed plugin MCP handshake with clean PATH Not-tested: Codex desktop app plugin reload on other operating systems Co-authored-by: OmX <omx@oh-my-codex.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
initializewhen Codex App launches it outside a login shell.Changes
cwdand explicit Bun PATH setup to.codex-mcp.json.--frozen-lockfileduring startup dependency checks.connection closed: initialize responsetroubleshooting path for Codex users.Testing
bun testbun run typecheck