fix(windows): hide console flashes in GUI-reachable exec paths and provider transports (#56747) - #69850
Merged
Conversation
…ovider transports (#56747) Six spawn sites reachable from the desktop GUI / TUI gateway lacked CREATE_NO_WINDOW, so a windowless parent (pythonw/Electron) flashed a conhost per spawn: cli.exec RPC, quick-commands exec dispatch, and shell.exec RPC in tui_gateway/server.py; the CLI REPL quick-commands exec in cli.py; and the per-session provider transports in agent/copilot_acp_client.py and agent/transports/codex_app_server.py (Popen, hide-only so PIPE stdio stays intact). All use hermes_cli._subprocess_compat.windows_hide_flags() (no-op on POSIX), matching the pattern already used at three other sites in tui_gateway/server.py. Deliberately hide-only — no detach flags, no Electron changes (per the #54220 revert history). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mocked-subprocess tests asserting creationflags == CREATE_NO_WINDOW for each path salvaged from PR #56877: tui_gateway cli.exec / shell.exec / quick-command dispatch, the CLI quick-command exec handler, and the Copilot ACP + Codex app-server Popen transports (pipes asserted intact). Verified: all 6 fail with the fix reverted, pass with it applied.
Contributor
૮ >ﻌ< ა ci reviewran on df00962 all good! |
Collaborator
Related: #56877 is the preserved contributor implementation. This current-head salvage adds the focused regression coverage for the same remaining GUI-reachable subprocess sites; maintainer selection/supersession is needed. |
This was referenced Jul 23, 2026
Closed
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
Salvages PR #56877 by @basilalshukaili onto current
main: addscreationflags=windows_hide_flags()to the six GUI-reachable subprocess spawn paths that still flashed a console window on Windows desktop during agent command execution (#56747).Changes
tui_gateway/server.py: hide flags on thecli.execRPC,shell.execRPC, and quick-commandexecdispatch spawnscli.py: hide flags on the interactive CLI quick-commandexechandleragent/copilot_acp_client.py: hide flags on the ACPPopentransport (hide-only, PIPE stdio intact)agent/transports/codex_app_server.py: hide flags on the app-serverPopentransport (hide-only, PIPE stdio intact)tests/test_windows_subprocess_no_window_flags.py: +6 mocked-subprocess regression tests, one per site, following the file's existing pattern (our follow-up commit — the original PR's only gap)Validation
tests/test_windows_subprocess_no_window_flags.pyContributor also validated on native Windows 11 (345 tests,
CREATE_NO_WINDOWresolution confirmed) per #56877.Scope discipline preserved from the original: hide-only (no
DETACHED_PROCESS/breakaway flags), no Electron changes, no updater-handoff legs.Authorship: cherry-picked from #56877 with @basilalshukaili's commit preserved; rebase-merge.
Closes #56877. Addresses #56747.
Infographic