hermes - 💡(How to fix) Fix CLI/TUI: /whoami shows in autocomplete but prints '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…

Root Cause

In cli.py process_command() (~L8391), the elif chain dispatches ~60+ commands by canonical name but whoami is not among them.

When /whoami is typed, it falls through all elif canonical == "..." branches into the else: block, hits the prefix-matching logic at L8854-8893, finds whoami in the COMMANDS set as an exact match, and prints "Unknown command: /whoami".

The command definition at hermes_cli/commands.py:112:

CommandDef("whoami", "Show your slash command access (admin / user)", "Info"),

No cli_only=True or gateway_only=True — so it should work everywhere, but only the gateway handler exists.

Fix Action

Fix / Workaround

In cli.py process_command() (~L8391), the elif chain dispatches ~60+ commands by canonical name but whoami is not among them.

Code Example

CommandDef("whoami", "Show your slash command access (admin / user)", "Info"),
RAW_BUFFERClick to expand / collapse

Bug Description

/whoami is registered in COMMAND_REGISTRY (hermes_cli/commands.py) so it appears in tab-completion autocomplete, but executing it in the CLI or TUI prints "Unknown command" instead of displaying slash command access info.

The messaging gateway (gateway/run.py) has a working _handle_whoami_command() handler, but the CLI/TUI path is missing.

Steps to Reproduce

  1. Open Hermes CLI or TUI
  2. Type /whoami and press Enter
  3. See: Unknown command: /whoami

Root Cause

In cli.py process_command() (~L8391), the elif chain dispatches ~60+ commands by canonical name but whoami is not among them.

When /whoami is typed, it falls through all elif canonical == "..." branches into the else: block, hits the prefix-matching logic at L8854-8893, finds whoami in the COMMANDS set as an exact match, and prints "Unknown command: /whoami".

The command definition at hermes_cli/commands.py:112:

CommandDef("whoami", "Show your slash command access (admin / user)", "Info"),

No cli_only=True or gateway_only=True — so it should work everywhere, but only the gateway handler exists.

Expected Behavior

/whoami should display something like:

  • For admin users: the current access tier + available commands
  • For non-admin users: their restricted command list

(Similar to gateway/run.py _handle_whoami_command() at L9806.)

Environment

  • OS: macOS
  • Hermes Agent (latest from main)
  • CLI/TUI mode affected; gateway (Telegram/Discord) works fine

Possible Fix

Add a elif canonical == "whoami": branch in cli.py process_command() that calls a new _handle_whoami_command() implementation for the CLI context.

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

hermes - 💡(How to fix) Fix CLI/TUI: /whoami shows in autocomplete but prints 'Unknown command'