Slash Commands, Directives, and Inline Shortcuts Reference

Reference for all slash commands, directives, and inline shortcuts in the Gateway, including configuration, routing, and per-surface behavior. Essential for operators and developers managing ACP sessions.

Read this when

  • Using or configuring chat commands
  • Debugging command routing or permissions
  • Understanding how skill commands are registered

The Gateway intercepts messages that begin with / when they are sent as standalone content. For host-level bash execution, ! <cmd> is used, with /bash <cmd> serving as a shorthand alias.

When a conversation is linked to an ACP session, ordinary text gets forwarded to the ACP harness. Gateway management commands, however, are processed locally: /acp ... always hits the OpenClaw command handler, while /status and /unfocus remain on-device whenever command handling is active for that surface.

Three command types

  • Commands, Standalone /... messages that the Gateway processes. They must appear as the sole content of a message.

  • Directives, /think, /fast, /verbose, /trace, /reasoning, /elevated, /exec, /model, /queue, removed from the message prior to model exposure. When sent alone, they save session settings; when combined with other text, they function as inline hints.

  • Inline shortcuts, /help, /commands, /status, /whoami, execute instantly and are removed before the model sees the remaining content. Restricted to authorized senders.

Directive behavior details

  • Directives get stripped from the message before the model sees it.
  • In directive-only messages (where directives are the entire content), they save to the session and return an acknowledgment.
  • In normal chat messages that include other text, they serve as inline hints and do not save session settings. Model selection breaks this rule: an authorized inline /model or a configured /<alias> persists the session selection, and an owner/admin choice without -s can also trigger a configured-default update.
  • Directives work only for authorized senders. When commands.allowFrom is defined, it becomes the sole allowlist; otherwise, authorization derives from channel allowlists, pairing, and always-on access-group enforcement. Unauthorized senders see directives interpreted as regular text.

Configuration

{
  commands: {
    native: "auto",
    nativeSkills: "auto",
    text: true,
    bash: false,
    bashForegroundMs: 2000,
    config: false,
    mcp: false,
    plugins: false,
    debug: false,
    restart: true,
    ownerAllowFrom: ["discord:123456789012345678"],
    ownerDisplay: "raw",
    ownerDisplaySecret: "${OWNER_ID_HASH_SECRET}",
    allowFrom: {
      "*": ["user1"],
      discord: ["user:123"],
    },
    useAccessGroups: true,
  },
}
  • commands.text (boolean, default: true), Controls parsing of /... in chat messages. On surfaces lacking native commands (WhatsApp, WebChat, Signal, iMessage, Google Chat, Microsoft Teams), text commands function even when set to false.

  • commands.native (boolean | "auto", default: auto), Handles native command registration. Auto: enabled for Discord/Telegram; disabled for Slack; skipped for providers without native support. Per-channel override via channels.<provider>.commands.native. On Discord, false bypasses slash-command registration; previously registered commands might remain visible until removed.

  • commands.nativeSkills (boolean | "auto", default: auto), Manages native registration of skill commands when supported. Auto: enabled for Discord/Telegram; disabled for Slack. Override with channels.<provider>.commands.nativeSkills.

  • commands.bash (boolean, default: false), Permits ! <cmd> to execute host shell commands (/bash <cmd> alias). Needs tools.elevated allowlists.

  • commands.bashForegroundMs (number, default: 2000), Duration bash waits before shifting to background mode (0 backgrounds right away).

  • commands.config (boolean, default: false), Activates /config (reads/writes openclaw.json). Owner-only.

  • commands.mcp (boolean, default: false), Activates /mcp (reads/writes OpenClaw-managed MCP config under mcp.servers). Owner-only.

  • commands.plugins (boolean, default: false), Activates /plugins (plugin discovery/status plus install and enable/disable). Owner-only for writes.

  • commands.debug (boolean, default: false), Activates /debug (runtime-only config overrides). Owner-only.

  • commands.restart (boolean, default: true), Activates /restart and external SIGUSR1 restart requests.

  • commands.ownerAllowFrom (string[]), Explicit owner allowlist for owner-only command surfaces. Distinct from commands.allowFrom and DM pairing access.

  • true, Per-channel enforcement that owner-only commands demand an owner identity. With true active, the sender must match commands.ownerAllowFrom or carry internal operator.admin scope. A wildcard allowFrom entry alone is not enough.

  • commands.ownerDisplay (raw" | "hash), Determines how owner identifiers are displayed within the system prompt.

  • commands.ownerDisplaySecret (string), HMAC secret applied when commands.ownerDisplay: "hash" is in effect.

  • commands.allowFrom (object), Per-provider allowlist governing command authorization. Once set, it becomes the sole source of authorization for commands and directives. Use "*" to establish a global default; provider-specific entries take precedence over it.

