hermes - 💡(How to fix) Fix /sessions slash command registered but no dispatcher → 'Unknown command'

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…

Fix Action

Fix / Workaround

Either:

  • Wire a dispatcher (simplest: reuse _handle_resume_command which already shows recent sessions and accepts a resume target), or

  • Remove the CommandDef entry so autocomplete stops advertising it.

  • Hermes: installed from main, ~/.hermes/hermes-agent

  • macOS, iTerm2

  • File: cli.py line 7094-7107 (dispatcher), hermes_cli/commands.py line 118 (registration)

Code Example

CommandDef("sessions", "Browse and resume previous sessions", "Session"),

---

elif canonical == "sessions":
    self._handle_resume_command("/resume")
RAW_BUFFERClick to expand / collapse

Bug

/sessions is registered in hermes_cli/commands.py (line 118):

CommandDef("sessions", "Browse and resume previous sessions", "Session"),

Autocomplete advertises it as "Browse and resume previous sessions", but cli.py's process_command() has no elif canonical == "sessions" branch. Result: typing /sessions falls through to the catch-all and prints Unknown command: /sessions.

Repro

  1. Start hermes.
  2. Type /sess — autocomplete suggests /sessions Browse and resume previous sessions.
  3. Accept and submit /sessions.
  4. Get: Unknown command: /sessions.

Expected

Either:

  • Wire a dispatcher (simplest: reuse _handle_resume_command which already shows recent sessions and accepts a resume target), or
  • Remove the CommandDef entry so autocomplete stops advertising it.

Suggested fix

In cli.py process_command(), next to the existing resume branch (~line 7104):

elif canonical == "sessions":
    self._handle_resume_command("/resume")

This delegates to the same handler bare /resume already uses (which prints recent sessions + usage), matching the registered help text.

Environment

  • Hermes: installed from main, ~/.hermes/hermes-agent
  • macOS, iTerm2
  • File: cli.py line 7094-7107 (dispatcher), hermes_cli/commands.py line 118 (registration)

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