fix: add windowsHide to all spawn/execSync calls to prevent console popups on Windows#950
Merged
bra1nDump merged 1 commit intoslopus:mainfrom Apr 1, 2026
Conversation
…opups on Windows On Windows, child_process.spawn() and execSync() open a visible console window by default. This causes persistent black cmd popups when the CLI invokes subprocesses (claude, ripgrep, difftastic, etc.). Add `windowsHide: true` to all spawn/execSync call sites to suppress these console windows. This option is ignored on non-Windows platforms.
Scoteezy
added a commit
to Scoteezy/happy
that referenced
this pull request
Apr 10, 2026
… child_process calls The bash RPC handler in registerCommonHandlers.ts uses promisified exec() without windowsHide, so the mobile app's frequent `git worktree list --porcelain` polling (every 2-3s) caused a cmd.exe window to flash on Windows, stealing focus. PR slopus#950 added windowsHide elsewhere but missed this hot path; this is the actual root cause of the user-visible flashing reported in slopus#985 / slopus#981. Also pass windowsHide:true to the remaining execSync/execFileSync sites that PR slopus#950 missed (codex --version preflight, openclaw query helper, claude --help).
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
windowsHide: trueto allspawn()andexecSync()call sites in happy-cliProblem
On Windows,
child_process.spawn()andexecSync()open a visible console window by default. This causes repeated black cmd popups flashing on screen whenever the CLI runs background processes, which is a poor user experience.Changes
11 files updated across these areas:
claude/claudeLocal.ts— claude process spawningclaude/sdk/query.ts— SDK query executionclaude/sdk/utils.ts— SDK utility exec callsclaude/utils/sdkToLogConverter.ts— log converter execcodex/codexAppServerClient.ts— codex server spawninggemini/utils/config.ts— gemini config detectionmodules/difftastic/index.ts— difftastic spawningmodules/ripgrep/index.ts— ripgrep spawningutils/detectCLI.ts— CLI detection executils/spawnHappyCLI.ts— CLI spawning utilityutils/tmux.ts— tmux spawningTest plan
windowsHideis a no-op on macOS/Linux, no regressions expected