Fix Claude CLI well-known path fallback precedence#675
Merged
ratulsarna merged 4 commits intomainfrom Apr 9, 2026
Merged
Conversation
…de/bin) When CodexBar is launched from Finder (not a terminal), it may not inherit the user's shell PATH. The existing resolution chain tries login shell capture, environment PATH, interactive shell lookup, and alias resolution—but all of these can fail when: 1. The Claude CLI is installed via the macOS Terminal installer to /Applications/cmux.app/Contents/Resources/bin/claude 2. The PATH entry was added to the shell profile but the login shell capture times out or doesn't pick it up This adds a well-known-paths step to BinaryLocator.resolveBinary() that checks common Claude CLI installation locations as a fallback before the minimal system-path lookup: - /Applications/cmux.app/Contents/Resources/bin/claude (Terminal installer) - ~/.claude/bin/claude (manual/script install) - /usr/local/bin/claude (Homebrew Intel) - /opt/homebrew/bin/claude (Homebrew Apple Silicon) The well-known paths are only checked after all dynamic resolution methods fail, so they never override a user's preferred installation. Includes tests verifying: - cmux.app path is found when shell lookups fail - ~/.claude/bin path is found when shell lookups fail - Shell PATH is still preferred over well-known paths Fixes #599
# Conflicts: # CHANGELOG.md
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.
Preserves the Claude CLI well-known path fallback from #640 while keeping normal precedence when multiple installs exist.
~/.claude/bin/claudeand native Homebrew installs before the bundledcmux.appbinary in fallback modeSupersedes #640.
Thanks @claw-explorer for the original PR and investigation.