hermes - ✅(Solved) Fix fix(cli): /sessions unknown command in classic REPL mode [3 pull requests, 1 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#22951Fetched 2026-05-11 03:32:11
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×3labeled ×3commented ×1referenced ×1

The /sessions slash command shows "Unknown command" when used in the classic REPL mode (default hermes). It only works in TUI mode (hermes --tui).

Root Cause

Commit 09a491464 registered /sessions in the central CommandDef registry (hermes_cli/commands.py:113) so it appears in /help and autocomplete, but the handler was only implemented in the TUI (ui-tui/src/app/slash/commands/session.ts). The classic CLI's process_command() in cli.py has no elif canonical == "sessions" branch, so it falls through to "Unknown command."

Fix Action

Fix

Add elif canonical == "sessions" to process_command() in cli.py with a _handle_sessions_command() method that opens SessionDB, calls _session_browse_picker() (reused from hermes_cli.main), and relaunch() to resume the selected session.

PR fix notes

PR #23006: fix(cli): add /sessions handler + recover oneshot response (#22951, #22975)

Description (problem / solution / changelog)

Closing in favor of individual PRs per issue. Will split into separate focused PRs as per project guidelines.

Changed files

  • cli.py (modified, +82/-1)
  • hermes_cli/oneshot.py (modified, +17/-1)
  • ui-tui/package.json (modified, +1/-1)
  • ui-tui/src/app/useMainApp.ts (modified, +6/-0)
  • web/src/pages/SessionsPage.tsx (modified, +7/-1)

PR #23032: fix(cli): add /sessions handler for classic REPL mode

Description (problem / solution / changelog)

Closing as duplicate. Duplicate of #22962 — that PR already adds the /sessions dispatch branch alongside /indicator.

Should have checked is:pr is:open before submitting — lesson learned.

Changed files

  • cli.py (modified, +32/-7)

PR #23077: fix(cli): /sessions shows session list in classic REPL mode (#22951)

Description (problem / solution / changelog)

Fixes #22951.

/sessions was registered in CommandDef (visible in /help) but had no handler in cli.py's process_command(), causing 'Unknown command'.

Fix: add elif canonical == "sessions" that calls _show_recent_sessions() — the same method already used by /history to print the formatted session table and suggest /resume.

2 tests.

Changed files

  • cli.py (modified, +6/-0)
  • tests/cli/test_cli_sessions_command.py (added, +51/-0)

Code Example

hermes
> /sessions
Unknown command: /sessions
RAW_BUFFERClick to expand / collapse

Summary

The /sessions slash command shows "Unknown command" when used in the classic REPL mode (default hermes). It only works in TUI mode (hermes --tui).

Root cause

Commit 09a491464 registered /sessions in the central CommandDef registry (hermes_cli/commands.py:113) so it appears in /help and autocomplete, but the handler was only implemented in the TUI (ui-tui/src/app/slash/commands/session.ts). The classic CLI's process_command() in cli.py has no elif canonical == "sessions" branch, so it falls through to "Unknown command."

Fix

Add elif canonical == "sessions" to process_command() in cli.py with a _handle_sessions_command() method that opens SessionDB, calls _session_browse_picker() (reused from hermes_cli.main), and relaunch() to resume the selected session.

How to reproduce

hermes
> /sessions
Unknown command: /sessions

Environment

  • Windows 10
  • git-bash (MSYS2)
  • Hermes after commit 09a491464

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