Skip to content

fix(windows): suppress console flash on child process spawns#538

Open
Raymond8196 wants to merge 1 commit into
org2AI:developfrom
Raymond8196:fix/windows-hide-console-spawn
Open

fix(windows): suppress console flash on child process spawns#538
Raymond8196 wants to merge 1 commit into
org2AI:developfrom
Raymond8196:fix/windows-hide-console-spawn

Conversation

@Raymond8196

@Raymond8196 Raymond8196 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #537.

The Windows GUI host is built with #![windows_subsystem = "windows"] and has no console of its own, so console-subsystem child processes allocate and flash a console window when spawned. Three sites were missing the CREATE_NO_WINDOW flag that sibling spawn paths already use; each now mirrors the existing guarded pattern in its own file:

Site Command Fix
app-paths::current_windows_account_for_acl whoami (std::process::Command) app_platform::hide_console(&mut cmd)
agent-core bundled Peekaboo CLI bundled CLI (tokio::process::Command) #[cfg(windows)] cmd.creation_flags(CREATE_NO_WINDOW)
benchmark::process::terminate_process taskkill (tokio::process::Command) #[cfg(windows)] cmd.creation_flags(CREATE_NO_WINDOW)

Why these patterns

The codebase already centralizes the flag in app-platform (CREATE_NO_WINDOW const + hide_console helper) and uses both forms at sibling sites (sidecar_setup.rs, kiro.rs, lifecycle.rs, session.rs, env_setup.rs). This PR only closes the remaining gaps — no new abstraction.

Verification

  • All touched symbols (app_platform::CREATE_NO_WINDOW, hide_console, app_platform / app_paths crate deps) confirmed present.
  • The three edits match the existing guarded call sites verbatim in style.
  • ✅ Verified on Windows: built and run on Windows; the whoami, bundled Peekaboo CLI, and taskkill console flashes no longer appear.

Three console-subsystem child processes were spawned without the
Windows CREATE_NO_WINDOW flag, each flashing a terminal window when
launched from the GUI host (which has no console of its own):

- whoami in app-paths::current_windows_account_for_acl (hit on every
  sensitive-file write: key save, token refresh, first-launch install_id)
- bundled Peekaboo CLI in agent-core (screenshot/accessibility tool)
- taskkill in benchmark::process::terminate_process

Each site now mirrors the existing guarded pattern in its own file.

Pre-commit hook ran. Total eslint: 0, total circular: 0
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.

fix(windows): console window flashes on child process spawns

1 participant