Skip to content

fix(cli): resolve alias collision for /q between queue and quit#7399

Closed
Dusk1e wants to merge 1 commit into
NousResearch:mainfrom
Dusk1e:fix/cli-alias-collision-q
Closed

fix(cli): resolve alias collision for /q between queue and quit#7399
Dusk1e wants to merge 1 commit into
NousResearch:mainfrom
Dusk1e:fix/cli-alias-collision-q

Conversation

@Dusk1e

@Dusk1e Dusk1e commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixed a CLI dispatch bug where the /q alias was registered for both queue and quit commands. Due to the command registry's "last-writer-wins" behavior, /q was incorrectly resolving to quit instead of queue.

Problem

When a user attempted to queue a message using /q <message>, the application would immediately trigger the quit command and exit, leading to potential data loss and a broken user experience.

Changes

  • hermes_cli/commands.py: Removed the q alias from the quit command, leaving it exclusively for queue.
  • cli.py: Updated the dispatch logic to ensure compatibility with the alias change.
  • tests/cli/test_cli_init.py: Added a regression test to verify that /q correctly dispatches to the queue logic.
  • tests/hermes_cli/test_commands.py: Updated alias expectations to match the new command registry state.

Verification

  • Verified that /q now properly queues messages instead of exiting.
  • Regression tests passed: tests/cli/test_cli_init.py and tests/hermes_cli/test_commands.py (131 passed in total).

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for this fix, @Dusk1e — you correctly identified the alias collision bug!

This is an automated hermes-sweeper review.

The same fix was independently authored by a maintainer and merged to main on April 15, 2026 — five days after you opened this PR:

Your diagnosis was exactly right. Closing as already implemented on main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants