fix(windows): suppress console flash on child process spawns#538
Open
Raymond8196 wants to merge 1 commit into
Open
fix(windows): suppress console flash on child process spawns#538Raymond8196 wants to merge 1 commit into
Raymond8196 wants to merge 1 commit into
Conversation
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
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
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 theCREATE_NO_WINDOWflag that sibling spawn paths already use; each now mirrors the existing guarded pattern in its own file:app-paths::current_windows_account_for_aclwhoami(std::process::Command)app_platform::hide_console(&mut cmd)agent-corebundled Peekaboo CLItokio::process::Command)#[cfg(windows)] cmd.creation_flags(CREATE_NO_WINDOW)benchmark::process::terminate_processtaskkill(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_WINDOWconst +hide_consolehelper) 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
app_platform::CREATE_NO_WINDOW,hide_console,app_platform/app_pathscrate deps) confirmed present.whoami, bundled Peekaboo CLI, andtaskkillconsole flashes no longer appear.