hermes - ✅(Solved) Fix /sessions and /indicator slash commands silently fail in CLI mode [3 pull requests, 1 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#22960Fetched 2026-05-11 03:32:04
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Participants
Timeline (top)
cross-referenced ×3labeled ×3referenced ×2

Root Cause

Both commands are defined in COMMAND_REGISTRY but process_command() has no elif canonical == "sessions": or elif canonical == "indicator": dispatch branch. The existing _show_recent_sessions() helper in cli.py already does all the work for sessions — it just needs a caller. For indicator, the config write path (save_config_value("display.tui_status_indicator", ...)) is straightforward and mirrors the TUI gateway's config.set handler in tui_gateway/server.py.

Fix Action

Fix / Workaround

Both commands are defined in COMMAND_REGISTRY but process_command() has no elif canonical == "sessions": or elif canonical == "indicator": dispatch branch. The existing _show_recent_sessions() helper in cli.py already does all the work for sessions — it just needs a caller. For indicator, the config write path (save_config_value("display.tui_status_indicator", ...)) is straightforward and mirrors the TUI gateway's config.set handler in tui_gateway/server.py.

PR fix notes

PR #22962: fix(cli): wire up /sessions and /indicator slash commands

Description (problem / solution / changelog)

Summary

Two slash commands (/sessions and /indicator) were registered in COMMAND_REGISTRY but had no handler dispatch in process_command(), causing them to silently fail in non-TUI CLI mode.

Changes

cli.py

  • Add _handle_sessions_command() — delegates to existing _show_recent_sessions(reason='sessions', limit=20) which already queries the session DB and renders a table
  • Add _handle_indicator_command() — validates style argument (kaomoji/emoji/unicode/ascii), saves to display.tui_status_indicator via save_config_value(), prints confirmation
  • Add dispatch brancheselif canonical == "sessions": and elif canonical == "indicator": in process_command()

hermes_cli/commands.py

  • Remove stray blank line and misplaced # Configuration comment between resume and sessions CommandDef entries

How to Test

  1. Run hermes (without --tui)
  2. Type /sessions — should list recent sessions with titles, previews, timestamps, and IDs
  3. Type /indicator — should show current style and usage
  4. Type /indicator emoji — should print "✓ Busy indicator → emoji (saved)"
  5. Type /indicator sparkle — should reject with "Unknown style"

Platform Tested

  • Linux (WSL2 on Windows 11)

Closes #22960

Changed files

  • cli.py (modified, +32/-0)
  • hermes_cli/commands.py (modified, +0/-2)

PR #23037: fix(cli): add /indicator handler for non-TUI CLI mode

Description (problem / solution / changelog)

Closing as duplicate. Duplicate of #22962 — that PR already wires both /sessions and /indicator dispatch branches.

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

Changed files

  • cli.py (modified, +84/-8)

PR #23289: fix(cli): wire sessions and indicator slash commands

Description (problem / solution / changelog)

What does this PR do?

Wire two already-registered slash commands into the classic CLI command dispatcher so they no longer silently do nothing outside TUI mode.

Related Issue

Fixes #22960

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • add /sessions dispatch in /Users/leongong/Desktop/LeonProjects/worktrees/hermes-agent/hermes-22960-cli-sessions-indicator/cli.py to reuse _show_recent_sessions(reason="resume")
  • add a small empty-state message when no resumable CLI sessions exist
  • add /indicator handling in classic CLI mode, including normalized status display and config writes to display.tui_status_indicator
  • add focused regression coverage in /Users/leongong/Desktop/LeonProjects/worktrees/hermes-agent/hermes-22960-cli-sessions-indicator/tests/cli/test_sessions_indicator_commands.py

How to Test

  1. Run uv run --frozen pytest -q -o addopts='' tests/cli/test_sessions_indicator_commands.py
  2. Start classic CLI mode (no TUI) and run /sessions to confirm recent sessions render or show the empty-state message
  3. Run /indicator status and /indicator emoji to confirm status normalization and config persistence both work in CLI mode

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.x

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • uv run --frozen pytest -q -o addopts='' tests/cli/test_sessions_indicator_commands.py7 passed
  • uv run --frozen ruff check cli.py tests/cli/test_sessions_indicator_commands.py → passed

Changed files

  • cli.py (modified, +46/-0)
  • tests/cli/test_sessions_indicator_commands.py (added, +124/-0)
RAW_BUFFERClick to expand / collapse

Bug Description

Two slash commands registered in COMMAND_REGISTRY (hermes_cli/commands.py) have no handler in cli.py's process_command(), making them silently fail in non-TUI CLI mode.

Affected Commands

CommandDescriptionBroken in
/sessionsBrowse and resume previous sessionsCLI (all modes — had no handler at all)
/indicatorPick the TUI busy-indicator style (kaomoji/emoji/unicode/ascii)CLI (non-TUI — works in TUI via frontend RPC)

Steps to Reproduce

  1. Run hermes (without --tui)
  2. Type /sessions — nothing happens
  3. Type /indicator kaomoji — nothing happens

Expected Behavior

  • /sessions should list recent sessions with titles, previews, timestamps, and IDs
  • /indicator should show/update the busy-indicator style

Root Cause

Both commands are defined in COMMAND_REGISTRY but process_command() has no elif canonical == "sessions": or elif canonical == "indicator": dispatch branch. The existing _show_recent_sessions() helper in cli.py already does all the work for sessions — it just needs a caller. For indicator, the config write path (save_config_value("display.tui_status_indicator", ...)) is straightforward and mirrors the TUI gateway's config.set handler in tui_gateway/server.py.

Environment

  • Hermes version: main branch (May 2026)
  • OS: Linux (WSL2 on Windows 11)
  • Python: 3.11+

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