The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(cli): /s as a one-letter alias for /steer
Brooklyn Nicholsona0ec0d286f1f
diff --git a/apps/desktop/src/lib/desktop-slash-registry.json b/apps/desktop/src/lib/desktop-slash-registry.jsonindex 796af8cabfe..9c941cb23b9 100644--- a/apps/desktop/src/lib/desktop-slash-registry.json+++ b/apps/desktop/src/lib/desktop-slash-registry.json@@ -88,6 +88,7 @@"/retry": null,"/review": null,"/rollback": null,+ "/s": null,"/save": null,"/sb": "terminal","/sessions": null,diff --git a/hermes_cli/commands.py b/hermes_cli/commands.pyindex cfe1d07566e..b359c28bfe6 100644--- a/hermes_cli/commands.py+++ b/hermes_cli/commands.py@@ -113,7 +113,7 @@ COMMAND_REGISTRY: list[CommandDef] = [subcommands=("list", "edit", "rm", "move", "clear", "add"),busy_policy="dispatch", busy_handler="queue"),CommandDef("steer", "Inject a message after the next tool call without interrupting", "Session",- args_hint="<prompt>", busy_policy="dispatch", busy_handler="steer"),+ aliases=("s",), args_hint="<prompt>", busy_policy="dispatch", busy_handler="steer"),CommandDef("goal", "Set a standing goal Hermes works on across turns until achieved", "Session",args_hint="[text | draft <text> | show | gate add <cmd> | pause | resume | clear | status | wait <pid> | unwait]",argument_mode="mixed", busy_policy="dispatch", busy_handler="goal"),@@ -392,7 +392,7 @@ for _cmd in COMMAND_REGISTRY:HELP_SESSION_SUBGROUPS: dict[str, tuple[str, ...]] = {"Context": ("compress", "compact", "context", "ctx", "status"),"Background & Automation": (- "bg", "btw", "agents", "tasks", "queue", "q", "steer", "goal", "subgoal", "heartbeat", "hb",+ "bg", "btw", "agents", "tasks", "queue", "q", "steer", "s", "goal", "subgoal", "heartbeat", "hb","refine", "loop", "proactive", "moa", "journey", "learning", "memory-graph")}# All names + aliases the gateway dispatches. Config-gated commands arediff --git a/tests/e2e/test_platform_commands.py b/tests/e2e/test_platform_commands.pyindex 30f2b12b78b..dc209d113de 100644--- a/tests/e2e/test_platform_commands.py+++ b/tests/e2e/test_platform_commands.py@@ -93,8 +93,11 @@ class TestSlashCommands:self, adapter, runner, platform):"""Alias targets with args must reach the built-in command handler."""+ # Key must not collide with a registry command or alias: built-ins keep+ # precedence over quick commands (see _hm_resolve_command), so a key like+ # "s" (the /steer alias) would never reach the quick-command expansion.runner.config.quick_commands = {- "s": {"type": "alias", "target": "/status extra-arg"}+ "x": {"type": "alias", "target": "/status extra-arg"}}async def _handle_status(event):assert event.get_command_args() == "extra-arg"@@ -102,7 +105,7 @@ class TestSlashCommands:runner._handle_status_command = AsyncMock(side_effect=_handle_status)- send = await send_and_capture(adapter, "/s", platform)+ send = await send_and_capture(adapter, "/x", platform)send.assert_called_once()response_text = send.call_args[1].get("content") or send.call_args[0][1]diff --git a/tests/hermes_cli/test_commands.py b/tests/hermes_cli/test_commands.pyindex 42ed9d8a5f2..5afbcace506 100644--- a/tests/hermes_cli/test_commands.py+++ b/tests/hermes_cli/test_commands.py@@ -52,6 +52,24 @@ class TestCommandRegistry:# resolve_command tests# ---------------------------------------------------------------------------+class TestResolveCommandAliases:+ """One-letter aliases resolve to their command, never a longer canonical+ (exact lookup treats the alias as a full name — /s is not a /sessions prefix)."""++ def test_q_resolves_to_queue(self):+ cmd = resolve_command("q")+ assert cmd is not None and cmd.name == "queue"++ def test_s_resolves_to_steer(self):+ cmd = resolve_command("s")+ assert cmd is not None and cmd.name == "steer"++ def test_exact_names_still_win_over_the_alias(self):+ cmd = resolve_command("sessions")+ assert cmd is not None and cmd.name == "sessions"+ cmd = resolve_command("steer")+ assert cmd is not None and cmd.name == "steer"+# ---------------------------------------------------------------------------diff --git a/ui-tui/src/__tests__/slashParity.test.ts b/ui-tui/src/__tests__/slashParity.test.tsindex ef08c19fa41..1281d6bb035 100644--- a/ui-tui/src/__tests__/slashParity.test.ts+++ b/ui-tui/src/__tests__/slashParity.test.ts@@ -112,6 +112,14 @@ describe('slash parity matrix', () => {expect(cmd, '/q must resolve to a command').toBeDefined()expect(cmd!.name).toBe('queue')})++ it('/s alias resolves to steer, not sessions or a TUI-local command (#119176)', () => {+ // Same one-letter pattern as /q: the TUI-local registry must not shadow+ // the backend alias with a prefix command (/sessions) or its own binding.+ const cmd = findSlashCommand('s')+ expect(cmd, '/s must resolve to a command').toBeDefined()+ expect(cmd!.name).toBe('steer')+ })})describe('parseSlashCommand argument fidelity', () => {diff --git a/ui-tui/src/app/slash/commands/core.ts b/ui-tui/src/app/slash/commands/core.tsindex 1f4d6a3b8ed..65b7f50bd2b 100644--- a/ui-tui/src/app/slash/commands/core.ts+++ b/ui-tui/src/app/slash/commands/core.ts@@ -683,6 +683,7 @@ export const coreCommands: SlashCommand[] = [},{+ aliases: ['s'],help: 'inject a message after the next tool call (no interrupt)',name: 'steer',run: (arg, ctx) => {