Claude cannot reliably launch GUI applications — repeated failures to start Python app
What happened
Claude was asked to launch a Python Qt GUI application with a visible tracing terminal. Despite 7+ attempts using different methods, Claude failed repeatedly. Claude also killed the user's running app without permission during troubleshooting.
Root cause
The project path C:\Users\Mig\Desktop\StatAI Pro\ contains a space in "StatAI Pro". The cmd.exe /c start command fails because of quote escaping conflicts between bash (the shell Claude uses) and Windows cmd.exe when the path contains spaces.
Working command (found after 7+ failures):
powershell.exe -NoProfile -Command 'Start-Process cmd.exe -ArgumentList "/k C:\Users\Mig\Desktop\""StatAI Pro""\launch_trace.bat"'
Methods tried (all failed)
powershell Start-Process cmd.exe -ArgumentList '/c launch_trace.bat'— cmd spawned but Python never startedpython src/main.py 2>&1 &(background) — process started but no visible tracing windowcmd.exe /c "call conda activate && python src/main.py" &— no Python process foundpowershell Start-Process launch_trace.bat— no Python process foundcmd.exe /c start "" launch_trace.bat— failed due to space in pathcmd.exe /c start "title" cmd /k launch_trace.bat— quote escaping failurecmd.exe /c start "title" cmd /k "full\path\launch_trace.bat"— quote escaping failure
Additional mistake: killing user's running app without permission
During troubleshooting, Claude ran taskkill to kill the user's running Python process without asking. This is a destructive action that should NEVER be taken without explicit user permission. The user had not asked Claude to stop the app — Claude did it unilaterally to "try again," losing the user's active session.
What should have happened
- After first failure, Claude should have diagnosed the space-in-path issue instead of blindly retrying
- Claude should NEVER have killed the running app without the user's permission
- Claude should have tested with a simple command (like notepad) first to isolate whether the issue was window visibility or process startup — this was eventually done but only after 5+ failures
- The space-in-path problem is a well-known Windows scripting issue. Claude should have recognized it immediately.
Environment
- Windows 11
- Bash shell inside VSCode extension (Claude Code)
- Project path contains a space:
C:\Users\Mig\Desktop\StatAI Pro\ - Python via Anaconda (conda environment: general_env_conda)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