Skip to content

Headed Chrome auto-terminates after ~15s due to parent process watchdog #1006

@hao-hipages

Description

@hao-hipages

Bug

/connect-chrome ($B connect) launches headed Chromium successfully, but the browser window auto-terminates after ~15 seconds when idle. The server falls back to headless mode with a new PID.

Repro

  1. Run /connect-chrome
  2. $B connect outputs Mode: headed with a PID
  3. Wait ~15 seconds without running any browse commands
  4. Run $B status — shows Mode: launched (headless) with a different PID

Tested 3 times, same result every time.

Cause

The parent process watchdog (added in v0.15.15.1) monitors the parent PID and self-terminates when the CLI exits. Since each $B invocation is a separate CLI process that exits after the command completes, the server detects the parent as dead and kills the headed browser.

This makes /connect-chrome unusable in practice — the browser dies before the user can interact with it or before the next command runs.

Expected

Headed Chrome should stay alive until explicitly disconnected via $B disconnect, regardless of CLI process lifecycle.

Environment

  • gstack v0.17.0.0
  • macOS Darwin 25.3.0 (arm64)
  • Claude Code CLI

Related

v0.15.15.1 changelog: "Parent process watchdog for the browse server. When Claude Code exits, orphaned browser processes now self-terminate within 15 seconds."

The fix for orphan cleanup is breaking the headed mode use case where the server is supposed to persist between CLI invocations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions