Repository navigation
[codex] Fix Codex CLI detection for mise-managed Node installs - #2822
Merged
Merged
Conversation
iambinlin
marked this pull request as ready for review
May 16, 2026 04:43
iambinlin
force-pushed
the
fix/codex-mise-detection
branch
from
May 16, 2026 04:56
c331743 to
3e84e16
Compare
Owner
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
farion1231
approved these changes
May 18, 2026
farion1231
left a comment
Owner
There was a problem hiding this comment.
Thank you for your contribution!
dfbb
pushed a commit
to dfbb/cc-switch
that referenced
this pull request
May 20, 2026
royccai
pushed a commit
to royccai/cc-switch-mod
that referenced
this pull request
May 31, 2026
delta-lo
pushed a commit
to delta-lo/cc-switch-mod
that referenced
this pull request
May 31, 2026
This was referenced Jun 15, 2026
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
Fix false-negative local Codex CLI detection in CC Switch when Codex is installed through a mise-managed Node runtime.
In this setup,
codex --versionworks in the user's terminal, but CC Switch may shownot installed or not executablein Settings -> About -> Local Environment Check.Problem
Tauri GUI apps often start with a reduced PATH compared with an interactive terminal session. When direct execution of
codex --versionfails, CC Switch falls back to scanning common CLI install locations.Before this change, the fallback scan covered locations such as:
~/.local/bin~/.npm-global/bin~/n/binHowever, it did not cover mise-managed Node installs, such as:
~/.local/share/mise/shims~/.local/share/mise/installs/node/<version>/binAs a result, Codex could be installed and usable from the terminal while still being reported as unavailable by CC Switch.
Changes
~/.local/share/mise/shims~/.local/share/mise/installs/node/*/binValidation
Ran:
cargo fmt cargo test commands::misc::testsResult:
Manual verification:
Risk
Low.
This change only extends fallback CLI search paths. It does not change:
Scope
Affects local tool version detection fallback logic on non-Windows platforms.
Expected impact: