Skip to content

Visual brainstorming server dies on Windows — nohup/disown doesn't survive shell exit #767

Closed

Description

@lucasyhzhu-debug

Describe the bug
The visual brainstorming server (started via scripts/start-server.sh) dies between conversation turns on Windows. The nohup/disown approach on line 108-110 of start-server.sh does not keep the Node server alive when Claude Code's ephemeral shell exits, because Windows (Git Bash/MSYS2) lacks true Unix process groups.

To Reproduce

  1. Run Claude Code on Windows 11 (Git Bash shell)
  2. Invoke the brainstorming skill on a topic that triggers the visual companion
  3. Server starts successfully, first HTML screen renders in the browser
  4. On the next conversation turn, the server is dead — the browser shows connection refused

Expected behavior
The brainstorming server should remain alive across conversation turns, as it does on macOS/Linux.

Logs
No error logs — the process is simply gone. kill -0 $SERVER_PID fails on the next turn.

Additional context
The --foreground codepath already exists in start-server.sh (lines 100-104) and works correctly. The fix is a documentation change in visual-companion.md — the Claude Code launch instructions should tell Windows users to use --foreground combined with the Bash tool's run_in_background: true parameter, which keeps the process alive at the harness level rather than relying on shell-level backgrounding.

Suggested fix (visual-companion.md only, no code changes needed):

Split the current "Claude Code" section under "Launching the server by platform" into two:

**Claude Code (Windows):**
` ` `bash
# IMPORTANT: nohup/disown does NOT survive shell exit on Windows.
# Use --foreground and set run_in_background: true on the Bash tool call
# so the harness (not the shell) keeps the process alive across turns.
scripts/start-server.sh --project-dir /path/to/project --foreground
` ` `
When calling this via the Bash tool, set `run_in_background: true`. Then read `$SCREEN_DIR/.server-info` on the next turn to get the URL and port.

**Claude Code (macOS/Linux):**
` ` `bash
# Default mode works — the script backgrounds the server itself
scripts/start-server.sh --project-dir /path/to/project
` ` `

Also update the "Finding connection info" paragraph to mention the run_in_background pattern for Windows users.

Activity

  1. added a commit that references this issue on Mar 17, 2026
    469bb34
  2. obra commented on Mar 19, 2026

    @obra
    Owner

    @lucasyhzhu-debug thanks for the patch for this :) fixed in a release the other night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions