Skip to content

Configure OpenClaw Slash Commands and Directives

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 is true by 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 to true if you want to run host shell commands using ! <cmd> or /bash <cmd>. Just remember this needs tools.elevated allowlists to function.
  • commands.bashForegroundMs: This tells the bot how long to wait (default 2000ms) before moving a bash command to the background. Setting it to 0 backgrounds it immediately.
  • commands.config, commands.mcp, commands.plugins, and commands.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 /restart command.
  • commands.ownerAllowFrom: Use this to define who can access owner-only commands. It is separate from your general allowlist.
  • commands.ownerDisplay and ownerDisplaySecret: These control how owner IDs look in the system prompt, using either raw text or a hash.
  • 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 specific allowFrom list, this enforces your standard policies and allowlists.

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.

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 &lt;duration|off&gt; and /session max-age &lt;duration|off&gt;: These manage how long your threads stay bound.
  • /think &lt;off|minimal|low|medium|high|xhigh&gt;: Sets the thinking level. You can also use /thinking or /t.
  • /verbose on|off|full: Toggles extra output. Use /v for short.
  • /fast [status|on|off]: Manages fast mode.
  • /reasoning [on|off|stream]: Toggles if you see the model’s reasoning. Use /reason as an alias.
  • /elevated [on|off|ask|full]: Toggles elevated permissions. Use /elev as 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.
  • /help and /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 /export as an alias.
  • /whoami or /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 &lt;id|#|all&gt;: Stops sub-agents.
  • /steer &lt;id|#&gt; &lt;message&gt;: Sends instructions to a running sub-agent. Use /tell as 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.
  • !poll and !stop: Manages background bash jobs.

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)

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.

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.

  • 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 --usage for a full breakdown of your provider costs.
  • Commands like /allowlist and /config need commands.config: true to work.
  • Discord has a special /vc command for voice channels that isn’t available as text.
  • Be careful with /reasoning and /verbose in 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.

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.

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 /status for 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 for model_remains responses.
  • Token and cache lines: These lines in /status can 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|full to your normal replies.
  • Model status: The /model status command is specifically for models, authentication, and endpoints. It does not display usage information.

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 status

Here is how it works:

  • Running /model or /model list displays a compact, numbered list of model families and their available providers.
  • If you are using Discord, /model and /models trigger 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 status to see your current setup, including the configured baseUrl and the active api mode.

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 reset

Keep 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 reset at any time to wipe all temporary overrides and go back to your original on-disk configuration.

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.responsePrefix

Keep 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 /config will persist even after you restart the application.

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 context7

A few things to note:

  • The /mcp command 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.

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 context7

Keep 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.

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 with channels.slack.slashCommand.sessionPrefix)
  • Telegram: telegram:slash:<userId> (this hits the chat session via CommandTargetSessionKey)

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.

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

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.