-
Notifications
You must be signed in to change notification settings - Fork 9.1k
[Windows] /browse server becomes orphan process after session ends — chrome-headless-shell.exe console windows keep popping up #807
Copy link
Copy link
Open
Description
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
/browseskill in a Claude Code session - Close or end the Claude Code session
- Observe:
node.exerunningserver-node.mjsremains in Task Manager - Observe:
chrome-headless-shell.exewindows 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
SessionEndhook in Claude Code to explicitly kill the browse server PID - On Windows, ensure
chrome-headless-shell.exeis spawned withCREATE_NO_WINDOWto 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels