Hermes /api/status Can Hang for About 20 Seconds on systemd User-Service Environments (#57203)

Bug Tracker — July 16, 2026. A reported Linux liveness-detection defect can mistake a systemd user service for a stopped gateway, then issue a synchronous health probe that makes dashboard and desktop startup feel hung.

Issue Summary

Issue #57203 reports that get_running_pid() cannot see a gateway running as a systemd --user service in some isolated Linux environments. Dashboard liveness detection then falsely concludes that the gateway is not running and performs a synchronous HTTP health probe with the operating system’s roughly 20-second timeout. The reported result is /api/status taking around 22 seconds while /docs and /openapi.json remain fast, delaying Desktop/dashboard startup and health checks. Linked PRs #57254 and #57231 are referenced upstream.

Observed Failure Path

StepReported BehaviorUser-Level Consequence
Gateway runs as user serviceA systemd --user gateway is not visible to the PID-detection path.Liveness logic can incorrectly classify a healthy gateway as stopped.
Status request/api/status triggers a synchronous HTTP health probe after the false negative.A routine status check waits on the operating system’s long timeout.
Endpoint behavior/api/status reportedly takes about 22 seconds while documentation endpoints are fast.Desktop/dashboard startup and health UI feel hung despite other HTTP routes responding.
Operator diagnosisSlow status may look like a dead gateway rather than faulty process discovery.Users may restart or reconfigure a service that is already running.

Operational Impact

Classification: P2. Status: Open. This page summarizes a publicly reported issue; scope, remediation, and reproducibility can change. Validate the relevant Hermes version, MCP provider, and Linux service model before treating a workaround or closure as complete.

Mitigation and Verification

  1. Measure /api/status latency on the actual Linux service model, including systemd --user isolation, and compare it with a known-fast endpoint.
  2. Verify liveness through a service-aware mechanism rather than relying only on a PID lookup that may not see user services.
  3. Bound synchronous health-probe timeouts and surface a typed degraded-state response instead of leaving dashboard startup waiting on an OS-level timeout.
  4. Track issue #57203 and linked PRs #57254/#57231, then retest service discovery, endpoint latency, and Desktop/dashboard startup after remediation.
  5. Use a monitoring check that distinguishes process visibility, HTTP reachability, and functional gateway readiness.

Source Evidence

Primary issue: NousResearch/hermes-agent issue #57203 (linked PRs #57254 and #57231)

For a managed-agent comparison, the relevant question is whether credential recovery and liveness checks preserve state, return actionable status, and fail within a bounded time—not only whether a healthy happy path works.