Skip to content

fix(photon): launch the iMessage sidecar headless on Windows - #65441

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-7f920c70
Jul 16, 2026
Merged

fix(photon): launch the iMessage sidecar headless on Windows#65441
teknium1 merged 3 commits into
mainfrom
hermes/hermes-7f920c70

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

The Photon (iMessage) sidecar no longer pops visible console windows on Windows. start_new_session=True is a silent no-op on Windows, so the long-lived Node sidecar spawned with an attached blank conhost window; the npm dep self-heal runs flashed one too.

Changes

  • plugins/platforms/photon/adapter.py: sidecar Popen and the short-lived node patch run now pass creationflags=windows_hide_flags() (the shared hermes_cli/_subprocess_compat.py helper — CREATE_NO_WINDOW only, no DETACHED_PROCESS, so the stdin/stdout pipes stay usable) — @lEWFkRAD's fix from fix(photon): launch the iMessage sidecar headless on Windows #54565, cherry-picked with authorship preserved
  • plugins/platforms/photon/adapter.py: follow-up widens the same flag to the sibling spawn sites in _reinstall_sidecar_deps (npm ci + npm install fallback)
  • tests/plugins/platforms/photon/test_sidecar_lifecycle.py: regression coverage pinning the hidden-window spawn kwargs

Validation

Before After
Windows sidecar spawn visible conhost window CREATE_NO_WINDOW, pipes intact
npm self-heal runs console flash per run hidden
scripts/run_tests.sh tests/plugins/platforms/photon/ all pass
POSIX behavior start_new_session=True unchanged (helper returns 0)

Credit

Salvaged from #54565 by @lEWFkRAD (earliest submission, Jun 29). The same bug was independently fixed by @igparkernz-coder (#55554), @xIGBClutchIx (#56610), @ianarsenault-tn (#65083), and @smreed32 (#65299) — thanks to all five.

Infographic

PR infographic

lEWFkRAD and others added 3 commits July 16, 2026 00:23
plugins/platforms/photon/adapter.py launches the Node sidecar (and the
spectrum-ts mixed-attachment patch run) via subprocess without creationflags.
On Windows this opens a visible console window on every sidecar (re)start --
and because a failed sidecar is retried on a timer, it flashes repeatedly.

Wire windows_hide_flags() (hermes_cli/_subprocess_compat) into both spawns,
the same helper the discord and whatsapp adapters already use for their
sidecar spawns -- photon was the one platform adapter this pattern missed.
CREATE_NO_WINDOW only (no DETACHED_PROCESS) so the persistent sidecar's
stdin/stdout pipes stay usable for the supervisor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Widen @lEWFkRAD's sidecar-headless fix (PR #54565) to the sibling spawn
sites: the npm ci / npm install self-heal runs in _reinstall_sidecar_deps
also popped a brief console window per run on Windows. Same
windows_hide_flags() helper (CREATE_NO_WINDOW only, so capture_output
stays usable).
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jul 16, 2026
@teknium1
teknium1 merged commit f8bf40b into main Jul 16, 2026
63 of 65 checks passed
@teknium1
teknium1 deleted the hermes/hermes-7f920c70 branch July 16, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants