fix(windows): suppress console window flash on subprocess spawns#27061
Closed
Grogger wants to merge 1 commit into
Closed
fix(windows): suppress console window flash on subprocess spawns#27061Grogger wants to merge 1 commit into
Grogger wants to merge 1 commit into
Conversation
Add creationflags=CREATE_NO_WINDOW to every Windows Popen call across the terminal, process registry, code execution, and kanban worker subsystems. Prevents visible CMD windows from flashing on the user's desktop during agent operation. Also adds the _IS_WINDOWS module constant to kanban_db.py where it was missing, for consistency with the other patched files. 5 Popen sites across 4 files: - tools/environments/local.py (terminal foreground spawn) - tools/process_registry.py (background process spawn) - tools/code_execution_tool.py (sandbox + interpreter probe) - hermes_cli/kanban_db.py (kanban worker spawn)
teknium1
added a commit
that referenced
this pull request
May 17, 2026
…tors Adds release-note attribution mappings for 9 contributors from group 3: - @darvsum (PR #26766) - @hueilau (PR #26498) - @Timur00Kh (PR #27114) - @Grogger (PR #27061) - @lemassykoi (PR #27042) - @draplater (PR #26707) - @pr7426 (PR #27048) - @therahul-yo (PR #26215) - @flamiinngo (PR #27205) #27154 dropped from this batch — already landed on main as 4e9cedc.
Contributor
|
Merged via PR #27302 — your commit was cherry-picked onto current |
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…tors Adds release-note attribution mappings for 9 contributors from group 3: - @darvsum (PR NousResearch#26766) - @hueilau (PR NousResearch#26498) - @Timur00Kh (PR NousResearch#27114) - @Grogger (PR NousResearch#27061) - @lemassykoi (PR NousResearch#27042) - @draplater (PR NousResearch#26707) - @pr7426 (PR NousResearch#27048) - @therahul-yo (PR NousResearch#26215) - @flamiinngo (PR NousResearch#27205) NousResearch#27154 dropped from this batch — already landed on main as 4e9cedc.
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
On Windows, every
subprocess.Popenin the agent spawns a visible CMD window that flashes on the desktop. This addscreationflags=subprocess.CREATE_NO_WINDOW(guarded by_IS_WINDOWS) to all 5 Popen sites across 4 files:tools/environments/local.py: foreground terminal spawntools/process_registry.py: background process spawntools/code_execution_tool.py: sandbox Popen + interpreter probehermes_cli/kanban_db.py: kanban worker spawn (+ adds the missing_IS_WINDOWSmodule constant)Why
CMD window flashes are jarring during normal operation, especially when background agents or gateway workers spawn subprocesses. The fix is a single keyword argument per Popen site, no-op on non-Windows thanks to the
_IS_WINDOWSguard.CREATE_NO_WINDOWalone is sufficient to suppress the flash for these call sites. The full daemon flag combo from the cross-platform guide (CREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_BREAKAWAY_FROM_JOB) is for detached daemons and not needed here.How to test
On Windows 11:
hermesand execute any terminal command. No CMD window flashes.terminal(background=True). No flash on spawn.execute_code. No flash on sandbox spawn.Test suite:
pytest tests/tools/ tests/hermes_cli/on Windows 11 shows identical results to main branch. All test failures are pre-existing platform issues (Winsock, tilde expansion, macOS-specific tests, docker detection), none related to this change.