You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Brainstorming visual companion server exits immediately on Windows (owner PID detection fails) #770
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:
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-started JSON
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 OSTYPE or uname)
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
Activity
fix: Windows brainstorm server lifecycle, restore execution choice
fix: Windows brainstorm server lifecycle, restore execution choice
obra commentedon Mar 19, 2026
This should now be fixed. please reopen if not.
fix: Windows brainstorm server lifecycle, restore execution choice
fix: Windows brainstorm server lifecycle, restore execution choice
Squashed commit of the following:
Squashed commit of the following:
fix: Windows brainstorm server lifecycle, restore execution choice