From a0e803c9ca8abb925a2a39f80aeda029faf7b715 Mon Sep 17 00:00:00 2001 From: AlexFucuson9 Date: Sat, 27 Jun 2026 10:52:57 +0700 Subject: [PATCH] fix(windows): suppress console flash in copilot_auth gh token lookup (#53370) _try_gh_cli_token() calls subprocess.run() without creationflags=windows_hide_flags(), so Windows spawns a visible console window for every gh.exe invocation. The credential pool polls this every ~15 seconds, causing repeated CMD window flashes. This was missed in the May 16 flash-suppression pass (8bf09455) that fixed kanban_db.py, code_execution_tool.py, tools/local.py, and process_registry.py. --- hermes_cli/copilot_auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hermes_cli/copilot_auth.py b/hermes_cli/copilot_auth.py index e6f63a1557c9..1cfb05fb0fd4 100644 --- a/hermes_cli/copilot_auth.py +++ b/hermes_cli/copilot_auth.py @@ -27,6 +27,8 @@ from pathlib import Path from typing import Optional +from hermes_cli._subprocess_compat import windows_hide_flags + logger = logging.getLogger(__name__) # OAuth device code flow constants (same client ID as opencode/Copilot CLI) @@ -141,6 +143,7 @@ def _try_gh_cli_token() -> Optional[str]: text=True, timeout=5, env=clean_env, + creationflags=windows_hide_flags(), ) except (FileNotFoundError, subprocess.TimeoutExpired) as exc: logger.debug("gh CLI token lookup failed (%s): %s", gh_path, exc)