fix(hooks): hide console windows for detached spawns on Windows#1
Open
nboute wants to merge 1 commit into
Open
fix(hooks): hide console windows for detached spawns on Windows#1nboute wants to merge 1 commit into
nboute wants to merge 1 commit into
Conversation
On Windows, spawning a detached child process (`detached: true`) without `windowsHide: true` opens a new console window each time. The PostToolUse hook fires on every Write/Edit and spawns the reingest + resolver workers detached, so a burst of edits produced a stream of flashing/persistent cmd windows. Add `windowsHide: true` to the detached spawns in: - scripts/lib/memory.js (spawnDetached — reingest/resolve) - scripts/on-post-tool.js (resolver-debounce worker) No behavior change on macOS/Linux; the flag is Windows-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
On Windows, every
Write/Editfires thePostToolUsehook, which spawns the reingest and cross-file resolver workers as detached child processes. Node'sspawn(..., { detached: true })opens a new console window for each child unlesswindowsHide: trueis set. A burst of edits therefore produces a stream of flashing/persistentcmdwindows.Fix
Add
windowsHide: trueto the two detached spawns:plugins/claude-code/scripts/lib/memory.js—spawnDetached()(reingest / resolve)plugins/claude-code/scripts/on-post-tool.js— theresolver-debounce.jsworkerwindowsHideis a no-op on macOS/Linux, so there is no behavior change off Windows. Verified locally: after the change, editing files no longer opens console windows, andcode-memory reingeststill runs correctly (symbols + imports written to FalkorDB/Qdrant).🤖 Generated with Claude Code