Skip to content

fix(utils): hide console window for hook dispatch on Windows - #7145

Open
code-yeongyu wants to merge 1 commit into
devfrom
fix/hook-windows-hide
Open

fix(utils): hide console window for hook dispatch on Windows#7145
code-yeongyu wants to merge 1 commit into
devfrom
fix/hook-windows-hide

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Add windowsHide: true to the main hook spawn in executeHookCommand().

On Windows, when the host process has no attached console (e.g. launched by an IDE extension or as a headless server), the child cmd.exe allocated a visible conhost window that flashed the Windows banner and echoed the raw hook JSON payload.

The timeout taskkill spawn at line 158 already uses windowsHide: true; the omission on the main spawn was an oversight. The option is a no-op on non-Windows platforms.

Changes

  • packages/utils/src/command-executor/execute-hook-command.ts: add windowsHide: true to spawn options

Closes #7144


Summary by cubic

Hide the Windows console window during hook execution by setting windowsHide: true on the main spawn. Previously, on Windows without an attached console, a visible conhost flashed and echoed the raw hook JSON; now the window stays hidden, with no change on other platforms.

Notes

  • Applies only on Windows; windowsHide is a no-op elsewhere.
  • Aligns the main hook spawn with the existing timeout taskkill spawn, which already used this flag.

Written for commit 15204e5. Summary will update on new commits.

Review in cubic

Add windowsHide: true to the main hook spawn in executeHookCommand().
On Windows, when the host process has no attached console (e.g. IDE
extension / headless server), the child cmd.exe allocated a visible
conhost window that flashed the Windows banner and echoed the raw
hook JSON payload.

The timeout taskkill spawn already uses windowsHide: true; this was
an oversight on the main spawn. The option is a no-op on non-Windows.

Closes #7144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

utils Changes under packages/utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Hook dispatcher spawns visible console window and echoes hook JSON payload on Windows

1 participant