-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Description
The brainstorming visual companion server (start-server.sh + server.js) exits almost immediately on Windows with Git Bash. The server starts successfully and outputs server-started JSON, but by the time you try to connect in the browser, it's already shut down with "reason":"owner process exited".
Root Cause
start-server.sh line 94 resolves the owner PID via:
OWNER_PID="$(ps -o ppid= -p "$PPID" 2>/dev/null | tr -d ' ')"On Linux/macOS, this correctly resolves to the Claude Code harness process, which stays alive for the session. On Windows/Git Bash, the grandparent process is another ephemeral process (mintty or cmd.exe wrapper) that exits shortly after the script returns. The server's lifecycle check in server.js (lines ~311-320) then finds the owner dead and shuts down.
Steps to Reproduce
- Windows 11, Claude Code CLI, Git Bash
- Run
start-server.sh --project-dir /path/to/project - Script returns success with
server-startedJSON - Try to open the URL in browser -> ERR_CONNECTION_REFUSED
- Check
.server.log-> shows{"type":"server-stopped","reason":"owner process exited"}
Environment
- Windows 11
- Superpowers v5.0.2
- Git Bash (MINGW64)
- Node.js 20+
Workaround
Blanking out OWNER_PID before passing to the server works. The server's ownerAlive() function returns true if OWNER_PID is null, and the 30-minute idle timeout still prevents orphaned servers.
Suggested Fix
Either:
- Skip owner PID monitoring on Windows (detect via
OSTYPEoruname) - Use a different mechanism on Windows (e.g., a heartbeat file the harness touches periodically)
- Fall back gracefully when
ps -o ppid=returns an unreliable PID