Skip to content

Fix Codex CLI detection for Electron tracking - #496

Merged
nwparker merged 1 commit into
mainfrom
nwparker/codex-cli-not-found
Apr 11, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/codex-cli-not-found

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Problem

Orca's new Codex CLI tracking feature could report "Codex CLI not found" for users who had Codex installed through a Node version manager like nvm. Electron often launches without the login-shell PATH that exposes those installs, so spawning codex by name worked for some users but failed for others.

Solution

Add a main-process Codex command resolver that first checks PATH, then falls back to common Node-managed install locations including the newest nvm version. Use that resolver for both Codex rate-limit fetching and managed-account login, and add tests covering PATH resolution and the nvm fallback.

Verification

  • pnpm vitest run --config config/vitest.config.ts src/main/codex-cli/command.test.ts src/main/startup/configure-process.test.ts src/main/rate-limits/service.test.ts
  • pnpm typecheck:node
  • Verified in Electron that the Codex status item renders live usage instead of the unavailable state

@nwparker
nwparker merged commit 49c7b78 into main Apr 11, 2026
1 check passed
@nwparker
nwparker deleted the nwparker/codex-cli-not-found branch April 11, 2026 22:32
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

1 participant