# NousResearch/hermes-agent · Gateway SIGTERM startup exit code and supervisor recovery

## Open now

- Nothing open on GitHub.

These issues and fixes concern the gateway process exiting with code 0 when receiving SIGTERM during startup, which causes the service supervisor (s6) to treat the shutdown as intentional and not restart the gateway. The changes aim to ensure a non-zero exit code so the supervisor triggers recovery.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #104517. Verify it addresses your case.
- **Recommended:** read PR #104517 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-104517`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #103191: Gateway: SIGTERM during startup exits 0 → s6 finish treats it as intentional stop, gateway stays down (dashboard double gateway-restart race)

## Prior & competing PRs

- **#104517: fix(gateway): an unexpected SIGTERM during startup exits non-zero so the service manager restarts the gateway (#103191, salvage #103208)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `contributors/emails/165616139+YuYigeng@users.noreply.github.com`, `gateway/run.py`, `gateway/run_shutdown.py`, `tests/gateway/test_startup_restart_race.py`
- **#103208: fix(gateway): restart after startup SIGTERM**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `5f87ac74d7`, `#104517`, `#103191`
- **#103248: fix(gateway): unify exit verdict so startup SIGTERM triggers supervisor recovery**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `5f87ac74d7`, `#104517`, `#103208`

## Fix status

- Merged to main in PR #104517 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-06`.
