hermes - ✅(Solved) Fix [Bug]: TUI /q alias incorrectly mapped to quit instead of queue [2 pull requests, 4 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#18927Fetched 2026-05-03 04:53:32
View on GitHub
Comments
4
Participants
2
Timeline
17
Reactions
0
Timeline (top)
commented ×4labeled ×4cross-referenced ×2mentioned ×2

Root Cause

ui-tui/src/app/slash/commands/core.ts has two incorrect entries:

  1. Line ~85 — the quit command definition includes aliases: ['exit', 'q']. The q alias should not be here.
  2. Line ~469 — the queue command definition has no aliases, so q is not recognized as a queue shorthand.

This is inconsistent with every other slash-command surface:

Surfacequit aliasesqueue aliases
Central registry (hermes_cli/commands.py)exitq
CLI (cli.py)exitq
Gateway (gateway/run.py)exitq
Documentation (slash-commands.md)exitq
TUI (ui-tui)exit, q (wrong)none (wrong)

Fix Action

Fixed

PR fix notes

PR #18928: fix(tui): move /q alias from quit to queue

Description (problem / solution / changelog)

Summary

This PR fixes the TUI (hermes --tui) frontend where the /q alias was incorrectly attached to the quit command instead of the queue command. It is a single-file, two-line fix in ui-tui/src/app/slash/commands/core.ts.

Problem

Typing /q <prompt> in the TUI immediately exits the application because the quit command definition includes q in its alias list (aliases: ['exit', 'q']). The queue command has no aliases, so q is not recognized as a shorthand for queue at all.

This contradicts the canonical definition in the central COMMAND_REGISTRY (hermes_cli/commands.py) and the documentation (website/docs/reference/slash-commands.md), both of which list q exclusively as an alias for queue.

Changes Made

FileBeforeAfter
ui-tui/src/app/slash/commands/core.ts (quit)aliases: ['exit', 'q']aliases: ['exit']
ui-tui/src/app/slash/commands/core.ts (queue)(no aliases)aliases: ['q']

No changes are needed in Python, gateway, CLI, or documentation — the central registry and docs are already correct.

How to Test

  1. Start hermes --tui
  2. Type /q hello and press Enter
  3. ✅ The session should enqueue the message and stay alive
  4. Type /queue — it should report the queued message count
  5. Type /quit or /exit — it should exit normally

Test Results

  • Python tests (tests/tui_gateway/test_protocol.py): 65 passed (including existing queue dispatch tests)
  • TUI tests (vitest run):
    • slashParity.test.ts: 2 passed
    • createSlashHandler.test.ts: 44 passed (slash command registration + routing)
  • TypeScript type-check (tsc --noEmit): ✅ clean

Remaining vitest failures (terminalSetup, wheelAccel, etc.) are pre-existing (missing hermes-ink build bundle + SSH short-circuit) and unrelated to this change.

Scope & Compatibility

  • Only affects the TUI frontend (ui-tui/)
  • Does not change CLI, gateway, Python backend, or any other surface behavior
  • Non-breaking — users of /quit, /exit, /queue, and /q via non-TUI surfaces already work correctly

Checklist

  • Read the Contributing Guide
  • Commit message follows Conventional Commits
  • Searched existing PRs — no duplicate found
  • PR contains only the fix (no unrelated commits)
  • Ran pytest tests/tui_gateway/test_protocol.py — all passed
  • Ran vitest for slash-command tests — all passed
  • Ran tsc --noEmit — clean type check
  • Manually tested on Fedora 41: /q queues, /quit exits
  • No documentation or config changes required

Related Issue

Fixes #18927

Changed files

  • ui-tui/src/app/slash/commands/core.ts (modified, +2/-1)

PR #18941: fix(tui): remap /q alias from quit to queue (#18927)

Description (problem / solution / changelog)

Problem

Fixes #18927: In the TUI, /q is incorrectly mapped to the quit command instead of queue. Typing /q hello unexpectedly exits the application instead of enqueueing the message.

This is inconsistent with every other slash-command surface (CLI, gateway, documentation) where /q maps to queue.

Fix

In ui-tui/src/app/slash/commands/core.ts:

  1. Remove 'q' from the quit command aliases (line 85): ['exit', 'q']['exit']
  2. Add aliases: ['q'] to the queue command definition (line 468)

This brings the TUI into alignment with the central COMMAND_REGISTRY and all other surfaces.

Testing

  • Manual verification: the TypeScript changes are minimal and directly address the alias mapping
  • No other command surfaces affected — this is TUI-frontend only

References

Surfacequit aliasesqueue aliases
Central registry (commands.py)exitq
CLI (cli.py)exitq
Gateway (gateway/run.py)exitq
Documentationexitq
TUI (before this fix)exit, q (wrong)none (wrong)
TUI (after this fix)exitq

Changed files

  • ui-tui/src/app/slash/commands/core.ts (modified, +2/-1)
RAW_BUFFERClick to expand / collapse

Bug Description

In the TUI (hermes --tui), the slash-command alias /q is incorrectly resolved to the quit command instead of the queue command. As a result, typing /q <prompt> unexpectedly exits the application rather than enqueueing the prompt for the next agent turn.

The central COMMAND_REGISTRY in hermes_cli/commands.py and the public documentation both define q as an alias for queue, so the TUI frontend is the only surface where this mapping is wrong.

Steps to Reproduce

  1. Launch the TUI: hermes --tui
  2. Type /q hello and press Enter
  3. Observe that the TUI immediately exits (Hermes dies)

Expected Behavior

/q should behave identically to /queue <prompt> — enqueue the message for processing on the next turn without exiting.

Actual Behavior

/q triggers the quit command because the TUI hardcodes q as a quit alias.

Affected Component

  • TUI (ui-tui/, tui_gateway/)

Root Cause Analysis

ui-tui/src/app/slash/commands/core.ts has two incorrect entries:

  1. Line ~85 — the quit command definition includes aliases: ['exit', 'q']. The q alias should not be here.
  2. Line ~469 — the queue command definition has no aliases, so q is not recognized as a queue shorthand.

This is inconsistent with every other slash-command surface:

Surfacequit aliasesqueue aliases
Central registry (hermes_cli/commands.py)exitq
CLI (cli.py)exitq
Gateway (gateway/run.py)exitq
Documentation (slash-commands.md)exitq
TUI (ui-tui)exit, q (wrong)none (wrong)

Proposed Fix

In ui-tui/src/app/slash/commands/core.ts:

  • Remove 'q' from the quit command aliases.
  • Add aliases: ['q'] to the queue command definition.

This is a minimal, non-breaking fix that only affects the TUI frontend and brings it into line with the canonical registry.

extent analysis

TL;DR

Update the ui-tui/src/app/slash/commands/core.ts file to correct the alias mappings for quit and queue commands.

Guidance

  • Verify the current alias mappings in ui-tui/src/app/slash/commands/core.ts to confirm the inconsistency.
  • Remove the 'q' alias from the quit command definition (line ~85) to prevent it from triggering the quit command.
  • Add aliases: ['q'] to the queue command definition (line ~469) to enable the /q shorthand for queueing prompts.
  • Test the TUI with the updated alias mappings to ensure /q behaves as expected.

Example

// Corrected quit command definition
{
  name: 'quit',
  aliases: ['exit'],
  // ...
}

// Corrected queue command definition
{
  name: 'queue',
  aliases: ['q'],
  // ...
}

Notes

This fix only affects the TUI frontend and does not modify the central command registry or other surfaces.

Recommendation

Apply the proposed workaround by updating the ui-tui/src/app/slash/commands/core.ts file, as it is a minimal and non-breaking fix that brings the TUI into line with the canonical registry.

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