Skip to content

fix: add windowsHide to all spawn/execSync calls to prevent console popups on Windows#950

Merged
bra1nDump merged 1 commit intoslopus:mainfrom
LightYear512:fix/windows-hide-console-popups
Apr 1, 2026
Merged

fix: add windowsHide to all spawn/execSync calls to prevent console popups on Windows#950
bra1nDump merged 1 commit intoslopus:mainfrom
LightYear512:fix/windows-hide-console-popups

Conversation

@LightYear512
Copy link
Copy Markdown
Contributor

Summary

  • Add windowsHide: true to all spawn() and execSync() call sites in happy-cli
  • Prevents persistent black cmd window popups when the CLI invokes subprocesses (claude, ripgrep, difftastic, tmux, etc.)
  • This option is ignored on non-Windows platforms, so no impact to macOS/Linux

Problem

On Windows, child_process.spawn() and execSync() 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 spawning
  • claude/sdk/query.ts — SDK query execution
  • claude/sdk/utils.ts — SDK utility exec calls
  • claude/utils/sdkToLogConverter.ts — log converter exec
  • codex/codexAppServerClient.ts — codex server spawning
  • gemini/utils/config.ts — gemini config detection
  • modules/difftastic/index.ts — difftastic spawning
  • modules/ripgrep/index.ts — ripgrep spawning
  • utils/detectCLI.ts — CLI detection exec
  • utils/spawnHappyCLI.ts — CLI spawning utility
  • utils/tmux.ts — tmux spawning

Test plan

  • Verified on Windows 11: no more console popups when running happy-cli
  • windowsHide is a no-op on macOS/Linux, no regressions expected

…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.
@bra1nDump bra1nDump merged commit 635ae0b into slopus:main Apr 1, 2026
@LightYear512 LightYear512 deleted the fix/windows-hide-console-popups branch April 10, 2026 03:47
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants