Claude cannot reliably launch GUI applications — repeated failures to start Python app

Resolved 💬 1 comment Opened Apr 13, 2026 by Mig-Sornrakrit Closed May 25, 2026

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)

  1. powershell Start-Process cmd.exe -ArgumentList '/c launch_trace.bat' — cmd spawned but Python never started
  2. python src/main.py 2>&1 & (background) — process started but no visible tracing window
  3. cmd.exe /c "call conda activate && python src/main.py" & — no Python process found
  4. powershell Start-Process launch_trace.bat — no Python process found
  5. cmd.exe /c start "" launch_trace.bat — failed due to space in path
  6. cmd.exe /c start "title" cmd /k launch_trace.bat — quote escaping failure
  7. cmd.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

  1. After first failure, Claude should have diagnosed the space-in-path issue instead of blindly retrying
  2. Claude should NEVER have killed the running app without the user's permission
  3. 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
  4. 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)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