20 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Slash commands: text vs native, config, and supported commands |
|
Slash Commands |
Slash commands
Commands are handled by the Gateway. Most commands must be sent as a standalone message that starts with /.
The host-only bash chat command uses ! <cmd> (with /bash <cmd> as an alias).
There are two related systems:
- Commands: standalone
/...messages. - Directives:
/think,/fast,/verbose,/reasoning,/elevated,/exec,/model,/queue.- Directives are stripped from the message before the model sees it.
- In normal chat messages (not directive-only), they are treated as “inline hints” and do not persist session settings.
- In directive-only messages (the message contains only directives), they persist to the session and reply with an acknowledgement.
- Directives are only applied for authorized senders. If
commands.allowFromis set, it is the only allowlist used; otherwise authorization comes from channel allowlists/pairing pluscommands.useAccessGroups. Unauthorized senders see directives treated as plain text.
There are also a few inline shortcuts (allowlisted/authorized senders only): /help, /commands, /status, /whoami (/id).
They run immediately, are stripped before the model sees the message, and the remaining text continues through the normal flow.
Config
{
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(defaulttrue) enables parsing/...in chat messages.- On surfaces without native commands (WhatsApp/WebChat/Signal/iMessage/Google Chat/Microsoft Teams), text commands still work even if you set this to
false.
- On surfaces without native commands (WhatsApp/WebChat/Signal/iMessage/Google Chat/Microsoft Teams), text commands still work even if you set this to
commands.native(default"auto") registers native commands.- Auto: on for Discord/Telegram; off for Slack (until you add slash commands); ignored for providers without native support.
- Set
channels.discord.commands.native,channels.telegram.commands.native, orchannels.slack.commands.nativeto override per provider (bool or"auto"). falseclears previously registered commands on Discord/Telegram at startup. Slack commands are managed in the Slack app and are not removed automatically.
commands.nativeSkills(default"auto") registers skill commands natively when supported.- Auto: on for Discord/Telegram; off for Slack (Slack requires creating a slash command per skill).
- Set
channels.discord.commands.nativeSkills,channels.telegram.commands.nativeSkills, orchannels.slack.commands.nativeSkillsto override per provider (bool or"auto").
commands.bash(defaultfalse) enables! <cmd>to run host shell commands (/bash <cmd>is an alias; requirestools.elevatedallowlists).commands.bashForegroundMs(default2000) controls how long bash waits before switching to background mode (0backgrounds immediately).commands.config(defaultfalse) enables/config(reads/writesopenclaw.json).commands.mcp(defaultfalse) enables/mcp(reads/writes OpenClaw-managed MCP config undermcp.servers).commands.plugins(defaultfalse) enables/plugins(plugin discovery/status plus install + enable/disable controls).commands.debug(defaultfalse) enables/debug(runtime-only overrides).commands.restart(defaulttrue) enables/restartplus gateway restart tool actions.commands.ownerAllowFrom(optional) sets the explicit owner allowlist for owner-only command/tool surfaces. This is separate fromcommands.allowFrom.commands.ownerDisplaycontrols how owner ids appear in the system prompt:raworhash.commands.ownerDisplaySecretoptionally sets the HMAC secret used whencommands.ownerDisplay="hash".commands.allowFrom(optional) sets a per-provider allowlist for command authorization. When configured, it is the only authorization source for commands and directives (channel allowlists/pairing andcommands.useAccessGroupsare ignored). Use"*"for a global default; provider-specific keys override it.commands.useAccessGroups(defaulttrue) enforces allowlists/policies for commands whencommands.allowFromis not set.
Command list
Current source-of-truth:
- core built-ins come from
src/auto-reply/commands-registry.shared.ts - generated dock commands come from
src/auto-reply/commands-registry.data.ts - plugin commands come from plugin
registerCommand()calls - actual availability on your gateway still depends on config flags, channel surface, and installed/enabled plugins
Core built-in commands
Built-in commands available today:
/new [model]starts a new session;/resetis the reset alias./compact [instructions]compacts the session context. See /concepts/compaction./stopaborts the current run./session idle <duration|off>and/session max-age <duration|off>manage thread-binding expiry./think <off|minimal|low|medium|high|xhigh>sets the thinking level. Aliases:/thinking,/t./verbose on|off|fulltoggles verbose output. Alias:/v./fast [status|on|off]shows or sets fast mode./reasoning [on|off|stream]toggles reasoning visibility. Alias:/reason./elevated [on|off|ask|full]toggles elevated mode. Alias:/elev./exec host=<auto|sandbox|gateway|node> security=<deny|allowlist|full> ask=<off|on-miss|always> node=<id>shows or sets exec defaults./model [name|#|status]shows or sets the model./models [provider] [page] [limit=<n>|size=<n>|all]lists providers or models for a provider./queue <mode>manages queue behavior (steer,interrupt,followup,collect,steer-backlog) plus options likedebounce:2s cap:25 drop:summarize./helpshows the short help summary./commandsshows the generated command catalog./tools [compact|verbose]shows what the current agent can use right now./statusshows runtime status, including provider usage/quota when available./taskslists active/recent background tasks for the current session./context [list|detail|json]explains how context is assembled./export-session [path]exports the current session to HTML. Alias:/export./whoamishows your sender id. Alias:/id./skill <name> [input]runs a skill by name./allowlist [list|add|remove] ...manages allowlist entries. Text-only./approve <id> <decision>resolves exec approval prompts./btw <question>asks a side question without changing future session context. See /tools/btw./subagents list|kill|log|info|send|steer|spawnmanages sub-agent runs for the current session./acp spawn|cancel|steer|close|sessions|status|set-mode|set|cwd|permissions|timeout|model|reset-options|doctor|install|helpmanages ACP sessions and runtime options./focus <target>binds the current Discord thread or Telegram topic/conversation to a session target./unfocusremoves the current binding./agentslists thread-bound agents for the current session./kill <id|#|all>aborts one or all running sub-agents./steer <id|#> <message>sends steering to a running sub-agent. Alias:/tell./config show|get|set|unsetreads or writesopenclaw.json. Owner-only. Requirescommands.config: true./mcp show|get|set|unsetreads or writes OpenClaw-managed MCP server config undermcp.servers. Owner-only. Requirescommands.mcp: true./plugins list|inspect|show|get|install|enable|disableinspects or mutates plugin state./pluginis an alias. Owner-only for writes. Requirescommands.plugins: true./debug show|set|unset|resetmanages runtime-only config overrides. Owner-only. Requirescommands.debug: true./usage off|tokens|full|costcontrols the per-response usage footer or prints a local cost summary./tts on|off|status|provider|limit|summary|audio|helpcontrols TTS. See /tools/tts./restartrestarts OpenClaw when enabled. Default: enabled; setcommands.restart: falseto disable it./activation mention|alwayssets group activation mode./send on|off|inheritsets send policy. Owner-only./bash <command>runs a host shell command. Text-only. Alias:! <command>. Requirescommands.bash: trueplustools.elevatedallowlists.!poll [sessionId]checks a background bash job.!stop [sessionId]stops a background bash job.
Generated dock commands
Dock commands are generated from channel plugins with native-command support. Current bundled set:
/dock-discord(alias:/dock_discord)/dock-mattermost(alias:/dock_mattermost)/dock-slack(alias:/dock_slack)/dock-telegram(alias:/dock_telegram)
Bundled plugin commands
Bundled plugins can add more slash commands. Current bundled commands in this repo:
/dreaming [on|off|status|help]toggles memory dreaming. See Dreaming./pair [qr|status|pending|approve|cleanup|notify]manages device pairing/setup flow. See Pairing./phone status|arm <camera|screen|writes|all> [duration]|disarmtemporarily arms high-risk phone node commands./voice status|list [limit]|set <voiceId|name>manages Talk voice config. On Discord, the native command name is/talkvoice./card ...sends LINE rich card presets. See LINE.- QQBot-only commands:
/bot-ping/bot-version/bot-help/bot-upgrade/bot-logs
Dynamic skill commands
User-invocable skills are also exposed as slash commands:
/skill <name> [input]always works as the generic entrypoint.- skills may also appear as direct commands like
/prosewhen the skill/plugin registers them. - native skill-command registration is controlled by
commands.nativeSkillsandchannels.<provider>.commands.nativeSkills.
Notes:
- Commands accept an optional
:between the command and args (e.g./think: high,/send: on,/help:). /new <model>accepts a model alias,provider/model, or a provider name (fuzzy match); if no match, the text is treated as the message body.- For full provider usage breakdown, use
openclaw status --usage. /allowlist add|removerequirescommands.config=trueand honors channelconfigWrites.- In multi-account channels, config-targeted
/allowlist --account <id>and/config set channels.<provider>.accounts.<id>...also honor the target account'sconfigWrites. /usagecontrols the per-response usage footer;/usage costprints a local cost summary from OpenClaw session logs./restartis enabled by default; setcommands.restart: falseto disable it./plugins install <spec>accepts the same plugin specs asopenclaw plugins install: local path/archive, npm package, orclawhub:<pkg>./plugins enable|disableupdates plugin config and may prompt for a restart.- Discord-only native command:
/vc join|leave|statuscontrols voice channels (requireschannels.discord.voiceand native commands; not available as text). - Discord thread-binding commands (
/focus,/unfocus,/agents,/session idle,/session max-age) require effective thread bindings to be enabled (session.threadBindings.enabledand/orchannels.discord.threadBindings.enabled). - ACP command reference and runtime behavior: ACP Agents.
/verboseis meant for debugging and extra visibility; keep it off in normal use./fast on|offpersists a session override. Use the Sessions UIinheritoption to clear it and fall back to config defaults./fastis provider-specific: OpenAI/OpenAI Codex map it toservice_tier=priorityon native Responses endpoints, while direct public Anthropic requests, including OAuth-authenticated traffic sent toapi.anthropic.com, map it toservice_tier=autoorstandard_only. See OpenAI and Anthropic.- Tool failure summaries are still shown when relevant, but detailed failure text is only included when
/verboseisonorfull. /reasoning(and/verbose) are risky in group settings: they may reveal internal reasoning or tool output you did not intend to expose. Prefer leaving them off, especially in group chats./modelpersists the new session model immediately.- If the agent is idle, the next run uses it right away.
- If a run is already active, OpenClaw marks a live switch as pending and only restarts into the new model at a clean retry point.
- If tool activity or reply output has already started, the pending switch can stay queued until a later retry opportunity or the next user turn.
- Fast path: command-only messages from allowlisted senders are handled immediately (bypass queue + model).
- Group mention gating: command-only messages from allowlisted senders bypass mention requirements.
- Inline shortcuts (allowlisted senders only): certain commands also work when embedded in a normal message and are stripped before the model sees the remaining text.
- Example:
hey /statustriggers a status reply, and the remaining text continues through the normal flow.
- Example:
- Currently:
/help,/commands,/status,/whoami(/id). - Unauthorized command-only messages are silently ignored, and inline
/...tokens are treated as plain text. - Skill commands:
user-invocableskills are exposed as slash commands. Names are sanitized toa-z0-9_(max 32 chars); collisions get numeric suffixes (e.g._2)./skill <name> [input]runs a skill by name (useful when native command limits prevent per-skill commands).- By default, skill commands are forwarded to the model as a normal request.
- Skills may optionally declare
command-dispatch: toolto route the command directly to a tool (deterministic, no model). - Example:
/prose(OpenProse plugin) — see OpenProse.
- Native command arguments: Discord uses autocomplete for dynamic options (and button menus when you omit required args). Telegram and Slack show a button menu when a command supports choices and you omit the arg.
/tools
/tools answers a runtime question, not a config question: what this agent can use right now in
this conversation.
- Default
/toolsis compact and optimized for quick scanning. /tools verboseadds short descriptions.- Native-command surfaces that support arguments expose the same mode switch as
compact|verbose. - Results are session-scoped, so changing agent, channel, thread, sender authorization, or model can change the output.
/toolsincludes tools that are actually reachable at runtime, including core tools, connected plugin tools, and channel-owned tools.
For profile and override editing, use the Control UI Tools panel or config/catalog surfaces instead
of treating /tools as a static catalog.
Usage surfaces (what shows where)
- Provider usage/quota (example: “Claude 80% left”) shows up in
/statusfor the current model provider when usage tracking is enabled. OpenClaw normalizes provider windows to% left; for MiniMax, remaining-only percent fields are inverted before display, andmodel_remainsresponses prefer the chat-model entry plus a model-tagged plan label. - Token/cache lines in
/statuscan fall back to the latest transcript usage entry when the live session snapshot is sparse. Existing nonzero live values still win, and transcript fallback can also recover the active runtime model label plus a larger prompt-oriented total when stored totals are missing or smaller. - Per-response tokens/cost is controlled by
/usage off|tokens|full(appended to normal replies). /model statusis about models/auth/endpoints, not usage.
Model selection (/model)
/model is implemented as a directive.
Examples:
/model
/model list
/model 3
/model openai/gpt-5.4
/model opus@anthropic:default
/model status
Notes:
/modeland/model listshow a compact, numbered picker (model family + available providers).- On Discord,
/modeland/modelsopen an interactive picker with provider and model dropdowns plus a Submit step. /model <#>selects from that picker (and prefers the current provider when possible)./model statusshows the detailed view, including configured provider endpoint (baseUrl) and API mode (api) when available.
Debug overrides
/debug lets you set runtime-only config overrides (memory, not disk). Owner-only. Disabled by default; enable with commands.debug: true.
Examples:
/debug show
/debug set messages.responsePrefix="[openclaw]"
/debug set channels.whatsapp.allowFrom=["+1555","+4477"]
/debug unset messages.responsePrefix
/debug reset
Notes:
- Overrides apply immediately to new config reads, but do not write to
openclaw.json. - Use
/debug resetto clear all overrides and return to the on-disk config.
Config updates
/config writes to your on-disk config (openclaw.json). Owner-only. Disabled by default; enable with commands.config: true.
Examples:
/config show
/config show messages.responsePrefix
/config get messages.responsePrefix
/config set messages.responsePrefix="[openclaw]"
/config unset messages.responsePrefix
Notes:
- Config is validated before write; invalid changes are rejected.
/configupdates persist across restarts.
MCP updates
/mcp writes OpenClaw-managed MCP server definitions under mcp.servers. Owner-only. Disabled by default; enable with commands.mcp: true.
Examples:
/mcp show
/mcp show context7
/mcp set context7={"command":"uvx","args":["context7-mcp"]}
/mcp unset context7
Notes:
/mcpstores config in OpenClaw config, not Pi-owned project settings.- Runtime adapters decide which transports are actually executable.
Plugin updates
/plugins lets operators inspect discovered plugins and toggle enablement in config. Read-only flows can use /plugin as an alias. Disabled by default; enable with commands.plugins: true.
Examples:
/plugins
/plugins list
/plugin show context7
/plugins enable context7
/plugins disable context7
Notes:
/plugins listand/plugins showuse real plugin discovery against the current workspace plus on-disk config./plugins enable|disableupdates plugin config only; it does not install or uninstall plugins.- After enable/disable changes, restart the gateway to apply them.
Surface notes
- Text commands run in the normal chat session (DMs share
main, groups have their own session). - Native commands use isolated sessions:
- Discord:
agent:<agentId>:discord:slash:<userId> - Slack:
agent:<agentId>:slack:slash:<userId>(prefix configurable viachannels.slack.slashCommand.sessionPrefix) - Telegram:
telegram:slash:<userId>(targets the chat session viaCommandTargetSessionKey)
- Discord:
/stoptargets the active chat session so it can abort the current run.- Slack:
channels.slack.slashCommandis still supported for a single/openclaw-style command. If you enablecommands.native, you must create one Slack slash command per built-in command (same names as/help). Command argument menus for Slack are delivered as ephemeral Block Kit buttons.- Slack native exception: register
/agentstatus(not/status) because Slack reserves/status. Text/statusstill works in Slack messages.
- Slack native exception: register
BTW side questions
/btw is a quick side question about the current session.
Unlike normal chat:
- it uses the current session as background context,
- it runs as a separate tool-less one-shot call,
- it does not change future session context,
- it is not written to transcript history,
- it is delivered as a live side result instead of a normal assistant message.
That makes /btw useful when you want a temporary clarification while the main
task keeps going.
Example:
/btw what are we doing right now?
See BTW Side Questions for the full behavior and client UX details.