From 06d91ec10c4fbd30936fd7b73b3c6b539e64be1c Mon Sep 17 00:00:00 2001 From: Rooj Rin <72690804+rroojrooj@users.noreply.github.com> Date: Sat, 18 Jul 2026 13:53:34 +0700 Subject: [PATCH] fix(browse): pass windowsHide to Node spawn polyfill so Windows spawns don't flash console windows On Windows the browse daemon runs under Node via bun-polyfill.cjs (Bun cannot drive Playwright's Chromium there). The polyfill's spawn/spawnSync forward only stdio/env/cwd and drop windowsHide, so every child process gets a visible conhost window. The most user-visible effect: the terminal-agent watchdog respawns 'bun run terminal-agent.ts' every 60s (AGENT_WATCHDOG_TICK_MS), so users see a bun.exe console window flash roughly once a minute per daemon, indefinitely. With two daemons alive that's a flash every ~30 seconds. windowsHide is ignored on non-Windows platforms, so this is a no-op everywhere else. Co-Authored-By: Claude Fable 5 --- browse/src/bun-polyfill.cjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browse/src/bun-polyfill.cjs b/browse/src/bun-polyfill.cjs index e0ada11b3..dd8faf803 100644 --- a/browse/src/bun-polyfill.cjs +++ b/browse/src/bun-polyfill.cjs @@ -75,6 +75,9 @@ globalThis.Bun = { timeout: options.timeout, env: options.env, cwd: options.cwd, + // Suppress the console window Windows allocates per child process; + // without this every spawn flashes a visible conhost window. + windowsHide: true, }); return { @@ -91,6 +94,9 @@ globalThis.Bun = { stdio, env: options.env, cwd: options.cwd, + // Suppress the console window Windows allocates per child process; + // without this every spawn flashes a visible conhost window. + windowsHide: true, }); return {