Repository navigation
fix(ai): hide console windows for AI CLI processes on Windows - #819
Merged
Merged
Conversation
GUI-launched AI CLI children (the `where` lookup, `--version` and `models` probes, chat spawn, and the codex app-server) opened a visible console window on Windows. Spawn them with CREATE_NO_WINDOW via a shared hide_console_window helper. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01X7kyDQbaNWvTgH2fSHKwAK
fhalim
marked this pull request as ready for review
October 4, 2026 17:51
Owner
|
Thank you 🙏 |
Xoshbin
pushed a commit
that referenced
this pull request
Nov 18, 2026
Stdio MCP servers were spawned without CREATE_NO_WINDOW, so on Windows each `npx`/`uvx`-style server (a console-subsystem program or a `.cmd` shim run via cmd.exe) opened a visible console window. Reuse the hide_console_window helper added for the AI CLI processes in #819.
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.
Problem
On Windows, the GUI process spawns console-subsystem AI CLI children, and each one flashes a visible console window: the
wherebinary lookup, the--versioncheck, themodelslisting, the chat spawn, and the codex app-server. It steals focus from the asyar window.Fix
Add
ai::cli::hide_console_window, which setsCREATE_NO_WINDOWon Windows and is a no-op elsewhere, and apply it at each spawn site incli.rs,codex_client.rsandmodels.rs. Thestd::process::Commandused forwheresets the flag inline since the helper takes a tokioCommand.Verification
claudeCLI session works without a window popping up for it.