hermes - 💡(How to fix) Fix gateway restart causes CLI session loss — no automatic session recovery

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Bug Description

When running hermes gateway restart, CLI sessions connected via WebSocket lose their runtime routing context. After restart, the gateway treats the reconnected CLI as a new session instead of resuming the previous one.

Steps to Reproduce

  1. Start a CLI session (hermes or hermes chat)
  2. Have a conversation (session is active in gateway runtime)
  3. Run hermes gateway restart from another terminal
  4. Observe: CLI shows a new session; previous session context is lost

Expected Behavior

CLI should automatically reconnect and resume the same session after gateway restart, without manual --resume intervention.

Actual Behavior

Gateway does not persist session routing table across restarts. Runtime session state is held in memory only.

Environment

  • OS: WSL/Linux
  • Hermes version: latest
  • CLI and gateway on same host

Proposed Solution

Persist session routing info (session_id → platform/channel mapping) to state.db or a separate session_routes table. On gateway startup, restore active routes so existing CLI connections can be re-associated with their sessions.

Alternatively, teach the CLI reconnection protocol to send its last known session_id, allowing the gateway to resume it.

Alternatives Considered

  • Wrapper script that saves session_id before restart and resumes after — fragile, CLI process may also disconnect
  • User manually running --resume after each restart — poor UX

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING