-
-
Notifications
You must be signed in to change notification settings - Fork 776
Description
Bug Description
Auto-Claude fails to spawn Python processes on macOS with error:
[ERROR] spawn /Users/ed/Library/Application ENOENT
This affects all macOS users because the default app data directory ~/Library/Application Support/ contains a space in the path.
Root Cause
The parsePythonCommand() function naively splits the Python path on spaces to handle commands like py -3, but this breaks file paths containing spaces:
Current buggy code (apps/frontend/src/main/index.js line ~2743):
function parsePythonCommand(pythonPath) {
const parts = pythonPath.split(" "); // BUG: Splits file paths with spaces!
const command = parts[0];
const baseArgs = parts.slice(1);
return [command, baseArgs];
}When given /Users/ed/Library/Application Support/auto-claude-ui/python-venv/bin/python, it incorrectly splits into:
- Command:
/Users/ed/Library/Application - Args:
["Support/auto-claude-ui/python-venv/bin/python"]
This causes spawn() to fail with ENOENT because /Users/ed/Library/Application is not an executable.
Proposed Fix
Check if the path is a file path before splitting on spaces:
function parsePythonCommand(pythonPath) {
// Check if this is a file path (starts with / or ~ or contains path separators)
const isPath = pythonPath.startsWith("/") || pythonPath.startsWith("~") ||
pythonPath.includes("/") || pythonPath.includes("\\\\");
if (isPath) {
// It's a file path, don't split on spaces
return [pythonPath, []];
}
// It's a command like "py -3", split on spaces
if (pythonPath.includes(" ")) {
const parts = pythonPath.split(" ");
const command = parts[0];
const baseArgs = parts.slice(1);
return [command, baseArgs];
}
// Simple command like "python3"
return [pythonPath, []];
}Impact
This bug completely breaks Auto-Claude on macOS because it prevents:
- Running any Python scripts via the app
- Creating virtual environments
- Installing dependencies
- Executing tasks
- Merge operations
- Preview operations
- Changelog generation
Locations Affected
apps/frontend/src/main/index.jsline ~2743 (parsePythonCommandfunction)- Called by:
TASK_WORKTREE_MERGEhandler (line ~8344)TASK_WORKTREE_MERGE_PREVIEWhandler (line ~8619)ChangelogGenerator.generate(line ~2836)
Steps to Reproduce
- Install Auto-Claude on macOS from DMG
- Launch the app
- Try to run any task or operation that uses Python
- Observe
spawn /Users/<user>/Library/Application ENOENTerror
Expected Behavior
Python processes should spawn successfully regardless of spaces in the path.
Environment
- OS: macOS 14.x (Apple Silicon)
- Auto-Claude: Latest release (DMG installer)
- Path:
~/Library/Application Support/auto-claude-ui/python-venv/bin/python
Severity
Critical - Affects all macOS users, makes app completely non-functional.