Files
hermes-agent/hermes_cli
Teknium 18ea42187c fix(windows): the logon task's launcher waits for the gateway and returns its exit
The Scheduled Task runs gateway.vbs through wscript, which started the
gateway with sh.Run ..., 0, False and returned at once: the task ended
successfully seconds after logon, so RestartOnFailure never saw the gateway
die and a mid-session crash stayed down until the next logon (#146976).

The launcher now waits (sh.Run(...), 0, True) and quits with the gateway's
exit code. Exits that are stops, not failures, map to 0 so RestartOnFailure
does not relaunch every minute: 78 (fatal config) always, and 1 while the
profile's gateway.pid is still there (another gateway owns the profile, or a
CLI stop force-killed this one after its drain window; a gateway that fails
on its own removes its record first).

The launcher-ownership check (_vbs_identity) accepts the new template and
the old one, which existing installs keep running until re-rendered.

Fixes #146976
2026-11-14 06:33:40 -08:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…