Repository navigation
fix(hooks): hide console windows for detached hook child processes - #506
Merged
jeff-r2026 merged 1 commit intoSep 11, 2026
Merged
Conversation
detached: true without windowsHide: true gives the child its own console window on Windows — every hook dispatch flashed a transient "npm" window when WorkBuddy (a GUI host) fired session hooks. Set windowsHide: true on both detached spawn sites (hook-dispatch background child and the local-agent plugin reconcile worker).
jeff-r2026
self-requested a review
September 11, 2026 06:23
This was referenced Sep 20, 2026
Closed
7 tasks done
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
) detached: true without windowsHide: true gives the child its own console window on Windows — every hook dispatch flashed a transient "npm" window when WorkBuddy (a GUI host) fired session hooks. Set windowsHide: true on both detached spawn sites (hook-dispatch background child and the local-agent plugin reconcile worker). Co-authored-by: flowjzh <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
detached: truewithoutwindowsHide: truegives the child process its own console window on Windows. Every hook dispatch from a GUI host therefore flashed a transient console window: WorkBuddy fireshook-dispatchon session start, the parent spawns the background-only child (which re-runs npm-registry checks), and a "npm" console window pops up and vanishes on the user's desktop.This sets
windowsHide: trueon both detached spawn sites:src/hook-dispatch-cli.ts- the background-only dispatch child (--bg-only)src/local-agent.ts- the plugin reconcile workerZero behavior change otherwise: same stdio configuration, same unref, same error swallowing.
Type of Change
Test Plan
npx tsc --noEmitpassesnpx vitest runon macOS: full suite green; Windows: no new failures vs. pre-existing platform failuresNotes for Reviewers
windowsHideon thecmd /cplugin exec inlocal-agent.ts- this covers the remaining detached sites (2/2; a tree-wide search finds no otherdetached:spawn).spawnDetached()helper insrc/utils/would make hidden-launch a property of the infrastructure instead of a per-site option to remember; happy to do that if preferred.