fix(windows): hide console flash on backend git/gh/pdftoppm spawns the sweep missed - #54492
Merged
Merged
Conversation
…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.
Contributor
🔎 Lint report:
|
| 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
enabled auto-merge
June 28, 2026 22:46
This was referenced Jun 29, 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
13 tasks
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
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
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 throughCREATE_NO_WINDOW— but missed these sibling sites:tools/checkpoint_manager.py—_run_git(and the one-shotgit init --barein_init_store). When checkpoints are enabled, every file-mutating turn fires several baregitcalls (status, add, write-tree/commit-tree, update-ref). The desktop spawns the backend withwindowsHide(→CREATE_NO_WINDOW), so the backend has no console, and each childgit.exeallocates its own conhost → a flurry of terminal popups.tools/skills_hub.py—GitHubAuth._try_gh_cli(gh auth token). Same bug class as the already-fixedcopilot_authgh probe; this is the sibling call path.tui_gateway/server.py— the PDF-attach handler shells out topdftoppm; 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 howserver.py::_list_repo_filesalready 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_clicluster the sweep focused on — they live undertools/(and oneserver.pymedia 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
fix(windows)— checkpoint git + skills_hub gh probes (+ tests)fix(windows)— pdftoppm console flash on PDF attachrefactor(windows)— unify all touched sites oncreationflags=windows_hide_flags(); drop theIS_WINDOWSimport + 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 passast.parseon all edited files