fix: detect Claude CLI at well-known install paths (cmux.app, ~/.claude/bin)#640
Open
claw-explorer wants to merge 1 commit intosteipete:mainfrom
Open
fix: detect Claude CLI at well-known install paths (cmux.app, ~/.claude/bin)#640claw-explorer wants to merge 1 commit intosteipete:mainfrom
claw-explorer wants to merge 1 commit intosteipete:mainfrom
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 steipete#599
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.
Problem
CodexBar shows "Claude CLI is not installed" even when Claude Code is installed and fully functional (fixes #599).
This happens because macOS apps launched from Finder don't 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 the Claude CLI is installed via the macOS Terminal installer to a non-standard location like/Applications/cmux.app/Contents/Resources/bin/claude.Solution
Adds a well-known paths fallback step to
BinaryLocator.resolveBinary()that checks common Claude CLI installation locations before the minimal system-path lookup:/Applications/cmux.app/Contents/Resources/bin/claude~/.claude/bin/claude/usr/local/bin/claude/opt/homebrew/bin/claudeThe well-known paths are only checked after all dynamic resolution methods fail, so they never override a user's preferred installation or explicit
CLAUDE_CLI_PATHoverride.Changes
PathEnvironment.swift: AddedwellKnownPathsparameter toresolveBinary()andclaudeWellKnownPaths(home:)static methodPathBuilderTests.swift: Added 3 tests verifying well-known path resolution and priority orderingTesting
~/.claude/binpath resolves when all shell lookups failFixes #599