Skip to content

TUI: /q alias resolves to /quit instead of /queue #31983

@alt-glitch

Description

@alt-glitch

Summary

In the TUI, typing /q exits Hermes instead of queuing a prompt for the next turn.

Root Cause

Alias collision between two slash command registrations:

  • Python side (hermes_cli/commands.py:101-102): /queue has alias q
  • TUI side (ui-tui/src/app/slash/commands/core.ts:112-116): /quit has alias q

TUI local commands are dispatched before reaching the Python backend, so /q always resolves to /quitctx.session.die().

Expected Behavior

/q some follow-up prompt should queue the prompt for the next turn (matching the Python-side /queue alias), not exit the TUI.

Suggested Fix

Remove q from the aliases array on the /quit command in ui-tui/src/app/slash/commands/core.ts. /quit and /exit are explicit enough for exiting. This would let /q fall through to the Python backend where it correctly maps to /queue.

Relevant Code

// ui-tui/src/app/slash/commands/core.ts:112-116
{
    aliases: ['exit', 'q'],  // <-- q should be removed
    help: 'exit hermes',
    name: 'quit',
    run: (_arg, ctx) => ctx.session.die()
},
# hermes_cli/commands.py:101-102
CommandDef("queue", "Queue a prompt for the next turn (doesn't interrupt)", "Session",
           aliases=("q",), args_hint="<prompt>"),

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/tuiTerminal UI (ui-tui/ + tui_gateway/)duplicateThis issue or pull request already existstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions