Configure OpenClaw Slash Commands and Directives
Config
Section titled “Config”You manage how your bot handles commands through the commands object in your configuration. Here is the exact structure you will work with in your openclaw.json5:
{ 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: This istrueby default. It lets the bot parse/...commands in chat. Even if you turn this off, text commands still work on platforms like WhatsApp, Signal, iMessage, or Google Chat that do not have native command support.commands.native: This registers native slash commands. It is set to"auto", meaning it is on for Discord and Telegram but off for Slack until you manually add them. You can override this for specific channels if you need to.commands.nativeSkills: Similar to native commands, this registers your skills as native commands when the platform supports it.commands.bash: Set this totrueif you want to run host shell commands using! <cmd>or/bash <cmd>. Just remember this needstools.elevatedallowlists to function.commands.bashForegroundMs: This tells the bot how long to wait (default2000ms) before moving a bash command to the background. Setting it to0backgrounds it immediately.commands.config,commands.mcp,commands.plugins, andcommands.debug: These flags enable specific management commands like/config,/mcp, or/plugins. They are off by default for security.commands.restart: This is on by default so you can use the/restartcommand.commands.ownerAllowFrom: Use this to define who can access owner-only commands. It is separate from your general allowlist.commands.ownerDisplayandownerDisplaySecret: These control how owner IDs look in the system prompt, using eitherrawtext or ahash.commands.allowFrom: This is your per-provider allowlist. If you set this, it becomes the primary source for authorization, and the bot will ignore other channel allowlists or access groups.commands.useAccessGroups: When you have not set a specificallowFromlist, this enforces your standard policies and allowlists.
Command list
Section titled “Command list”Your commands come from a few different places: the core registry, generated dock commands, plugin commands, and flexible skill commands. What you actually see in your chat app depends on your config flags and which plugins are active.
Core built-in commands
Section titled “Core built-in commands”These are the tools you will use most often:
/new [model]or/reset: Starts a fresh session./compact [instructions]: Helps manage your session context. Check out /concepts/compaction./stop: Kills the current run immediately./session idle <duration|off>and/session max-age <duration|off>: These manage how long your threads stay bound./think <off|minimal|low|medium|high|xhigh>: Sets the thinking level. You can also use/thinkingor/t./verbose on|off|full: Toggles extra output. Use/vfor short./fast [status|on|off]: Manages fast mode./reasoning [on|off|stream]: Toggles if you see the model’s reasoning. Use/reasonas an alias./elevated [on|off|ask|full]: Toggles elevated permissions. Use/elevas an alias./exec: Configures execution defaults like security and sandbox settings./model [name|#|status]: Shows or changes the current model./models [provider] [page] [limit]: Lists what models are available./queue <mode>: Manages how the bot handles multiple messages./helpand/commands: Your go-to for quick info and the full catalog./tools [compact|verbose]: Shows what the agent can actually do right now./status: Gives you the runtime status and quota usage./tasks: Lists background tasks for your session./context [list|detail|json]: Shows how the bot is building your prompt./export-session [path]: Saves your chat to HTML. Use/exportas an alias./whoamior/id: Shows your sender ID./skill <name> [input]: Runs a specific skill./allowlist [list|add|remove]: Manages access (text-only)./approve <id> <decision>: Handles permission prompts./btw <question>: Asks a side question without messing up your session history. See /tools/btw./subagents: Manages sub-agent runs for the current session./acp: Controls ACP sessions and settings./focus <target>and/unfocus: Binds or unbinds a thread to a session./agents: Lists bound agents./kill <id|#|all>: Stops sub-agents./steer <id|#> <message>: Sends instructions to a running sub-agent. Use/tellas an alias./config,/mcp,/plugins, and/debug: Management commands (require specific config flags)./usage: Controls the usage footer or shows cost summaries./tts: Manages Text-to-Speech. See /tools/tts./restart: Reboots the system./activation mention|always: Sets how the bot triggers in groups./send on|off|inherit: Sets the send policy (owner-only)./bash <command>or! <command>: Runs shell commands.!polland!stop: Manages background bash jobs.
Generated dock commands
Section titled “Generated dock commands”These come from channel plugins that support native commands:
/dock-discord(alias:/dock_discord)/dock-mattermost(alias:/dock_mattermost)/dock-slack(alias:/dock_slack)/dock-telegram(alias:/dock_telegram)
Bundled plugin commands
Section titled “Bundled plugin commands”Plugins add their own specialized commands to the mix:
/dreaming: Toggles memory dreaming. See Dreaming./pair: Manages device setup. See Pairing./phone: Arms or disarms phone node commands./voice: Configures Talk voices./card: Sends LINE rich cards. See LINE./codex: Controls the Codex app-server. See Codex use.- QQBot commands:
/bot-ping,/bot-version,/bot-help,/bot-upgrade, and/bot-logs.
flexible skill commands
Section titled “flexible skill commands”Any skill you can invoke is also a slash command. You can use /skill <name> as a catch-all, or use direct commands like /prose if the plugin registers them. You can control this with commands.nativeSkills.
Pro-tips and details
Section titled “Pro-tips and details”- You can add a
:between a command and its arguments (like/think: high). /new <model>is smart—it tries to match model aliases or providers first. If it doesn’t find a match, it treats the text as a message body.- Use
openclaw status --usagefor a full breakdown of your provider costs. - Commands like
/allowlistand/configneedcommands.config: trueto work. - Discord has a special
/vccommand for voice channels that isn’t available as text. - Be careful with
/reasoningand/verbosein group chats; they might show internal info you’d rather keep private. - When you change a model with
/model, it happens immediately if the agent is idle. If it’s busy, the switch stays pending until a clean break point. - If you are an authorized user, command-only messages bypass the normal queue and model processing for a faster response.
- Some commands work as “inline shortcuts” (like
/status,/help,/commands, or/whoami). You can drop them into a normal sentence, and the bot will trigger the command and then process the rest of your message. - For native commands, Discord provides autocomplete, while Telegram and Slack will show you a button menu if you forget an argument.
- Skills can route directly to a tool without using the model if they declare
command-dispatch: tool. - Fast mode behavior depends on your provider. For example, OpenAI maps it to priority service, while Anthropic uses it to manage service tiers.
/tools
Section titled “/tools”When you run /tools, you are asking a runtime question rather than a configuration question. It tells you exactly what the agent can use right now in your current conversation.
The default output for /tools is compact and optimized so you can scan it quickly. If you need more detail, you can use /tools verbose to see short descriptions for each tool. You will notice that native-command surfaces supporting arguments use this same compact|verbose switch.
Keep in mind that these results are session-scoped. This means that changing the agent, channel, thread, sender authorization, or the model can change what you see in the output. The command identifies tools that are actually reachable at runtime. This includes core tools and connected plugin tools. It also includes channel-owned tools.
If you need to edit profiles or overrides, you should use the Control UI Tools panel or the config/catalog surfaces. You should not treat /tools as a static catalog for editing purposes.
Usage surfaces (what shows where)
Section titled “Usage surfaces (what shows where)”It helps to know where specific information appears in the interface. Here is how the system handles different types of data:
- Provider usage and quota: If you have usage tracking enabled, you will see details like “Claude 80% left” in
/statusfor your current model provider. OpenClaw normalizes these provider windows to a ”% left” format. For MiniMax, the system inverts remaining-only percent fields before displaying them. It also prefers the chat-model entry and a model-tagged plan label formodel_remainsresponses. - Token and cache lines: These lines in
/statuscan fall back to the latest transcript usage entry if the live session snapshot is sparse. Existing nonzero live values take priority. This transcript fallback can also recover the active runtime model label and a larger prompt-oriented total when stored totals are missing or smaller. - Per-response tokens and cost: You can control this by appending
/usage off|tokens|fullto your normal replies. - Model status: The
/model statuscommand is specifically for models, authentication, and endpoints. It does not display usage information.
Model selection (/model)
Section titled “Model selection (/model)”You can use the /model directive to switch between different AI models or providers whenever you need. It is a quick way to manage your active configuration without digging into files.
/model/model list/model 3/model openai/gpt-5.4/model opus@anthropic:default/model statusHere is how it works:
- Running
/modelor/model listdisplays a compact, numbered list of model families and their available providers. - If you are using Discord,
/modeland/modelstrigger an interactive interface with dropdown menus for selecting providers and models. - You can use
/model <#>to pick a specific option from the list; the system tries to stick with your current provider if possible. - Use
/model statusto see your current setup, including the configuredbaseUrland the activeapimode.
Debug overrides
Section titled “Debug overrides”The /debug command allows you to set runtime-only configuration overrides. These changes stay in your system memory and never touch your actual disk files. This feature is restricted to owners and is turned off by default. To use it, you must first set commands.debug: true.
/debug show/debug set messages.responsePrefix="[openclaw]"/debug set channels.whatsapp.allowFrom=["+1555","+4477"]/debug unset messages.responsePrefix/debug resetKeep these points in mind:
- Any overrides you set apply immediately to new configuration reads, but they are not saved to
openclaw.json. - You can run
/debug resetat any time to wipe all temporary overrides and go back to your original on-disk configuration.
Config updates
Section titled “Config updates”You can use the /config command to write directly to your on-disk configuration file (openclaw.json). This feature is restricted to the owner. It is disabled by default, so you will need to enable it by setting commands.config: true.
Here are some examples of how to use it:
/config show/config show messages.responsePrefix/config get messages.responsePrefix/config set messages.responsePrefix="[openclaw]"/config unset messages.responsePrefixKeep these points in mind:
- Your config is validated before it saves. If you try to make an invalid change, the system will reject it.
- Any updates you make with
/configwill persist even after you restart the application.
MCP updates
Section titled “MCP updates”The /mcp command manages your OpenClaw-managed MCP server definitions under the mcp.servers key. This is also an owner-only command and is disabled by default. You can turn it on by setting commands.mcp: true.
Try these examples:
/mcp show/mcp show context7/mcp set context7={"command":"uvx","args":["context7-mcp"]}/mcp unset context7A few things to note:
- The
/mcpcommand stores configuration data in your OpenClaw config rather than in Pi-owned project settings. - Your runtime adapters are responsible for deciding which transports are actually executable.
Plugin updates
Section titled “Plugin updates”You can use /plugins to check out discovered plugins or toggle them in your config. If you are just looking, /plugin works as a read-only alias. This is off by default, so you will need to set commands.plugins: true to get started.
Here are some examples:
/plugins/plugins list/plugin show context7/plugins enable context7/plugins disable context7Keep in mind that /plugins list and /plugins show look at your actual workspace and on-disk config. When you use enable or disable, you are just updating the config, not installing or removing files. You will need to restart the gateway to make those changes stick.
Surface notes
Section titled “Surface notes”Text commands run right in your normal chat session. DMs share main, while groups get their own session. Native commands use isolated sessions:
- Discord:
agent:<agentId>:discord:slash:<userId> - Slack:
agent:<agentId>:slack:slash:<userId>(you can change the prefix withchannels.slack.slashCommand.sessionPrefix) - Telegram:
telegram:slash:<userId>(this hits the chat session viaCommandTargetSessionKey)
The /stop command targets the active chat session to kill the current run.
For Slack users, channels.slack.slashCommand still works for a single command like /openclaw. If you turn on commands.native, you need to set up one Slack slash command for every built-in command (using the same names as /help). Slack sends command menus as ephemeral Block Kit buttons. One big exception: you have to register /agentstatus instead of /status because Slack keeps /status for itself. You can still type /status as a text command in messages.
BTW side questions
Section titled “BTW side questions”The /btw command is for when you have a quick side question about what is happening in the current session.
It is different from a normal chat because:
- 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.
This is great for getting a quick clarification without interrupting the main task.
Example:
/btw what are we doing right now?Check out BTW Side Questions for more on how this works and the client UX details.
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.