Skip to content

fix(cli): wire /whoami slash command in classic CLI - #26047

Closed
kronexoi wants to merge 1 commit into
NousResearch:mainfrom
kronexoi:fix/cli-whoami-dispatch
Closed

kronexoi wants to merge 1 commit into
NousResearch:mainfrom
kronexoi:fix/cli-whoami-dispatch

Conversation

@kronexoi

Copy link
Copy Markdown
Contributor

Summary

Classic CLI help and completion surfaced /whoami from the shared command registry,
but HermesCLI.process_command() had no dispatch branch for it.

This change wires /whoami into the classic CLI and adds regression coverage so it
no longer falls through to Unknown command.

What changed

  • added a small classic-CLI /whoami handler in cli.py
  • routed canonical == "whoami" through the main slash-command dispatcher
  • added a regression test in tests/cli/test_cli_init.py

User impact

Before:

  • /whoami appeared to exist in classic CLI surfaces
  • running it printed Unknown command: /whoami

After:

  • /whoami prints local CLI access info as expected

Testing

Passed:

  • pytest tests/cli/test_cli_init.py -k whoami

Environment:

  • pytest completed successfully with exit code 0

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for isolating the classic-CLI dispatch gap. The premise is still valid on current main: /whoami is registered in hermes_cli/commands.py:121, while cli.py:8465-8469 handles /help and /profile but has no /whoami branch; exact registered commands then reach the Unknown command fallback at cli.py:9073-9076.

Problems

  • Current main extracted slash-command handlers into CLICommandsMixin (0904bc7e; cli.py:3675). The adjacent /profile handler now lives at hermes_cli/cli_commands_mixin.py:505, so adding the new handler back to cli.py would bypass the current command organization.

Suggested changes

  • Retain the dispatcher branch in cli.py, but place _handle_whoami_command() in hermes_cli/cli_commands_mixin.py beside _handle_profile_command().

Automated hermes-sweeper review.

@teknium1

Copy link
Copy Markdown
Collaborator

Merged via PR #90381 — your commit was cherry-picked onto current main with your authorship preserved in git log. Thanks for the fix, and for being the earliest of four independent submissions for this bug!

@teknium1 teknium1 closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants