Environment
- OS: Windows 11 Pro
- Shell: bash (via Claude Code)
- gstack version: local install
Problem
When a Claude Code session that used /browse ends, the gstack/browse/dist/server-node.mjs node process is not cleaned up. It stays alive as an orphan process and continues spawning new chrome-headless-shell.exe child processes.
On Windows, each new chrome-headless-shell.exe spawn causes a console window to briefly flash/appear on screen, which is very disruptive during normal use.
Steps to Reproduce
- Use
/browse skill in a Claude Code session
- Close or end the Claude Code session
- Observe:
node.exe running server-node.mjs remains in Task Manager
- Observe:
chrome-headless-shell.exe windows keep popping up repeatedly
Process Tree (after session ended)
node.exe (server-node.mjs) ← orphan, parent PID no longer exists
└── chrome-headless-shell.exe
├── chrome-headless-shell.exe (gpu-process)
├── chrome-headless-shell.exe (utility/network)
└── chrome-headless-shell.exe (renderer)
Expected Behavior
The browse server process should terminate when the parent Claude Code session ends (e.g., via a cleanup hook or by detecting parent process exit).
Suggested Fix
- Add a parent-process watchdog in
server-node.mjs: poll for parent PID and self-exit if parent is gone
- Or register a
SessionEnd hook in Claude Code to explicitly kill the browse server PID
- On Windows, ensure
chrome-headless-shell.exe is spawned with CREATE_NO_WINDOW to suppress console flicker even as a temporary measure
Workaround
Manually kill the orphan node process and its children:
taskkill /F /PID <server-node PID> /T
Environment
Problem
When a Claude Code session that used
/browseends, thegstack/browse/dist/server-node.mjsnode process is not cleaned up. It stays alive as an orphan process and continues spawning newchrome-headless-shell.exechild processes.On Windows, each new
chrome-headless-shell.exespawn causes a console window to briefly flash/appear on screen, which is very disruptive during normal use.Steps to Reproduce
/browseskill in a Claude Code sessionnode.exerunningserver-node.mjsremains in Task Managerchrome-headless-shell.exewindows keep popping up repeatedlyProcess Tree (after session ended)
Expected Behavior
The browse server process should terminate when the parent Claude Code session ends (e.g., via a cleanup hook or by detecting parent process exit).
Suggested Fix
server-node.mjs: poll for parent PID and self-exit if parent is goneSessionEndhook in Claude Code to explicitly kill the browse server PIDchrome-headless-shell.exeis spawned withCREATE_NO_WINDOWto suppress console flicker even as a temporary measureWorkaround
Manually kill the orphan node process and its children: