fix: add CREATE_NO_WINDOW to subprocess calls in tts_tool and vision_tools - #66785
Closed
AlexFucuson9 wants to merge 1 commit into
Closed
fix: add CREATE_NO_WINDOW to subprocess calls in tts_tool and vision_tools#66785AlexFucuson9 wants to merge 1 commit into
AlexFucuson9 wants to merge 1 commit into
Conversation
…tools On Windows, subprocess.run()/Popen() without CREATE_NO_WINDOW (0x08000000) spawns a visible console window (cmd.exe / conhost.exe) that flashes briefly. The main terminal path already has creationflags, but two side paths were missed: - tools/tts_tool.py:731 — taskkill subprocess for TTS process cleanup - tools/vision_tools.py:292 — rsvg-convert/inkscape for SVG-to-PNG
Collaborator
tonydwb
reviewed
Jul 18, 2026
tonydwb
left a comment
There was a problem hiding this comment.
{
"event": "COMMENT",
Code Review Summary\n\nVerdict: Approved\n\nLooks good. No obvious issues found.\n\n---\nReviewed by Hermes Agent",
"comments": []
}
teknium1
reviewed
Jul 18, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for tracking two real Windows console-flash paths. Current main still lacks creationflags at tools/tts_tool.py:731 and tools/vision_tools.py:292.
Problems
- This overlapping bundle is incomplete for TTS: direct subprocess calls at
tools/tts_tool.py:2015and:2094also lack the flag, while the command-providerPopenat:785only setsCREATE_NEW_PROCESS_GROUP. - The added
tools/vision_tools.py:295inline constant bypasses the centralizedwindows_hide_flags()contract inhermes_cli/_subprocess_compat.py:16-25. - No regression test is included; existing mocked flag coverage is in
tests/test_windows_subprocess_no_window_flags.py:304-320.
Suggested changes
- Consolidate with the focused PRs already linked in the member discussion: #65663 covers this exact vision hunk and #65667 covers the TTS direct calls.
- Use
windows_hide_flags()for the vision invocation and add mocked assertions for both paths.
This is an automated hermes-sweeper review.
| _subprocess.run( | ||
| cmd, check=True, capture_output=True, timeout=30, | ||
| stdin=_subprocess.DEVNULL, | ||
| **({"creationflags": 0x08000000} if sys.platform == "win32" else {}), |
Contributor
There was a problem hiding this comment.
Please use the centralized windows_hide_flags() helper rather than an inline sys.platform branch and literal. hermes_cli/_subprocess_compat.py defines the shared no-op-on-POSIX behavior and keeps Win32 flag handling consistent.
This was referenced Jul 26, 2026
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,
subprocess.run()/Popen()withoutCREATE_NO_WINDOW(0x08000000) spawns a visible console window (cmd.exe / conhost.exe) that flashes briefly. The main terminal path intools/environments/local.pyalready has creationflags, and prior PRs (#64081, #65635, #65660) covered most side paths. Two additional sites were missed:Changes
tools/tts_tool.py:731—taskkillsubprocess for TTS process cleanup. Already importswindows_hide_flagsat module level (line 55), just needed the kwarg.tools/vision_tools.py:292—rsvg-convert/inkscapesubprocess for SVG-to-PNG rasterization. Uses localsubprocessimport, applied inline0x08000000constant.Test Plan
py_compilepasses for both files