Skip to content

fix: add creationflags to plugins subprocess calls (Windows console flash) - #76279

Closed
JonthanaHanh wants to merge 1 commit into
NousResearch:mainfrom
JonthanaHanh:fix/subprocess-creationflags-plugins
Closed

fix: add creationflags to plugins subprocess calls (Windows console flash)#76279
JonthanaHanh wants to merge 1 commit into
NousResearch:mainfrom
JonthanaHanh:fix/subprocess-creationflags-plugins

Conversation

@JonthanaHanh

Copy link
Copy Markdown
Contributor

Summary

Three plugin adapters have non-interactive subprocess calls (ffprobe, ffmpeg, ImageMagick convert) missing CREATE_NO_WINDOW on Windows. Without it, each subprocess spawns a visible console window that flashes.

Changes

File Calls Tool
plugins/platforms/matrix/adapter.py 3 ffprobe duration, ffmpeg PCM, ffmpeg Ogg/Opus
plugins/platforms/discord/adapter.py 1 ffprobe duration probe
plugins/platforms/simplex/adapter.py 2 ImageMagick convert (format + thumbnail)

Fix

Import windows_hide_flags() from hermes_cli._subprocess_compat (local import, same pattern as #65660) and pass creationflags=windows_hide_flags() to each subprocess.run() call. The helper returns 0x08000000 (CREATE_NO_WINDOW) on Windows and 0 elsewhere.

Related

…lash)

Three plugin adapters have non-interactive subprocess calls (ffprobe,
ffmpeg, ImageMagick convert) missing CREATE_NO_WINDOW on Windows:

- plugins/platforms/matrix/adapter.py — ffprobe duration + ffmpeg PCM
  extraction + ffmpeg Ogg/Opus transcode (3 calls)
- plugins/platforms/discord/adapter.py — ffprobe duration probe (1 call)
- plugins/platforms/simplex/adapter.py — ImageMagick convert for format
  conversion + thumbnail generation (2 calls)

Without CREATE_NO_WINDOW (0x08000000), each subprocess spawns a visible
console window (cmd.exe / conhost.exe) that flashes on Windows.

Uses the existing windows_hide_flags() helper from
hermes_cli._subprocess_compat (local imports, same pattern as PR NousResearch#65660).
@teknium1

teknium1 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for tracing the remaining plugin subprocesses. This is an automated hermes-sweeper review: the console-flash guarantee is already implemented on current main at the parent-process layer.

  • Commit 0dbf639bc8 (fix(windows): hidden-console daemons — extend the parent-console fix to every detached spawn path) is on main and shipped in v2026.7.30.
  • hermes_cli/gateway_windows.py:917-946 starts the Windows gateway with windows_detach_flags(), giving it a hidden CREATE_NO_WINDOW console that descendants inherit; hermes_cli/_subprocess_compat.py:108-120 documents why this eliminates the unbounded per-call-site flash class.
  • The maintainer resolution on the related PR fix: add creationflags to plugins subprocess calls (Windows console flash) #65660 reached the same conclusion after this root fix landed: the individual missing flags were real under the old console-less daemon topology, but are no longer reachable in shipped launch paths.

Closing as already implemented on main; thank you for the Windows coverage.

@teknium1 teknium1 closed this Aug 1, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:implemented-on-main Sweeper: behavior already present on current main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants