Skip to content

fix(whatsapp): pass CREATE_NO_WINDOW flag on Windows subprocess spawn (#29715) - #29725

Closed
vanhci wants to merge 2 commits into
NousResearch:mainfrom
vanhci:fix/issue-29715-whatsapp-no-console-window
Closed

fix(whatsapp): pass CREATE_NO_WINDOW flag on Windows subprocess spawn (#29715)#29725
vanhci wants to merge 2 commits into
NousResearch:mainfrom
vanhci:fix/issue-29715-whatsapp-no-console-window

Conversation

@vanhci

@vanhci vanhci commented May 21, 2026

Copy link
Copy Markdown

Bug

On Windows, the WhatsApp bridge Node.js subprocess was spawned without CREATE_NO_WINDOW, causing a visible blank node.exe console window to appear. The window contains no useful output (stdout/stderr already redirected to bridge.log). Closing the window causes the bridge to exit with status 0xC000013A, triggering the gateway's reconnection watcher to restart the bridge — creating a loop of blank console windows.

Fix

Pass creationflags=windows_hide_flags() (which returns CREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP) when spawning the bridge subprocess on Windows, the same pattern already used in cron/scheduler.py for the same reason.

Files changed:

  • gateway/platforms/whatsapp.py — import windows_hide_flags, pass creationflags to subprocess.Popen

Fixes #29715

Vanhci added 2 commits May 21, 2026 15:08
On Windows, subprocess.Popen spawned the Node.js WhatsApp bridge without
creationflags, causing a visible blank node.exe console window to appear.
The window has no useful output (stdout/stderr already go to bridge.log)
and closing it causes the bridge to exit with status 0xC000013A, triggering
the reconnection watcher loop.

Fix: pass creationflags=windows_hide_flags() on Windows, the same pattern
already used in cron/scheduler.py for the same reason.

Fixes #29715
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/whatsapp WhatsApp Business adapter P2 Medium — degraded but workaround exists labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Note: This PR also modifies hermes_cli/main.py (adds --system flag to uv pip install in _cmd_update_pip), which is unrelated to the WhatsApp CREATE_NO_WINDOW fix described in the PR title and body. The hermes_cli/main.py change should be split into a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/whatsapp WhatsApp Business adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WhatsApp bridge opens blank node.exe console window on Windows

2 participants