Checklist
Area
Frontend
Operating System
macOS
Version
2.7.3 official release
What happened?
When using Auto-Claude v2.7.3 on macOS (Apple Silicon), the "Planning" phase fails with repeated errors:
Agent error: Claude Code not found. Install with: npm install -g @anthropic-ai/claude-code
If already installed locally, try: export PATH="$HOME/node_modules/.bin:$PATH"
Or provide the path via ClaudeAgentOptions: ClaudeAgentOptions(cli_path='/path/to/claude')
However, Claude Code IS installed and accessible from the terminal:
$ which claude
/opt/homebrew/bin/claude
$ claude --version
2.1.5 (Claude Code)
Root Cause Analysis
The issue is a PATH environment variable inheritance problem between the Electron frontend and Python backend:
-
Claude CLI is installed via Homebrew at /opt/homebrew/bin/claude
-
The Electron frontend has awareness of this issue and includes /opt/homebrew/bin in COMMON_BIN_PATHS (see apps/frontend/src/main/env-utils.ts):
export const COMMON_BIN_PATHS: Record<string, string[]> = {
darwin: [
'/opt/homebrew/bin', // Apple Silicon Homebrew
// ...
],
};
-
The Python backend uses the Claude Agent SDK (claude_agent_sdk package) which spawns the Claude CLI as a subprocess. The create_client() function in apps/backend/core/client.py does NOT pass a cli_path parameter to ClaudeAgentOptions:
options_kwargs = {
"model": model,
"system_prompt": base_prompt,
# ... other options
# NOTE: No cli_path parameter!
}
return ClaudeSDKClient(options=ClaudeAgentOptions(**options_kwargs))
-
When the Electron app spawns the Python subprocess, the subprocess does NOT inherit the user's shell environment (this is standard macOS behavior for GUI apps launched from Finder/Dock).
-
The Claude Agent SDK tries to find claude in PATH, but /opt/homebrew/bin is not in the subprocess's PATH.
Why the Frontend Works But Backend Doesn't
The frontend TypeScript code properly augments PATH before spawning processes:
// apps/frontend/src/main/env-utils.ts
/**
* Common issue: `gh` CLI installed via Homebrew is in /opt/homebrew/bin
* which isn't in PATH when the Electron app launches from Finder/Dock.
*/
But this PATH augmentation is NOT passed through to the Python backend subprocess, and the Python backend doesn't do its own PATH augmentation.
Steps to reproduce
- Install Claude Code via Homebrew:
brew install claude-code (or equivalent)
- Verify installation:
which claude shows /opt/homebrew/bin/claude
- Open Auto-Claude desktop app (launch from Dock or Finder, NOT from terminal)
- Open a project
- Create a new task in the Kanban board
- Click "Start Executing" button
- During the "Planning" phase, observe the error:
Agent error: Claude Code not found. Install with: npm install -g @anthropic-ai/claude-code
Note: If you launch Auto-Claude from the terminal (e.g., npm run start), it may work because terminal sessions inherit the shell's PATH which includes /opt/homebrew/bin.
Expected behavior
Auto-Claude should:
- Detect Claude CLI installed via Homebrew at
/opt/homebrew/bin/claude
- Pass the detected path to the Python backend (either via environment variable or command-line argument)
- Pass
cli_path in ClaudeAgentOptions when creating the SDK client
- OR the Python backend should perform its own PATH augmentation to include common binary locations
Environment
- macOS: Apple Silicon (M-series)
- Auto-Claude version: 2.7.3
- Claude Code version: 2.1.5
- Claude CLI location:
/opt/homebrew/bin/claude
- Installation method: Homebrew
Suggested Fix
In apps/backend/core/client.py, the create_client() function should accept and pass through a cli_path parameter:
def create_client(
project_dir: Path,
spec_dir: Path,
model: str,
agent_type: str = "coder",
max_thinking_tokens: int | None = None,
output_format: dict | None = None,
agents: dict | None = None,
cli_path: str | None = None, # NEW PARAMETER
) -> ClaudeSDKClient:
# ...
options_kwargs = {
"model": model,
# ... existing options
}
# Pass cli_path if provided
if cli_path:
options_kwargs["cli_path"] = cli_path
return ClaudeSDKClient(options=ClaudeAgentOptions(**options_kwargs))
And the Electron frontend should:
- Detect the Claude CLI path using its existing
getToolPath('claude') function
- Pass this path to the Python backend via environment variable (e.g.,
CLAUDE_CLI_PATH)
- The Python backend should read this environment variable and pass it to
create_client()
Alternative: The Python backend could do its own PATH augmentation before calling the Claude Agent SDK, similar to what the frontend does.
Workaround
Until fixed, users can try:
-
Launch Auto-Claude from terminal instead of Dock/Finder:
cd /path/to/auto-claude
npm run start
-
Configure Claude CLI path in settings (if available):
- Go to Settings > Paths
- Set "Claude CLI Path" to
/opt/homebrew/bin/claude
-
Create a symlink in a location that IS in PATH:
sudo ln -s /opt/homebrew/bin/claude /usr/local/bin/claude
Logs / Screenshots
Checklist
Area
Frontend
Operating System
macOS
Version
2.7.3 official release
What happened?
When using Auto-Claude v2.7.3 on macOS (Apple Silicon), the "Planning" phase fails with repeated errors:
However, Claude Code IS installed and accessible from the terminal:
Root Cause Analysis
The issue is a PATH environment variable inheritance problem between the Electron frontend and Python backend:
Claude CLI is installed via Homebrew at
/opt/homebrew/bin/claudeThe Electron frontend has awareness of this issue and includes
/opt/homebrew/bininCOMMON_BIN_PATHS(seeapps/frontend/src/main/env-utils.ts):The Python backend uses the Claude Agent SDK (
claude_agent_sdkpackage) which spawns the Claude CLI as a subprocess. Thecreate_client()function inapps/backend/core/client.pydoes NOT pass acli_pathparameter toClaudeAgentOptions:When the Electron app spawns the Python subprocess, the subprocess does NOT inherit the user's shell environment (this is standard macOS behavior for GUI apps launched from Finder/Dock).
The Claude Agent SDK tries to find
claudein PATH, but/opt/homebrew/binis not in the subprocess's PATH.Why the Frontend Works But Backend Doesn't
The frontend TypeScript code properly augments PATH before spawning processes:
But this PATH augmentation is NOT passed through to the Python backend subprocess, and the Python backend doesn't do its own PATH augmentation.
Steps to reproduce
brew install claude-code(or equivalent)which claudeshows/opt/homebrew/bin/claudeNote: If you launch Auto-Claude from the terminal (e.g.,
npm run start), it may work because terminal sessions inherit the shell's PATH which includes/opt/homebrew/bin.Expected behavior
Auto-Claude should:
/opt/homebrew/bin/claudecli_pathinClaudeAgentOptionswhen creating the SDK clientEnvironment
/opt/homebrew/bin/claudeSuggested Fix
In
apps/backend/core/client.py, thecreate_client()function should accept and pass through acli_pathparameter:And the Electron frontend should:
getToolPath('claude')functionCLAUDE_CLI_PATH)create_client()Alternative: The Python backend could do its own PATH augmentation before calling the Claude Agent SDK, similar to what the frontend does.
Workaround
Until fixed, users can try:
Launch Auto-Claude from terminal instead of Dock/Finder:
cd /path/to/auto-claude npm run startConfigure Claude CLI path in settings (if available):
/opt/homebrew/bin/claudeCreate a symlink in a location that IS in PATH:
Logs / Screenshots