Skip to content

fix(windows): hide console flashes in GUI-reachable exec paths and provider transports (#56747) - #69850

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6a57d32c
Jul 23, 2026
Merged

fix(windows): hide console flashes in GUI-reachable exec paths and provider transports (#56747)#69850
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6a57d32c

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvages PR #56877 by @basilalshukaili onto current main: adds creationflags=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 the cli.exec RPC, shell.exec RPC, and quick-command exec dispatch spawns
  • cli.py: hide flags on the interactive CLI quick-command exec handler
  • agent/copilot_acp_client.py: hide flags on the ACP Popen transport (hide-only, PIPE stdio intact)
  • agent/transports/codex_app_server.py: hide flags on the app-server Popen transport (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

Before (fix reverted) After
tests/test_windows_subprocess_no_window_flags.py 25 pass / 6 fail 31/31 pass
ACP + codex transport + TUI protocol suites 155/155 pass

Contributor also validated on native Windows 11 (345 tests, CREATE_NO_WINDOW resolution 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

windows-console-flash-56747

basilalshukaili and others added 2 commits July 22, 2026 21:25
…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.
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on df00962

all good!

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) platform/windows Native Windows-specific behavior or breakage P2 Medium — degraded but workaround exists sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows needs-decision Awaiting maintainer decision before any implementation labels Jul 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) needs-decision Awaiting maintainer decision before any implementation P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants