Skip to content

fix: fall back to PATH when codex binary missing#1025

Open
chindris-mihai-alexandru wants to merge 1 commit intopingdotgg:mainfrom
chindris-mihai-alexandru:fix/codex-binary-fallback
Open

fix: fall back to PATH when codex binary missing#1025
chindris-mihai-alexandru wants to merge 1 commit intopingdotgg:mainfrom
chindris-mihai-alexandru:fix/codex-binary-fallback

Conversation

@chindris-mihai-alexandru
Copy link

@chindris-mihai-alexandru chindris-mihai-alexandru commented Mar 13, 2026

Summary

  • fall back to PATH lookup when a configured Codex binary path is missing
  • keep existing behavior when the configured path works

Motivation

Some installs (Homebrew/npm) surface stale or invalid binary paths. Today that hard-fails sessions even when codex is available on PATH. This change attempts the configured path first, then falls back to PATH for missing binaries.

Testing

  • not run (local change)

Note

Fall back to PATH codex binary when configured binary path is not executable

  • Adds resolveCodexBinaryPath in codexAppServerManager.ts to validate the configured binary via assertSupportedCodexCliVersion before use.
  • If the configured path fails with "is not installed or not executable" and differs from the default "codex", the function retries with "codex" from PATH and logs a console warning.
  • startSession now delegates binary resolution to this helper instead of asserting and selecting the path inline.
  • Behavioral Change: sessions that previously failed when a non-default binary path was misconfigured will now silently fall back to codex on PATH if available.

Macroscope summarized 102c216.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 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: c9bd1a52-0aff-4855-b9a2-dc9e5896090e

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
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting to disable sequence diagrams in the walkthrough.

@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 13, 2026
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.

1 participant