From bba47a1c0661197ff1b480ad3dd99f66cb37222b Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:17:59 +0000 Subject: [PATCH 1/2] Initial plan From 0f315740e789d3033533fddcf2be5f2d60829d85 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:20:36 +0000 Subject: [PATCH 2/2] Fix macOS PATH issue by using login shell On macOS, GUI apps don't inherit the user's full PATH from their shell profile. This caused commands like 'npx', 'node', or 'claude' to not be found, resulting in "/bin/sh: claude: command not found" errors. The fix uses the user's login shell (from $SHELL env var) with the -l flag to load their profile and get the full PATH environment. This ensures all commands installed via npm, homebrew, etc. are accessible. Co-authored-by: formulahendry <1050213+formulahendry@users.noreply.github.com> --- src-tauri/src/agent.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/agent.rs b/src-tauri/src/agent.rs index ffb6624..2dc0bb7 100644 --- a/src-tauri/src/agent.rs +++ b/src-tauri/src/agent.rs @@ -78,6 +78,7 @@ impl AgentManager { #[cfg(not(target_os = "windows"))] let mut child = { use std::borrow::Cow; + use std::env; // Build shell command with proper quoting for command and arguments let escaped_command = shell_escape::escape(Cow::Borrowed(config.command.as_str())); @@ -92,7 +93,12 @@ impl AgentManager { format!("{} {}", escaped_command, quoted_args.join(" ")) }; - Command::new("/bin/sh") + // Use login shell to get full PATH environment (especially important on macOS) + // This ensures commands like npx, node, claude etc. are found + let shell = env::var("SHELL").unwrap_or_else(|_| "/bin/sh".to_string()); + + Command::new(shell) + .arg("-l") // login shell to load user's profile and PATH .arg("-c") .arg(&shell_command) .envs(&config.env)