Command list

Three origins supply commands:

  • Core built-ins: src/auto-reply/commands-registry.shared.ts
  • Generated dock commands: src/auto-reply/commands-registry.data.ts
  • Plugin commands: plugin registerCommand() invocations

Whether a command is available hinges on config flags, the channel surface, and which plugins are installed and enabled.

Core commands

Sessions and runs

CommandDescription
/new [model]Archive the active session and launch a new one
/reset [soft [message]]Reset the active session in place. soft preserves the transcript, clears reused CLI backend session ids, and re-executes startup
/name <title>Assign or change the session's name. Leaving out the title displays the current name plus a suggestion
/compact [instructions]Reduce the session context. Refer to Compaction
/stopStop the ongoing run
/session idle <duration|off>Handle thread-binding idle expiry settings
/session max-age <duration|off>Handle thread-binding max-age expiry settings
/export-session [path]Owner-only. Output the active session as HTML within the workspace. Also known as: /export
/export-trajectory [path]Produce a JSONL trajectory bundle for the active session. Also known as: /trajectory

Explicit /export-session paths overwrite existing files inside the workspace. When the path is omitted, a collision-safe filename is generated.

Note

Control UI intercepts typed /new to spawn and switch to a fresh dashboard session, unless session.dmScope: "main" is set and the current parent equals the agent's main session, in which case /new resets the main session in place. Typed /reset continues to trigger the Gateway's in-place reset. Use /model default to clear a pinned session model selection.

Model and run controls

