Skip to content

fix(windows): hide console flash on backend git/gh/pdftoppm spawns the sweep missed - #54492

Merged
OutThisLife merged 3 commits into
mainfrom
bb/windows-hide-checkpoint-skills-git
Jun 28, 2026
Merged

fix(windows): hide console flash on backend git/gh/pdftoppm spawns the sweep missed#54492
OutThisLife merged 3 commits into
mainfrom
bb/windows-hide-checkpoint-skills-git

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three backend spawn legs that run inside the console-less desktop/gateway backend still flash a fresh console window on Windows. The recent backend sweep (#54236 "hide console-window flash on backend git/gh/wmic/bash subprocess spawns", #54417 "cover remaining console-flash spawn legs") routed git_probe, the repo-file picker, coding_context, context_references, copilot_auth, and the gateway process scans through CREATE_NO_WINDOW — but missed these sibling sites:

  • tools/checkpoint_manager.py_run_git (and the one-shot git init --bare in _init_store). When checkpoints are enabled, every file-mutating turn fires several bare git calls (status, add, write-tree/commit-tree, update-ref). The desktop spawns the backend with windowsHide (→ CREATE_NO_WINDOW), so the backend has no console, and each child git.exe allocates its own conhost → a flurry of terminal popups.
  • tools/skills_hub.pyGitHubAuth._try_gh_cli (gh auth token). Same bug class as the already-fixed copilot_auth gh probe; this is the sibling call path.
  • tui_gateway/server.py — the PDF-attach handler shells out to pdftoppm; one conhost flash per attach on Windows.

All route through windows_hide_flags() (no-op on POSIX), matching the established per-site form (creationflags=windows_hide_flags(), exactly how server.py::_list_repo_files already does it). This is the targeted-per-site approach the maintainers settled on after rolling back the global chokepoint in #53853 — not a resurrection of that approach.

Why these were missed

They're not in the tui_gateway/gateway/hermes_cli cluster the sweep focused on — they live under tools/ (and one server.py media handler) and only fire under specific feature flags (checkpoints on) or actions (installing a GitHub skill, attaching a PDF), so they didn't surface in the project-load reproduction.

Commits

  1. fix(windows) — checkpoint git + skills_hub gh probes (+ tests)
  2. fix(windows) — pdftoppm console flash on PDF attach
  3. refactor(windows) — unify all touched sites on creationflags=windows_hide_flags(); drop the IS_WINDOWS import + ternary/one-use-dict gating (no-op on POSIX anyway)

Test plan

  • scripts/run_tests.sh tests/test_windows_subprocess_no_window_flags.py -q — 15 pass (2 new: checkpoint git, skills_hub gh)
  • scripts/run_tests.sh tests/tools/test_checkpoint_manager.py -q — 77 pass
  • import smoke + ast.parse on all edited files

…obes

The #54236/#54417 backend git/gh sweep routed git_probe, the repo-file
picker, coding_context, context_references, copilot_auth, and the gateway
process scans through CREATE_NO_WINDOW, but two sibling spawn legs that
also run inside the console-less desktop/gateway backend were missed:

- tools/checkpoint_manager.py `_run_git` (and the one-shot `git init
  --bare` in `_init_store`) — when checkpoints are enabled, every
  file-mutating turn fires multiple bare `git` calls (status, add,
  write-tree/commit-tree, update-ref). Spawned from a parent with no
  console (Electron spawns the backend with windowsHide → CREATE_NO_WINDOW),
  each one allocates its own conhost window → a flurry of terminal popups.
- tools/skills_hub.py `GitHubAuth._try_gh_cli` — `gh auth token`, the same
  bug class as the already-fixed copilot_auth gh probe.

Route both through `windows_hide_flags()` (no-op on POSIX), matching the
established per-site pattern. Tests added to
tests/test_windows_subprocess_no_window_flags.py.
@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/windows-hide-checkpoint-skills-git vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11695 on HEAD, 11697 on base (✅ -2)

🆕 New issues (1):

Rule Count
invalid-assignment 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`

✅ Fixed issues (2):

Rule Count
unresolved-attribute 2
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3040: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`

Unchanged: 6139 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

server.py's PDF-attach handler shells out to `pdftoppm` from the
console-less desktop/gateway backend; on Windows that pops a conhost
window each attach. Route it through windows_hide_flags() like the
sibling _list_repo_files git calls (no-op on POSIX).
windows_hide_flags() already returns 0 on POSIX (and creationflags=0 is
the no-op default there, exactly how server.py::_list_repo_files does it),
so drop the IS_WINDOWS import + ternary/one-use-dict gating and just pass
creationflags=windows_hide_flags() directly. Tests lose the now-pointless
IS_WINDOWS monkeypatch.
@OutThisLife
OutThisLife enabled auto-merge June 28, 2026 22:46
@OutThisLife OutThisLife changed the title fix(windows): hide console flash on checkpoint git + skills_hub gh probes fix(windows): hide console flash on backend git/gh/pdftoppm spawns the sweep missed Jun 28, 2026
@OutThisLife
OutThisLife merged commit d0d2cf1 into main Jun 28, 2026
29 checks passed
@OutThisLife
OutThisLife deleted the bb/windows-hide-checkpoint-skills-git branch June 28, 2026 22:49
@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets tool/skills Skills system (list, view, manage) comp/tui Terminal UI (ui-tui/ + tui_gateway/) platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows P2 Medium — degraded but workaround exists labels Jun 28, 2026
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…de-checkpoint-skills-git

fix(windows): hide console flash on checkpoint git + skills_hub gh probes
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…de-checkpoint-skills-git

fix(windows): hide console flash on checkpoint git + skills_hub gh probes
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…de-checkpoint-skills-git

fix(windows): hide console flash on checkpoint git + skills_hub gh probes
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…de-checkpoint-skills-git

fix(windows): hide console flash on checkpoint git + skills_hub gh probes
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…de-checkpoint-skills-git

fix(windows): hide console flash on checkpoint git + skills_hub gh probes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets comp/tui Terminal UI (ui-tui/ + tui_gateway/) 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 tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants