On Windows, when CodeGraph is running as an MCP server (launched by Claude Code), a console (cmd) window briefly flashes occasionally. This is a cosmetic issue but distracting.
Root cause
Three spawn/spawnSync calls are missing windowsHide: true:
1. npm-shim.js:48 — The main spawn that launches the bundled node.exe. Runs every time the MCP server starts or reconnects after the daemon idles out.
var res = childProcess.spawnSync(resolved.command, resolved.args, { stdio: "inherit" });
2. npm-shim.js:224 — The self-heal extraction via tar (missing platform bundle):
var res = childProcess.spawnSync("tar", args, { stdio: "ignore" });
3. src/extraction/wasm-runtime-flags.ts — The relaunchWithWasmRuntimeFlagsIfNeeded re-execs node:
const result = spawnSync(process.execPath, argv, { stdio: "inherit" });
Note: mcp/index.ts's spawnDetachedDaemon already correctly sets windowsHide: true — handled during the #411 daemon refactor but the other spawnSync sites were missed.
Environment:
- Windows 11
- @colbymchenry/codegraph v0.9.6
- Launched as MCP stdio server via Claude Code
Expected: No console window appears during background process spawning.
Actual: A black console window (conhost.exe) flashes briefly.
Fix: Add windowsHide: true to the spawnSync options object at all three locations above.
On Windows, when CodeGraph is running as an MCP server (launched by Claude Code), a console (cmd) window briefly flashes occasionally. This is a cosmetic issue but distracting.
Root cause
Three
spawn/spawnSynccalls are missingwindowsHide: true:1.
npm-shim.js:48— The main spawn that launches the bundlednode.exe. Runs every time the MCP server starts or reconnects after the daemon idles out.2.
npm-shim.js:224— The self-heal extraction viatar(missing platform bundle):3.
src/extraction/wasm-runtime-flags.ts— TherelaunchWithWasmRuntimeFlagsIfNeededre-execs node:Note:
mcp/index.ts'sspawnDetachedDaemonalready correctly setswindowsHide: true— handled during the #411 daemon refactor but the otherspawnSyncsites were missed.Environment:
Expected: No console window appears during background process spawning.
Actual: A black console window (conhost.exe) flashes briefly.
Fix: Add
windowsHide: trueto thespawnSyncoptions object at all three locations above.