OpenClaw Commands & Prompt Reference
99 commands & parameters · 4 categories · Source: OpenClaw Docs - Slash commands
OpenClaw is a self-hosted gateway that puts an AI coding agent behind the messaging apps you already use - Discord, Slack, Telegram, WhatsApp, Signal, iMessage and more - so its typed surface spans two layers. In chat, slash commands manage sessions, models, and permissions; on the Gateway host, the openclaw CLI handles setup, channels, and updates. This page lists both from the official documentation.
The slash layer is deeper than most chat tools. Session lifecycle alone covers /new, /reset (with a soft variant that keeps the transcript), /compact for context compaction, and /export-session for HTML exports. Eight subcommand families - /tools, /loop, /model, /config, /mcp, /debug, /plugins, /trace - each own a domain: /config writes validated changes to disk, while /debug applies runtime-only overrides that vanish on restart, a distinction worth knowing before you change anything in production.
Because commands arrive over chat channels, permissions are part of the surface: several commands are owner-only, and /model requests default to admin approval. If a command seems to do nothing, check your role for that channel before debugging the Gateway.
All Commands
Core Slash Commands (51)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /new [model] | Archive the current session and start a fresh one | Type in any connected chat channel or the Control UI. |
| /reset [soft [message]] | Reset the current session in place | soft keeps the transcript, drops reused CLI backend session ids, and reruns startup |
| /name <title> | Name or rename the current session | Omit the title to see the current name and a suggestion |
| /compact [instructions] | Compact the session context | See Compaction |
| /stop | Abort the current run | Type in any connected chat channel or the Control UI. |
| /session idle <duration|off> | Manage thread-binding idle expiry | Type in any connected chat channel or the Control UI. |
| /session max-age <duration|off> | Manage thread-binding max-age expiry | Type in any connected chat channel or the Control UI. |
| /export-session [path] | Owner-only | Export the current session to HTML inside the workspace. Alias: /export |
| /export-trajectory [path] | Export a JSONL trajectory bundle for the current session | Alias: /trajectory |
| /think <level|default> | Set the thinking level or clear the session override | Aliases: /thinking, /t |
| /verbose on|off|full | Toggle verbose output | Alias: /v |
| /trace on|off | Toggle plugin trace output for the current session | Type in any connected chat channel or the Control UI. |
| /fast [status|auto|on|off|default] | Show, set, or clear fast mode | Type in any connected chat channel or the Control UI. |
| /reasoning [on|off|stream] | Toggle reasoning visibility | Alias: /reason |
| /elevated [on|off|ask|full] | Toggle elevated mode | Alias: /elev |
| /codex <action> ... | Bind, steer, and inspect the Codex app-server harness | Actions include status, threads, resume, model, fast, permissions, compact, review, mcp, skills, and more. |
| /login [codex|openai|openai-codex] | Pair Codex/OpenAI login from a private chat or Web UI session | Owner/admin only |
| /model [name|#|status] [-s|--session] | Show or select a model | Direct owner/admin selections request a configured-default update; -s changes only this session |
| /models [provider] [page] [limit=<n>|all] | List configured/auth-available providers or models | Type in any connected chat channel or the Control UI. |
| /queue <mode> | Manage active-run queue behavior | See Queue and Queue steering |
| /steer <message> | Inject guidance into the active run | Alias: /tell. See Steer |
| /help | Show the short help summary | Type in any connected chat channel or the Control UI. |
| /commands | Show the generated command catalog | Type in any connected chat channel or the Control UI. |
| /tools [compact|verbose] | Show what the current agent can use right now | Type in any connected chat channel or the Control UI. |
| /status | Show execution/runtime status, Gateway and system uptime, plugin health, plus provider usage/quota | Type in any connected chat channel or the Control UI. |
| /status plugins | Show detailed plugin health: load errors, quarantines, channel plugin failures, dependency issues, compatibility notices | Requires commands.plugins: true |
| /diagnostics [note] | Owner-only support-report flow | Asks for exec approval every time |
| /openclaw <request> | Run the OpenClaw setup and repair helper from an owner DM | Type in any connected chat channel or the Control UI. |
| /tasks | List active/recent background tasks for the current session | Type in any connected chat channel or the Control UI. |
| /context [list|detail|map|json] | Explain how context is assembled | Type in any connected chat channel or the Control UI. |
| /whoami | Show your sender id | Alias: /id |
| /usage off|tokens|full|reset|cost | Control the per-response usage footer (reset/inherit/clear/default clears the session override to re-inherit the... | Type in any connected chat channel or the Control UI. |
| /skill <name> [input] | Run a skill by name | Type in any connected chat channel or the Control UI. |
| /learn [request] | Draft one reviewable skill from the current conversation or named sources through Skill Workshop | Type in any connected chat channel or the Control UI. |
| /loop [interval] <prompt> | Owner-only | Repeat a prompt in this conversation; omit the interval for self-paced checks |
| /loop status | Owner-only | List loops bound to this conversation |
| /loop stop [name] | Owner-only | Stop matching loops bound to this conversation |
| /allowlist [list|add|remove] ... | Manage allowlist entries | Text-only |
| /approve <id> <decision> | Resolve exec or plugin approval prompts | Type in any connected chat channel or the Control UI. |
| /btw <question> | Ask a side question without changing session context | Alias: /side. See BTW |
| /subagents list|log|info | Inspect sub-agent runs for the current session | Type in any connected chat channel or the Control UI. |
| /focus <target> | Bind the current Discord thread or Telegram topic to a session target | Type in any connected chat channel or the Control UI. |
| /unfocus | Remove the current thread binding | Type in any connected chat channel or the Control UI. |
| /agents | List thread-bound agents for the current session | Type in any connected chat channel or the Control UI. |
| /config show|get|set|unset | commands.config: true | Read or write openclaw.json | Owner-only |
| /mcp show|get|set|unset | commands.mcp: true | Read or write OpenClaw-managed MCP server config | Owner-only |
| /debug show|set|unset|reset | commands.debug: true | Runtime-only config overrides | Owner-only |
| /restart | commands.restart: true (default) | Restart OpenClaw | Type in any connected chat channel or the Control UI. |
| /send on|off|inherit | owner | Set send policy | Type in any connected chat channel or the Control UI. |
| /activation mention|always | Set group activation mode | Type in any connected chat channel or the Control UI. |
| /bash <command> | Run a host shell command | Alias: ! <command>. Requires commands.bash: true |
Subcommand Families (9)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /tools ... | What the agent can use now | Results are session-scoped. Changing agent, channel, thread, sender |
| /loop ... | Recurring conversation work | Subcommand family; run without arguments to see current state. |
| /model ... | Model selection | Direct owner/admin `/model <model>` requests **default scope**: it changes this session and starts a best-effort configured-default update. Adding `-s` uses **session scope**: only this sess |
| /config ... | On-disk config writes | Config is validated before write. Invalid changes are rejected. `/config` |
| /mcp ... | MCP server config | Subcommand family; run without arguments to see current state. |
| /debug ... | Runtime-only overrides | Subcommand family; run without arguments to see current state. |
| /plugins ... | Plugin management | Gateways automatically because plugin source modules changed. Trusted ClawHub |
| /trace ... | Plugin trace output | Subcommand family; run without arguments to see current state. |
| /btw ... | Side questions | In the Control UI, `/btw` and `/side` open the session rail and ask its |
openclaw CLI (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| openclaw setup | And `openclaw onboard` verify inference first, then start OpenClaw for Gateway, workspace, channels, skills, and... | Run in a terminal on the Gateway host. |
| openclaw setup --baseline | Creates the baseline config and workspace without walking the guided onboarding flow | Run in a terminal on the Gateway host. |
| openclaw configure | Changes targeted parts of an existing setup: model auth, gateway, channels, plugins, or skills | Run in a terminal on the Gateway host. |
| openclaw channels add | Configures channel accounts after the baseline exists; a channel selection alone uses guided setup, while account,... | Run in a terminal on the Gateway host. |
| openclaw status --usage | Show Gateway status including usage | Run in a terminal on the Gateway host. |
| openclaw update | Update OpenClaw to the latest release | Run in a terminal on the Gateway host. |
Hook Events & CLI (21)
| Command / Syntax | What it does | Notes |
|---|---|---|
| command:new | Fires when the /new command is issued | Hooks subscribe to a specific key from the event table, declared in HOOK.md as events: [command:new]. |
| command:reset | Fires when the /reset command is issued | Specific keys are preferred over the bare family name to reduce overhead. |
| command:stop | Fires when the /stop command is issued | Handlers should filter events early and return immediately if not relevant. |
| command | Any command event - general listener for the whole family | Bare family names (command, session, agent, gateway, message) receive every action in that family. |
| session:auto-reset | A daily or idle reset replaces the current session | OpenClaw core emits nothing outside the documented table; unknown names leave a hook silently dead. |
| session:compact:before | Before compaction summarizes history | The hook loader logs a warning for typo event names such as command:nwe. |
| session:compact:after | After compaction completes | Pair with session:compact:before to bracket a compaction. |
| session:patch | When session properties are modified | Part of the session event family. |
| agent:bootstrap | Before workspace bootstrap files are injected | The only documented agent-family event key. |
| gateway:startup | After channels start and hooks are loaded | Restarting the gateway process reloads hooks. |
| gateway:shutdown | When gateway shutdown begins | Keep handlers fast - hooks run during command processing. |
| gateway:pre-restart | Before an expected gateway restart | Distinct from gateway:shutdown, which covers full shutdown. |
| message:received | Inbound message from any channel | Part of the message event family. |
| message:transcribed | After audio transcription completes | Fires only for audio messages that go through transcription. |
| message:preprocessed | After media and link preprocessing completes or is skipped | Fires either way, so handlers see every inbound message once preprocessing resolves. |
| message:sent | Outbound send attempted | context.success carries the result of the send attempt. |
| openclaw hooks list | List all discovered hooks | Add --eligible, --verbose, or --json. A hook must show here to be enabled. |
| openclaw hooks info <hook-name> | Show detailed info about a hook | Flags unknown event names, so a hook that never runs is diagnosable. |
| openclaw hooks check | Show the eligibility summary | Eligibility fails on missing binaries (PATH), environment variables, config values, or OS compatibility. |
| openclaw hooks enable <hook-name> | Enable a hook | A hook needs HOOK.md plus a handler file in its directory, e.g. ~/.openclaw/hooks/my-hook/. |
| openclaw hooks disable <hook-name> | Disable a hook | Per-hook state lives under hooks.internal.entries in the OpenClaw config; extra directories via hooks.internal.load.extraDirs. |
Channel, Plugin & Runtime Commands (12)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /exec host=<auto|sandbox|gateway|node> security=<deny|allowlist|full> ask=<off|on-miss|always> node=<id> | Show or set exec defaults | Controls where and how shell execution runs for the session. |
| /goal [status|start|edit|pause|resume|complete|block|clear] ... | Manage the current session's durable goal | Goal state persists across the session lifecycle. |
| /acp spawn|cancel|steer|close|sessions|status|set-mode|set|cwd|permissions|timeout|model|reset-options|doctor|install|help | Manage ACP sessions and runtime options | Runtime controls require external owner or intern privileges. |
| /tts on|off|status|chat|latest|provider|limit|summary|audio|help | Control text-to-speech output | Provider, limits, and summary behavior are configurable per session. |
| /dreaming [on|off|status|help] | Toggle memory dreaming | Owner or Gateway admin only. |
| /pair [qr|status|pending|approve|cleanup|notify] | Manage device pairing | Covers QR pairing, pending approvals, and cleanup. |
| /voice status|list|set <voiceId> | Manage Talk voice configuration | Discord native command name: /talkvoice. |
| /card ... | Send LINE rich card presets | LINE channel only. |
| /dock-discord | Switch the active session's reply route to Discord | Alias: /dock_discord. Requires session.identityLinks; source sender and target peer must share an identity group. |
| /dock-mattermost | Switch the active session's reply route to Mattermost | Alias: /dock_mattermost. Same identity-link requirement as other dock commands. |
| /dock-slack | Switch the active session's reply route to Slack | Alias: /dock_slack. Same identity-link requirement as other dock commands. |
| /dock-telegram | Switch the active session's reply route to Telegram | Alias: /dock_telegram. Same identity-link requirement as other dock commands. |
Recipes
Our own notes on combining the commands above. Every token used here appears in the reference tables on this page.
Bind OpenAI Codex into an OpenClaw session
/login codex → /codex <action>
/login with the codex provider authenticates, then the /codex subcommand family binds, steers, and inspects Codex from the same chat channel the rest of OpenClaw uses.
Add an MCP server to OpenClaw
/mcp show → /mcp set ... → /config
/mcp reads and writes MCP server config; /config persists validated changes to disk, while /debug would keep them runtime-only - the same disk-versus-runtime split as the rest of OpenClaw configuration.
Frequently Asked Questions
What is the difference between /config and /debug in OpenClaw?
/config writes validated changes to the on-disk configuration; invalid changes are rejected. /debug applies runtime-only overrides that disappear when the Gateway restarts.
How do I reset a session without losing the transcript?
Use /reset soft. It keeps the transcript, drops reused CLI backend session ids, and reruns startup. Plain /reset resets in place, and /new archives the session and starts fresh.
How do I set up OpenClaw from scratch?
Run openclaw setup for guided onboarding (it verifies inference first), or openclaw setup --baseline to create the config and workspace without the walkthrough. Add chat accounts later with openclaw channels add.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.