Slash Commands as a Parallel Control Channel

+15 Mana ✨

Introduction

The Hermes input prompt accepts two kinds of text. If your message starts with a forward slash, the CLI treats it as a command and handles it locally. Anything else is sent to the model as a normal conversation turn. This split (commands vs. chat) is the most important design decision in the Hermes UI, because it puts state changes on a separate channel from work requests.

Key Concepts

  • Chat channel: Plain text. Goes to the model. Counts against your context window.
  • Command channel: Text starting with /. Handled by the CLI. Free, instant, deterministic.
  • Channel separation: The agent never has to interpret "please switch to claude-opus" because /model anthropic/claude-opus bypasses it entirely.

Real World Context

A user without channel awareness asks the agent in chat: "can you switch to a cheaper model?" The model spends tokens explaining that it cannot change itself, then suggests the user run a command. The same user, with channel awareness, types /model openai/gpt-4o-mini and the swap happens in a single keystroke. The first interaction cost dollars; the second cost nothing.

Deep Dive

When you hit Enter, the CLI inspects the first character of your input. A leading / triggers the command path: the CLI parses the rest, executes it locally (or sends it to a built-in handler), and returns without ever calling the model. Anything else triggers the chat path: the input is added to the conversation, sent to the provider, and a streamed response comes back.

text
Your input
      │
      ├─ starts with "/" ──► CLI command handler  (no model call, no tokens)
      │
      └─ anything else  ──► model API call         (tokens, latency, cost)

The separation has three concrete benefits:

Cost. State changes are common (/model, /personality, /compress). Routing them through the model would burn tokens on questions the CLI already knows how to answer.

Determinism. A slash command always does exactly what its docs say. A natural-language request "please be more concise" is a guess about what the model will do. The command channel removes the guessing.

Latency. Commands feel instant. A /model switch returns in milliseconds. A chat turn takes seconds at minimum.

This design is why Hermes ships dozens of slash commands and tab-completion for them. The command channel is meant to be used heavily, not just in emergencies. Power users issue several slash commands per session and barely think about it.

Common Pitfalls

  1. Asking the agent to change its own state: "Please use a cheaper model" is a chat request the model cannot fulfill. The right move is /model. The chat channel is for asking the agent to do things in the world, not to itself.
  2. Treating commands as a niche feature: Some users only learn /help and stop there. The command channel is meant for daily use; learning the categories pays back quickly.

Best Practices

  1. Reach for / first when changing agent state: Model, tools, personality, reasoning, busy mode. These are all commands, not conversations.
  2. Reach for chat when asking the agent to do work: "Refactor this function" is chat. "Switch to the model that is better at refactoring" is /model.

Summary

  • Hermes has two input channels: chat (to the model) and commands (handled locally).
  • Commands are triggered by a leading / and never reach the model.
  • The separation saves tokens, removes ambiguity, and is near-instant.
  • The rule of thumb: change-the-agent goes to commands; do-the-work goes to chat.

Code Examples

text
# Two ways to change the model, only one of them is right

> Please switch to a cheaper model for this task        ← chat: costs tokens, model can't act on it
> /model openai/gpt-4o-mini                              ← command: zero tokens, instant, deterministic

# The same pattern for personality, tools, reasoning, compression, busy mode...
✓ Completed