Skip to content

Detect command not found when checking codex/claude CLI on Windows#1492

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Alexx999:pr-windows-command-not-found
Mar 28, 2026
Merged

Detect command not found when checking codex/claude CLI on Windows#1492
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Alexx999:pr-windows-command-not-found

Conversation

@Alexx999
Copy link
Copy Markdown
Contributor

@Alexx999 Alexx999 commented Mar 28, 2026

What Changed

Use isWindowsCommandNotFound to check if codex/claude CLI is missing.
Extracted spawnAndCollect method to avoid copypasting the check.

Why

On Windows, missing Codex CLI gives misleading message:
"Codex CLI is installed but failed to run. 'codex' is not recognized as an internal or external command, operable program or batch file."

Checklist

  • This PR is small and focused
  • I explained what changed and why

Note

Low Risk
Low risk: refactors provider health-check command execution and improves Windows-only error detection for missing CLIs, which mainly affects status reporting and messaging.

Overview
Improves Windows handling for provider health checks by treating cmd.exe "command not recognized" failures as a missing CLI, so Codex/Claude report not installed/on PATH instead of a generic execution failure.

Extracts a shared spawnAndCollect helper in providerSnapshot.ts (used by CodexProvider and ClaudeProvider) and exports isWindowsCommandNotFound from processRunner.ts to centralize this detection.

Written by Cursor Bugbot for commit 0a2f12c. This will update automatically on new commits. Configure here.

Note

Detect command-not-found errors for Codex and Claude CLI on Windows

  • Adds a spawnAndCollect helper in providerSnapshot.ts that centralizes process spawning, stream collection, and Windows command-not-found detection.
  • Both ClaudeProvider and CodexProvider now delegate to spawnAndCollect instead of handling spawn logic inline.
  • Behavioral Change: when the CLI binary is missing on Windows, the effect now fails with an ENOENT-style error instead of returning a successful CommandResult with exit code 9009.

Macroscope summarized 0a2f12c.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e8abc7be-d5d2-4e8a-9b25-880e15bb611f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 28, 2026
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@juliusmarminge juliusmarminge enabled auto-merge (squash) March 28, 2026 17:27
@juliusmarminge juliusmarminge merged commit 42ea7cf into pingdotgg:main Mar 28, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants