Root Cause
Multiple spawn paths in the worker and hook scripts are missing windowsHide: true or route through cmd.exe unnecessarily. The primary culprits are: findBun() using spawnSync('where bun', { shell: true }) without windowsHide; hooks using "shell": "bash" from a GUI context (VS Code); git subprocess calls (rev-parse, ls-files, cat-file) lacking windowsHide; and the SDK transport resolving the Claude CLI to a .cmd npm shim which forces a cmd.exe /d /c wrapper. Any of these paths causes a visible conhost/black console window flash on each hook or tool-use event.
Tracked Items
Issues
PRs
Resolution
This is the canonical tracking issue for this root cause. Individual issues and PRs listed above will be closed in favor of this one.
Root Cause
Multiple spawn paths in the worker and hook scripts are missing
windowsHide: trueor route throughcmd.exeunnecessarily. The primary culprits are:findBun()usingspawnSync('where bun', { shell: true })withoutwindowsHide; hooks using"shell": "bash"from a GUI context (VS Code); git subprocess calls (rev-parse,ls-files,cat-file) lackingwindowsHide; and the SDK transport resolving the Claude CLI to a.cmdnpm shim which forces acmd.exe /d /cwrapper. Any of these paths causes a visible conhost/black console window flash on each hook or tool-use event.Tracked Items
Issues
PRs
where bunspawnSync (findBun) #2944 — fix(windows): hide cmd window inwhere bunspawnSync (findBun) #2944Resolution
This is the canonical tracking issue for this root cause. Individual issues and PRs listed above will be closed in favor of this one.