From aca6173886085c2ce79a97cd45d0cd2a77e241a4 Mon Sep 17 00:00:00 2001 From: abose Date: Tue, 12 May 2026 22:50:30 +0530 Subject: [PATCH 1/3] fix(ai): add Homebrew + Linuxbrew fallbacks for Claude CLI detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple Silicon Macs running `brew install --cask claude-code` land the binary at /opt/homebrew/bin/claude, which we weren't checking. On macOS, when Phoenix is launched from Finder/Dock the inherited PATH is the minimal /usr/bin:/bin:/usr/sbin:/sbin so `which claude` misses anything in shell-managed dirs — making the fallback list the only detection path that works. Also reorder so the docs-recommended installs (~/.local/bin from install.sh, /usr/local/bin) come first and alternative installs (Homebrew, Linuxbrew) come last. --- src-node/claude-code-agent.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src-node/claude-code-agent.js b/src-node/claude-code-agent.js index 6717b3c349..28678b01ee 100644 --- a/src-node/claude-code-agent.js +++ b/src-node/claude-code-agent.js @@ -221,13 +221,21 @@ function _findGlobalClaudeCliWin() { * Find the user's globally installed Claude CLI on macOS/Linux. */ function _findGlobalClaudeCliLinuxMac() { + const home = process.env.HOME || ""; + // The fallback list matters most when Phoenix is launched from + // Finder/Dock on macOS — that PATH is the minimal + // `/usr/bin:/bin:/usr/sbin:/sbin`, so `which claude` won't see + // anything in the user's shell-managed dirs. Order is by likelihood: + // primary docs-recommended installs first, alternatives last. const locations = [ - "/usr/local/bin/claude", - "/usr/bin/claude", - (process.env.HOME || "") + "/.local/bin/claude", - (process.env.HOME || "") + "/.nvm/versions/node/" + + home + "/.local/bin/claude", // claude.ai/install.sh (default) + "/usr/local/bin/claude", // System-wide install / Intel Mac Homebrew + "/usr/bin/claude", // Distro package + home + "/.nvm/versions/node/" + (process.version.startsWith("v") ? process.version : "v" + process.version) + - "/bin/claude" + "/bin/claude", // npm global via nvm + "/opt/homebrew/bin/claude", // Homebrew on Apple Silicon + "/home/linuxbrew/.linuxbrew/bin/claude" // Linuxbrew ]; // Try 'which -a' first to find all claude binaries, filtering out node_modules From abf8fc369d434ef22dfa7854acb2c687971d9005 Mon Sep 17 00:00:00 2001 From: abose Date: Tue, 12 May 2026 23:01:42 +0530 Subject: [PATCH 2/3] chore: update pro deps --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index 581b568dc5..25e55cc2fa 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "da29089c7397058410514ab3c8d29748bc16558b" + "commitID": "11fec38adda6438d047e58ae6b32bced6fb6d48b" } } From 73943ecbd32435b02d36c73a3af734aaf445862e Mon Sep 17 00:00:00 2001 From: abose Date: Tue, 12 May 2026 23:32:06 +0530 Subject: [PATCH 3/3] chore: update node package lock files --- package-lock.json | 4 ++-- src-node/package-lock.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 48f4ee8dfd..731cd32892 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "phoenix", - "version": "5.1.7-0", + "version": "5.1.9-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "phoenix", - "version": "5.1.7-0", + "version": "5.1.9-0", "hasInstallScript": true, "dependencies": { "@bugsnag/js": "^7.18.0", diff --git a/src-node/package-lock.json b/src-node/package-lock.json index fb219ba887..287070c6e5 100644 --- a/src-node/package-lock.json +++ b/src-node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@phcode/node-core", - "version": "5.1.8-0", + "version": "5.1.9-0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@phcode/node-core", - "version": "5.1.8-0", + "version": "5.1.9-0", "hasInstallScript": true, "license": "GNU-AGPL3.0", "dependencies": {