hermes - 💡(How to fix) Fix /sessions command on gateway platforms is recognized but has no handler — returns unknown command or falls through as plain text [2 pull requests]

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…

Error Message

  1. Observe the error ("Unknown command") or silent passthrough as plain text

Root Cause

/sessions IS registered in COMMAND_REGISTRY at hermes_cli/commands.py:113 with category Session and no cli_only flag, so it's included in GATEWAY_KNOWN_COMMANDS. However, gateway/run.py's _handle_message method has no if canonical == "sessions": handler — there are handlers for new, topic, help, status, agents, etc., but nothing for sessions.

The command flows through the hook system (fires command:sessions) but then falls all the way through without matching any handler block. It reaches the quick-commands, plugin, and skill checks, fails all of them, and depending on exact code path either returns Unknown command or passes /sessions to the LLM as a plain text user message — neither of which is the intended behavior.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug

The /sessions slash command doesn't work on gateway messaging platforms (Telegram etc.). It shows Unknown command: /sessions instead of returning the session list.

Analysis

/sessions IS registered in COMMAND_REGISTRY at hermes_cli/commands.py:113 with category Session and no cli_only flag, so it's included in GATEWAY_KNOWN_COMMANDS. However, gateway/run.py's _handle_message method has no if canonical == "sessions": handler — there are handlers for new, topic, help, status, agents, etc., but nothing for sessions.

The command flows through the hook system (fires command:sessions) but then falls all the way through without matching any handler block. It reaches the quick-commands, plugin, and skill checks, fails all of them, and depending on exact code path either returns Unknown command or passes /sessions to the LLM as a plain text user message — neither of which is the intended behavior.

Expected

/sessions should list the user's active/recent sessions (similar to how /sessions works in the Hermes Agent TUI).

Steps to reproduce

  1. Set up Hermes Agent with a messaging platform (e.g. Telegram)
  2. Send /sessions in any chat
  3. Observe the error ("Unknown command") or silent passthrough as plain text

Environment

  • hermes-agent main branch
  • Gateway platform (Telegram etc.)

Links

  • CommandDef registration: hermes_cli/commands.py:113
  • Gateway _handle_message (missing handler): gateway/run.py
  • TUI /sessions (works): documented at website/docs/user-guide/tui.md

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