fix(codex): skip broken CLI installations#2871
Open
janburzinski wants to merge 2 commits into
Open
Conversation
Collaborator
Author
Contributor
Greptile SummaryThis PR makes Codex ACP startup skip broken CLI installations. The main changes are:
Confidence Score: 5/5The latest changes look safe to merge.
|
| Filename | Overview |
|---|---|
| packages/core/src/host-dependencies/runtime/host-dependency-manager.ts | Adds PATH-ordered probing that returns the first working CLI installation. |
| packages/core/src/agents/plugins/plugin-host.ts | Uses working-installation resolution for ACP spawn commands and reports when none are available. |
| packages/plugins/src/agents/impl/codex/index.ts | Marks Codex installations as available only when their version probe succeeds. |
| packages/core/src/agents/plugins/plugin-host.test.ts | Tests that ACP spawning skips a broken PATH entry. |
| packages/plugins/src/agents/impl/codex/acp.test.ts | Tests successful and failed Codex version-probe classification. |
Reviews (2): Last reviewed commit: "fix(codex): skip broken CLI installation..." | Re-trigger Greptile
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.
Description
Codex chat could fail even when a working Homebrew installation was selected because the ACP runtime independently resolved the first
codexentry onPATH. A broken workspace-local npm installation could therefore shadow the working Homebrew binary.This change makes conversation spawn resolution probe discovered CLI installations in PATH order and use the first working candidate. Codex now treats a non-zero version probe as an invalid installation, so a broken local npm package is skipped in favor of a healthy installation such as Homebrew.
Related issues
ENG-1866
Testing
pnpm --filter @emdash/core exec vitest run src/agents/plugins/plugin-host.test.tspnpm --filter @emdash/plugins exec vitest run src/agents/impl/codex/acp.test.tspnpm --filter @emdash/core run typecheckpnpm --filter @emdash/core run lintpnpm --filter @emdash/plugins run lintoxfmt --checkgit diff --check/opt/homebrew/bin/codexsucceeds, and launched the Electron development app with the updated runtime.Screenshot/Recording (if applicable)
Not applicable; this changes CLI resolution behavior without changing the UI.
Checklist