CommandDescription
/think <level|default>Configure the thinking level or remove the session override. Synonyms: /thinking, /t
/verbose on|off|fullSwitch verbose output on or off. Synonym: /v
/trace on|offSwitch plugin trace output for the current session on or off
/fast [status|auto|on|off|default]Display, set, or clear fast mode
/reasoning [on|off|stream]Switch reasoning visibility on or off. Synonym: /reason
/elevated [on|off|ask|full]Switch elevated mode on or off. Synonym: /elev
/exec host=<auto|sandbox|gateway|node> security=<deny|allowlist|full> ask=<off|on-miss|always> node=<id>Display or configure exec defaults
/login [codex|openai|openai-codex]Link Codex/OpenAI login from a private chat or Web UI session. Restricted to owners and admins
/model [name|#|status] [-s|--session]Display or pick a model. Direct owner/admin choices request a configured-default update; -s affects only this session
/models [provider] [page] [limit=<n>|all]Enumerate configured or auth-available providers and models
/queue <mode>Control active-run queue behavior. See Queue and Queue steering
/steer <message>Feed guidance into the active run. Synonym: /tell. See Steer

verbose / trace / fast / reasoning safety

  • /verbose exists for troubleshooting purposes, so leave it off during regular operation.
  • /trace exposes only debug and trace lines tied to plugins; routine verbose output remains hidden.
  • /fast auto|on|off saves an override for the session, which you can remove through the Sessions UI using the inherit option.
  • /fast depends on the provider: OpenAI and Codex translate it to service_tier=priority, while direct Anthropic calls map it to service_tier=auto or standard_only.
  • In group contexts, /reasoning, /verbose, and /trace carry risk because they can expose internal reasoning or plugin diagnostics. Keep them disabled for group chats.

Model switching details

One-sentence scope: when an owner or admin runs /model <model>, both the session and a best-effort configured-default update are affected; -s touches only the session. If an agent inherits agents.defaults.model, the shared global fallback becomes the target of the update.

Configured /<alias> shortcuts accept the same trailing options, --runtime, -s, and --session, as /model <alias> does.

GoalCommandEffect
Request a configured-default change/model <model> as owner/adminThis session is modified, and a best-effort update of the agent's effective configured default begins. Without an explicit primary, the shared agents.defaults.model fallback is the target
Change only this session/model <model> -s (or --session)Only this session changes; configured defaults stay untouched
Use the configured default again/model default (with or without -s)The session's model selection is cleared so it re-inherits the current configured default; compatible auth pins remain, incompatible ones are removed

A non-owner /model <model> choice is likewise session-only, since writing configured defaults is not possible. Immutable configuration remains as is, and failed async writes are logged without rolling back the session selection. Explicit user model or profile pins that are valid survive /new, /reset, session rollover, compaction, and cooldown windows; automatic profile pins may rotate or clear. Resetting via /model default -s clears the session model selection, keeps a compatible auth pin, and drops an incompatible one. It does not restore a configured default that an earlier owner or admin selection replaced.

  • When the agent sits idle, the next run picks it up immediately.
  • If a run is in progress, the switch is queued as pending and applies at the next clean retry point.

Discovery and status

CommandDescription
/helpDisplay the brief help summary
/commandsDisplay the generated command catalog
/tools [compact|verbose]Display what the current agent can use at this moment
/statusDisplay execution and runtime status, Gateway and system uptime, plugin health, plus provider usage and quota
/status pluginsDisplay detailed plugin health: load errors, quarantines, channel plugin failures, dependency issues, compatibility notices. commands.plugins: true is required
/goal [status|start|edit|pause|resume|complete|block|clear] ...Handle the current session's durable goal
/diagnostics [note]Owner-only support-report flow. Asks for exec approval on every run
/openclaw <request>Launch the OpenClaw setup and repair helper from an owner DM
/tasksList active or recent background tasks for the current session
/context [list|detail|map|json]Explain how context gets assembled
/whoamiShow your sender id. Alias: /id
/usage off|tokens|full|reset|costManage the per-response usage footer (reset/inherit/clear/default clears the session override to re-inherit the configured default) or print a local cost summary

Skills, allowlists, approvals

CommandDescription
/skill <name> [input]Invoke a skill using its name
/learn [request]Through Skill Workshop, craft a single reviewable skill from the ongoing chat or specified sources
/loop [interval] <prompt>Restricted to the owner. Replay a prompt in this thread; leave out the interval for self-paced checks
/loop statusRestricted to the owner. Show loops tied to this conversation
/loop stop [name]Restricted to the owner. Halt matching loops connected to this conversation
/allowlist [list|add|remove] ...Handle allowlist entries. Text-only
/approve <id> <decision>Settle exec or plugin approval requests
/btw <question>Pose an off-topic query without altering session context. Alias: /side. Refer to BTW

Subagents and ACP

CommandDescription
/subagents list|log|infoExamine sub-agent executions for the current session
/acp spawn|cancel|steer|close|sessions|status|set-mode|set|cwd|permissions|timeout|model|reset-options|doctor|install|helpHandle ACP sessions and runtime options. Runtime controls demand an external owner or internal Gateway admin identity
/focus <target>Attach the current Discord thread or Telegram topic to a session target
/unfocusDetach the current thread binding
/agentsDisplay thread-bound agents for the current session

Owner-only writes and admin

CommandRequiresDescription
/config show|get|set|unsetcommands.config: trueAccess or modify openclaw.json. Owner-only
/mcp show|get|set|unsetcommands.mcp: trueAccess or modify OpenClaw-managed MCP server config. Owner-only
/plugins list|inspect|show|get|install|enable|disablecommands.plugins: trueView or alter plugin state. Owner-only for writes. Alias: /plugin
/debug show|set|unset|resetcommands.debug: trueRuntime-only config overrides. Owner-only
/restartcommands.restart: true (default)Restart OpenClaw
/send on|off|inheritownerConfigure send policy

Voice, TTS, channel control

CommandDescription
/tts on|off|status|chat|latest|provider|limit|summary|audio|helpManage TTS. See TTS
/activation mention|alwaysDefine group activation mode
/bash <command>Execute a host shell command. Alias: ! <command>. Needs commands.bash: true
!poll [sessionId]Verify a background bash job
!stop [sessionId]Terminate a background bash job

Dock commands

Dock commands redirect the active session's reply route to another linked channel. For setup and troubleshooting, consult Channel docking.

Generated from channel plugins with native-command support:

  • /dock-discord (alias: /dock_discord)
  • /dock-mattermost (alias: /dock_mattermost)
  • /dock-slack (alias: /dock_slack)
  • /dock-telegram (alias: /dock_telegram)

Dock commands need session.identityLinks. The source sender and target peer must belong to the same identity group.

Bundled plugin commands

CommandDescription
/dreaming [on|off|status|help]Toggle memory dreaming (owner or Gateway admin). See Dreaming
/pair [qr|status|pending|approve|cleanup|notify]Manage device pairing. See Pairing
/voice status|list|set <voiceId>Manage Talk voice config. Discord native name: /talkvoice
/card ...Send LINE rich card presets. See LINE
/codex <action> ...Bind, steer, and inspect the Codex app-server harness (status, threads, resume, model, fast, permissions, compact, review, mcp, skills, and more). See Codex harness

QQBot-only: /bot-ping, /bot-version, /bot-help, /bot-upgrade, /bot-logs

Skill commands

Skills that users can invoke are surfaced as slash commands:

  • /skill <name> [input] serves as the universal entrypoint in all cases.
  • A skill can be registered as a direct command, for instance /prose maps to OpenProse.
  • Two settings, commands.nativeSkills and channels.<provider>.commands.nativeSkills, govern native skill-command registration.
  • Command names are cleaned to a-z0-9_ (capped at 32 characters); collisions receive numeric suffixes.

Skill command dispatch

In the default setup, skill commands are forwarded to the model like any ordinary request.

A skill may set command-dispatch: tool to bypass the model and go straight to a tool (deterministic, no model involvement). Example: /prose (OpenProse plugin), see OpenProse.

Native command arguments

On Discord, autocomplete handles dynamic options, and button menus appear when required args are missing. Telegram and Slack present a button menu for commands that have choices. Dynamic choices are resolved against the target session model, so model- specific options like /think levels follow the session's /model override.

/tools: what the agent can use now

/tools responds to a runtime query: what this agent can use right now in this conversation, not a static config catalog.

/tools         # compact view
/tools verbose # with short descriptions

Results are scoped to the session. Output can change if the agent, channel, thread, sender authorization, or model changes. For profile and override editing, use the Control UI Tools panel or config surfaces.

/loop: recurring conversation work

/loop is restricted to owners because it relies on the cron control-plane tool. /loop 5m check deploy status prompts the agent to set up a fixed-cadence cron job in the current conversation. Without an interval, /loop watch for new issues starts a self-paced loop that checks more frequently while active and backs off toward 1 hour while quiet. /loop status shows the conversation's loop jobs; /loop stop [name] removes them.

/model: model selection

A direct owner/admin /model <model> request applies default scope: it modifies this session and kicks off a best-effort configured-default update. Adding -s switches to session scope: only this session is affected. For agents lacking an explicit primary model, the update target is the shared global agents.defaults.model fallback.

/model             # show model picker
/model list        # same
/model 3           # select by number from picker
/model openai/gpt-5.4    # direct owner/admin: session + default update request
/model openai/gpt-5.4 -s # this session only; configured default unchanged
/model default -s        # clear this session's model selection; use configured default
/model opus@anthropic:default -s # pin this profile for the current session
/model default     # same reset; does not restore an older configured default
/model status      # detailed view with endpoint and API mode

On Discord, /model and /models launch an interactive picker with provider and model dropdowns and follow the direct command flow. Owner/admin submissions request a best-effort configured-default update. Telegram callback-picker selections are session-only. The picker respects agents.defaults.modelPolicy.allow, including provider/* entries. Without an explicit allowlist, model entries and aliases do not restrict selection.

/config: on-disk config writes

Note

Owner-only. Disabled by default, enable with commands.config: true.

/config show
/config show channels.whatsapp.responsePrefix
/config get channels.whatsapp.responsePrefix
/config set channels.whatsapp.responsePrefix="[openclaw]"
/config unset channels.whatsapp.responsePrefix

Config is validated before write. Invalid changes are rejected. /config updates persist across restarts.

/mcp: MCP server config

Note

Owner-only. Disabled by default, enable with commands.mcp: true.

/mcp show
/mcp show context7
/mcp set context7={"command":"uvx","args":["context7-mcp"]}
/mcp unset context7

/mcp stores config in OpenClaw config, not embedded-agent project settings. /mcp show redacts credential-bearing fields, recognized credential flag values, and known secret-shaped arguments. When run from a group, the configuration is sent to the owner privately; if no private owner route is available, the command fails closed and asks the owner to retry from a direct chat.

/debug: runtime-only overrides

Note

Owner-only. Disabled by default, enable with commands.debug: true. Overrides apply immediately to new config reads but do not write to disk.

/debug show
/debug set channels.whatsapp.responsePrefix="[openclaw]"
/debug set channels.whatsapp.allowFrom=["+1555","+4477"]
/debug unset channels.whatsapp.responsePrefix
/debug reset

/plugins: plugin management

Note

Owner-only for writes. Disabled by default, enable with commands.plugins: true.

/plugins
/plugins list
/plugin show context7
/plugins enable context7
/plugins disable context7
/plugins install clawhub:<package>
/plugins install npm:@openclaw/<official-package>
/plugins install npm:<package> --force
/plugins install git:<repository>@<ref> --force

/plugins enable|disable refreshes plugin configuration and triggers a hot reload of the Gateway plugin runtime when new agent turns begin. Because plugin source modules have changed, /plugins install automatically restarts managed Gateways. Installs from trusted ClawHub and the official catalog proceed without any further confirmation. Sources such as arbitrary npm, git, archives, npm-pack:, and local paths display a provenance warning and need a trailing --force once you have inspected the source. That flag confirms the source and allows an existing install to be replaced; it does not bypass security.installPolicy or the installer's security checks. ClawHub releases carrying risk warnings still demand the separate shell-only --acknowledge-clawhub-risk flag. Marketplace, linked, and pinned installs likewise remain shell-only.

/trace: plugin trace output

/trace          # show current trace state
/trace on
/trace off

/trace exposes session-scoped plugin trace and debug lines without enabling full verbose mode. It is not a substitute for /debug (runtime overrides) or /verbose (standard tool output).

/btw: side questions

/btw serves as a brief side inquiry about the current session's context. Its alias is /side.

/btw what are we doing right now?
/side what changed while the main run continued?

Compared to a regular message:

  • The current session supplies the background context.
  • Within Codex harness sessions, it executes as a temporary Codex side thread.
  • Future session context is left untouched.
  • Nothing gets written to the transcript history.

When using the Control UI, /btw and /side open the session rail and invoke its read-only counterpart rather than launching the detached BTW flow. The TUI and external-channel behavior described above stays the same.

Refer to BTW side questions for complete details.

Surface notes

Session scoping per surface

  • Text commands: execute inside the normal chat session (DMs share main, while groups maintain their own session).
  • Native Discord commands: agent:<agentId>:discord:slash:<userId>
  • Native Slack commands: agent:<agentId>:slack:slash:<userId> (the prefix is configurable through channels.slack.slashCommand.sessionPrefix)
  • Native Telegram commands: telegram:slash:<userId> (the chat session is targeted via CommandTargetSessionKey)
  • /login codex delivers device pairing codes exclusively through private chat or Web UI response channels. When invoked from Telegram groups or topics, the owner is asked to DM the bot instead.
  • /stop points at the active chat session to halt the current run.

Slack specifics

channels.slack.slashCommand accommodates a single /openclaw-style command. With commands.native: true, set up one Slack slash command for each built-in command. Register /agentstatus rather than /status, since Slack has reserved /status. Text /status continues to function within Slack messages.

Fast path and inline shortcuts

  • Command-only messages arriving from allowlisted senders get handled right away (bypassing the queue and model).
  • Inline shortcuts (/help, /commands, /status, /whoami) also work when embedded in regular messages and are removed before the model sees the remaining content.
  • Unauthorized command-only messages are quietly dropped; inline /... tokens are interpreted as ordinary text.

Argument notes

  • Commands may include an optional : positioned between the command and its arguments (/think: high, /send: on).
  • /new <model> takes a model alias, provider/model, or a provider name (matched fuzzily); when nothing matches, the text is handled as the message body.
  • /allowlist add|remove needs commands.config: true and respects channel configWrites.

Provider usage and status

  • Provider usage/quota (e.g., "Claude 80% left") appears in /status for the active model provider, provided usage tracking is turned on.
  • Token/cache lines in /status may revert to the most recent transcript usage entry when the live session snapshot lacks detail.
  • Execution vs runtime: /status provides Execution for the effective sandbox path, while Runtime identifies the session runner: OpenClaw Default, OpenAI Codex, a CLI backend, or an ACP backend.
  • Per-response tokens/cost: governed by /usage off|tokens|full.
  • /model status concerns models, authentication, and endpoints, not usage.
  • Skills, The process for registering and restricting skill slash commands.

  • Creating skills, Develop a skill that sets up its own slash command.

  • BTW, Ask off-topic questions without altering session context.

  • Steer, Direct the agent during execution with /steer.

3,655 words · updated Aug 8, 2026