# NousResearch/hermes-agent · Windows gateway crashes from os.kill PID checks

## Open now

- Nothing open on GitHub.

A cluster of bug reports and fixes addressing crashes in the gateway startup on Windows caused by unhandled OSError, SystemError, and WinError exceptions from os.kill(pid, 0) during PID liveness checks. Also includes one unrelated feature adding model list support for user-defined providers in the CLI.

## TL;DR

- 17 member(s): 0 open issue(s), 8 closed issue(s), 0 open PR(s), 0 merged PR(s), 9 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.13`: 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

- #5760: Windows: os.kill(pid, 0) raises SystemError/OSError in gateway/status.py
- #7227: Windows: hermes gateway crashes on stale gateway.pid after abrupt shutdown (os.kill(pid, 0) -> OSError)
- #8978: \[Bug\]: Windows: hermes gateway crashes on startup with OSError WinError 87
- #9574: \[Bug\]: Windows Git Bash gateway startup can crash on stale gateway.pid when os.kill(pid, 0) raises WinError 11
- #12359: \[BUG\]:Windows: os.kill(pid, 0) raises OSError \[WinError 87\] and crashes gateway startup
- #13932: \[Bug\]: Windows: os.kill(pid, 0) causes WinError 87 and fails to start hermes gateway
- #14359: os.kill(pid, 0) in gateway/status.py raises unhandled OSError on Windows
- #21432: os.kill(pid, 0) raises SystemError on Windows in get_running_pid(), crashing hermes gateway

## Prior & competing PRs

- **#5762: fix(gateway): handle Windows OSError/SystemError in os.kill probes (#5760)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `4c02e4597ec971ca2bd5b985e694fa7e5f26fd08`, `cc38282b04d997468db782caa3443387fd454359`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#6310: fix(gateway): handle windows pid probe failures**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#12363: fix(windows): handle OSError from os.kill() for non-existent PIDs**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `324567c93662d726e05650c83b06078dce599e37`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#13587: fix(gateway): use ctypes.OpenProcess for Windows process existence check**. closed without merge · fix tier `suggested`
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#13986`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#13986: fix(windows): handle OSError from os.kill and add UTF-8 encoding for Windows (#5760, #8978, #7537, #8901)**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#9024: fix(gateway): #8978 resolve Windows startup crash caused by os.kill(0…**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `4c02e4597ec971ca2bd5b985e694fa7e5f26fd08`
- **#9579: fix: tolerate Windows stale gateway pid OSError**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#14364`, `#12363`, `#11156`
- **#14364: fix(gateway): catch OSError from os.kill on Windows for stale PID detection**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#11140`, `#5760`, `#12359`, `#9574`
- **#26411: fix(gateway/status): catch SystemError from os.kill on Windows**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#5760`, `#5762`, `#21514`, `#13587`

## Fix status

- No merged fix on record.
- Subsystem: `gateway`
