# NousResearch/hermes-agent · Stale gateway PID file handling at startup and restart

## Open now

- Nothing open on GitHub.

The members concern a leftover gateway.pid file from a crashed or killed gateway instance, which is reported to interfere with startup, restarts, or use of --replace. Some items are bug reports (one about a PID file race condition) and others are fix proposals that clean up or clear the stale PID file before writing a new one.

## TL;DR

- 5 member(s): 0 open issue(s), 3 closed issue(s), 0 open PR(s), 0 merged PR(s), 2 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.31`: 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

- #13511: \[Bug\]: Hermes Gateway PID 文件竞态问题及修复方案
- #13655: Bug: Stale gateway.pid causes gateway restart loop after crash/SIGKILL
- #14203: Gateway fails to start with --replace when previous instance PID is already dead (stale gateway.pid)

## Prior & competing PRs

- **#25569: fix(gateway): clean stale PID file before O_EXCL write**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `413990c94537e9c9da973bb21a6afcd332400b91`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#13709: fix(gateway): clear stale PID file from crashed gateway on startup (closes #13655)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `402d048eb6c65d4e486d5b1b3900ed20f6d065fa`, `#13658`, `#9703`, `#14179`

## Fix status

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