OpenClaw Commands & Prompt Reference
Chat commands, hook events and a few terminal commands of OpenClaw, the self-hosted gateway connecting chat apps to AI agents, checked on 10 October 2026 against docs.openclaw.ai, which runs slightly ahead of release 2026.9.9 (the ultrafast setting of /fast is newer). Most slash commands must be the whole message; rows starting with openclaw run in a terminal on the Gateway host. Many are owner-only or need a commands flag. Skill-registered and QQBot-only commands are left out.
All Commands
Sessions and runs (10)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /new [model] | Start a fresh session | The model may be an alias, provider/model or a fuzzy provider name; unmatched text becomes the message body. |
| /reset [soft [message]] | Reset session in place | Add soft to keep the transcript while startup reruns; /new instead archives the session and opens a new one. |
| /name <title> | Name the session | Sent without a title, it shows the present name plus a suggested one. |
| /compact [instructions] | Compact session context | Hook handlers can bracket it with the session:compact:before and session:compact:after events. |
| /stop | Abort the active run | Also stops that run's Gateway or sandbox commands; services started with background: true keep running. |
| /session idle <duration|off> | Set thread idle expiry | For thread-bound conversations; success is reported only once the channel confirms the binding update. |
| /session max-age <duration|off> | Set thread max-age expiry | Same confirmation rule as idle expiry: a failed channel update never produces a success reply. |
| /export-session [path] | Export session as HTML | Owner-only; a given path overwrites an existing workspace file, and no path picks a collision-safe name. Alias /export. |
| /export-trajectory [path] | Export a JSONL trajectory | Writes a JSONL bundle rather than the HTML view of /export-session; the short alias is /trajectory. |
| /btw <question> | Ask a side question | Uses the session as background but is never written to the transcript; in the Control UI it opens Side chat. |
Run controls (9)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /think <level|default> | Set thinking level | default clears the session override; /thinking and /t are aliases, and the levels offered follow the session's model. |
| /verbose on|off|full | Toggle verbose output | Meant for debugging and risky in group chats because it can expose internals; the alias is /v. |
| /trace on|off | Toggle plugin trace | Bare /trace reports the current state; only plugin-owned debug lines appear, not full verbose output. |
| /fast [status|auto|on|off|ultrafast|default] | Show or set fast mode | Provider-specific: OpenAI and Codex start from priority; ultrafast is requested only when the Codex catalog advertises it. |
| /reasoning [on|off|stream] | Toggle reasoning visibility | Can expose internal reasoning, so the docs advise keeping it off in group chats; alias /reason. |
| /elevated [on|off|ask|full] | Toggle elevated mode | A directive: sent alone it persists for the session, inside a normal message it acts only as a hint; alias /elev. |
| /exec host=<auto|sandbox|gateway|node> security=<deny|allowlist|full> ask=<off|on-miss|always> node=<id> | Show or set exec defaults | Host and node placement persists for the session, while security and ask cover only the message they arrive in. |
| /queue <mode> | Set run queue behavior | One of the stripped directives, so the model never sees it; the Queue docs describe each mode. |
| /steer <message> | Steer the active run | Aimed at a run already in progress, for example to correct course mid-task; /tell is the alias. |
Models and sign-in (14)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /login [provider] | Choose a sign-in provider | Owner or admin only, from a private chat or Control UI session; it lists providers without starting sign-in. |
| /login refresh | Refresh sign-in status | Use it when a chat login cannot be confirmed, then check /models; no second authentication is needed. |
| /login access <provider> | Reopen model access choices | Brings back the choice between showing all provider models and keeping the current restrictions. |
| /login codex | Pair OpenAI Codex sign-in | Goes straight to OpenAI device pairing; API keys and local setup use the Control UI handoff instead. |
| /login openrouter | Sign in to OpenRouter | Approve in the browser, then come back to chat for the saved result; it needs the Gateway's managed HTTPS address. |
| /login cancel | Abort a waiting sign-in | Also dismisses an open model-restriction question while saved credentials stay in place. |
| /model [name|default|list|status] [-s|--session|-a|--agent|-g|--global] | Show or switch models | Pick by provider/model or alias, not by number; -a and -g also update agent or global defaults for owners and admins. |
| /model list | Browse providers | Same listing as /models; on Discord the bare native command opens a dropdown picker instead. |
| /model status | Show model details | Covers models, auth and endpoints, not token usage; /status and /usage handle that. |
| /model <model> -s | Switch model for this session | Leaves configured defaults untouched; --session is the long form, and unscoped selections behave this way unless a scope is configured. |
| /model <model> -a | Switch and update agent default | Owner/admin only; it rewrites just the current agent's configured primary, even if that agent inherited the global default. |
| /model <model> -g | Switch and update global default | Owner/admin only; it changes the shared fallback in agents.defaults.model, not agents that set their own primary. |
| /model default -s | Return to the configured default | Drops this session's model pin without writing any configured default; compatible auth pins are kept. |
| /models [provider] [page] [limit=<n>|all] | List providers or models | Name a provider, as in /models openai, to see that provider's models; page and limit split long lists. |
Discovery and status (15)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /help | Show short help | An inline shortcut: it also works inside a normal message and is stripped before the model reads the rest. |
| /commands | Show the command catalog | What appears depends on config flags, the channel surface, enabled plugins and installed skills. |
| /tools [compact|verbose] | Show usable tools | Answers for this agent, channel, sender and model right now; verbose adds short descriptions to the compact default. |
| /status | Show runtime status | Includes provider quota when usage tracking is on; native Slack setups register it as /agentstatus because Slack reserves /status. |
| /status plugins | Show plugin health details | Needs commands.plugins: true and goes deeper than plain /status into failing, quarantined or incompatible plugins. |
| /goal [status|start|edit|pause|resume|complete|block|clear] ... | Manage the session goal | Keeps a durable objective for this session; the actions start, edit, pause, complete, block or clear it. |
| /dashboard [request] | Build a session dashboard | A reserved built-in name: a user skill called dashboard becomes /dashboard_2 and still runs through /skill dashboard. |
| /diagnostics [note] | Start a support report | Owner-only; exec approval is requested on every run, so expect an approval prompt each time. |
| /openclaw <request> | Run the setup helper | Send it from a direct chat with the owner account and describe what should be set up or repaired. |
| /context [list|detail|map|json] | Explain context assembly | Shows what fills the model's window: system prompt, injected files, tool schemas, skills and history. |
| /context list | List injected context sizes | Gives per-file sizes and totals, and still works from an estimate before any run report is cached. |
| /context detail | Break down context in depth | Adds sizes per tool schema and skill entry, the system prompt size and how many transcript messages could be compacted. |
| /context map | Draw a context treemap | Returns a picture of what takes up the window; it stays unavailable until a regular reply has created a run report. |
| /whoami | Show your sender id | Useful when filling commands.allowFrom or commands.ownerAllowFrom, which match senders by id; /id is an alias. |
| /usage off|tokens|full|reset|cost | Set the usage footer | reset returns to the configured default, and cost prints a local spending summary instead of changing the footer. |
Skills, loops and approvals (7)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /skill <name> [input] | Run a named skill | Always available, even for skills without a direct command of their own; skill names are sanitized to a-z0-9_. |
| /learn [request] | Draft a skill | The result is a draft to review in Skill Workshop; add a request to point it at specific sources. |
| /loop [interval] <prompt> | Repeat a prompt | Owner-only; /loop 5m check deploy status makes a fixed-cadence cron job, while no interval backs off toward hourly. |
| /loop status | List conversation loops | Owner-only; shows the cron-backed loop jobs that belong to this chat. |
| /loop stop [name] | Stop loops | Owner-only; removes the matching cron-backed loop jobs, so name one to leave the others running. |
| /allowlist [list|add|remove] ... | Manage allowlist entries | Text-only; add and remove need commands.config: true and respect the channel's configWrites setting. |
| /approve <id> <decision> | Answer an approval prompt | Settles exec, plugin and OpenClaw-change requests; /diagnostics, for one, raises an exec approval on every run. |
Sub-agents and ACP (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /subagents list|log|info | Inspect sub-agent runs | Scoped to the current session; completions are pushed back, so there is no need to poll it while waiting. |
| /subagents log <id|#> [limit] [tools] | Show a sub-agent's recent turns | Add the tools token to include tool calls and results, which are left out by default. |
| /subagents info <id|#> | Show sub-agent run metadata | Use it after a run ends to check its outcome, timing, cleanup and where the transcript lives. |
| /acp spawn|cancel|steer|close|sessions|status|set-mode|set|cwd|permissions|timeout|model|reset-options|doctor|install|help | Manage ACP sessions | Always handled by OpenClaw itself, even while the chat is bound to an ACP harness; runtime controls need owner or admin identity. |
| /session unbind | Detach the conversation | Only on channels that keep persistent thread bindings; the agent session stays open for later use. |
| /agents | List thread-bound agents | One of the thread-binding controls, alongside /session unbind and the idle and max-age expiry commands. |
Config, plugins and admin (12)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /config show|get|set|unset | Edit openclaw.json from chat | Owner-only and off until commands.config: true; writes are validated first and survive restarts. |
| /config set channels.whatsapp.responsePrefix="[openclaw]" | Set one config value | Takes a dotted config path and a value; an invalid change is rejected before anything is written. |
| /mcp show|get|set|unset | Edit MCP server config | Owner-only and needs commands.mcp: true; entries live under mcp.servers, and show redacts secrets. |
| /mcp set context7={"command":"uvx","args":["context7-mcp"]} | Add an MCP server | The JSON value holds the launch command and its arguments; /mcp unset with the same name removes it. |
| /plugins list|inspect|show|get|install|enable|disable | Manage plugins from chat | Needs commands.plugins: true; changes apply through the running Gateway without a restart, and /plugin is an alias. |
| /plugins install clawhub:<package> | Install a ClawHub plugin | ClawHub and official-catalog installs skip the provenance warning that npm, git and local sources trigger. |
| /plugins install npm:<package> --force | Install an npm plugin | --force acknowledges the source after review; it does not override security.installPolicy or installer checks. |
| /plugins enable <plugin-id> --accept-capabilities | Enable with capability consent | Rerun this way after the reply lists the plugin's declared capabilities; bundled and verified catalog plugins need no consent. |
| /debug show|set|unset|reset | Set runtime-only overrides | Owner-only and needs commands.debug: true; overrides reach new config reads at once but never the disk. |
| /restart | Restart OpenClaw | On by default through commands.restart; a non-owner gets a refusal quoting the configuration command for their sender id. |
| /update | Update OpenClaw from chat | Owner-only; uses the Gateway update handler without needing a working model and reports the outcome in the same chat. |
| /send on|off|inherit | Set send policy | Owner-only; like other commands it accepts a colon after the name, as in /send: on. |
Voice, shell and channel plugins (10)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /tts on|off|status|chat|latest|provider|limit|summary|audio|help | Control text-to-speech | Subcommands switch speech on or off, pick a provider and set limits or summaries; the TTS docs explain each. |
| /activation mention|always | Set group activation mode | Owner-only and for group chats; the stored mode overrides the group's requireMention on channels that use it. |
| /bash <command> | Run a shell command on the host | Off unless commands.bash: true and tools.elevated allowlists permit it; the ! prefix is an alias. |
| !poll [sessionId] | Poll a background shell job | Clears the pending completion notice only once the final reply arrives; failed replies keep it. |
| !stop [sessionId] | Stop a background shell job | Targets jobs that /bash moved to the background after its two-second foreground wait. |
| /dreaming [on|off|status|help] | Toggle memory dreaming | A bundled plugin command limited to the owner or a Gateway admin. |
| /pair [qr|status|pending|approve|cleanup|notify] | Manage device pairing | Comes from a bundled plugin; subcommands cover QR codes, pending requests, approval, cleanup and notifications. |
| /voice status|list|set <voiceId> | Choose a Talk voice | On Discord the native command is registered as /talkvoice instead. |
| /codex <action> ... | Control the Codex harness | Actions include status, threads, resume, model, review, mcp and skills; with the codex plugin on, prefer it over ACP. |
| /card ... | Send LINE rich cards | Works only on the LINE channel and sends one of the preset card layouts. |
Setup from the terminal (12)
| Command / Syntax | What it does | Notes |
|---|---|---|
| openclaw setup | Open setup or chat | On a fresh machine it starts guided onboarding instead, the same flow as openclaw onboard. |
| openclaw setup --baseline | Create baseline folders only | Suits scripts; an invalid existing config is kept, and you are told to run openclaw doctor --fix first. |
| openclaw setup -m "status" | Send one request to OpenClaw | Runs a single system-agent request; add --yes when that request has to write persistent config. |
| openclaw configure | Change parts of a setup | Needs an interactive terminal; without one it prints matching openclaw config get or set commands and exits. |
| openclaw configure --section model --section channels | Configure chosen sections | The flag repeats; sections are workspace, model, web, gateway, daemon, channels, plugins, skills and health. |
| openclaw channels add | Add a channel account | Without credential flags it opens a guided wizard, which needs an interactive terminal; non-TTY shells exit at once. |
| openclaw channels add --channel telegram | Set up one channel directly | Skips the picker and opens that channel's guided setup; add --help to list the flags it accepts. |
| openclaw status --usage | Show provider usage | Prints each provider's remaining quota as a percentage left; add --agent to pick the auth profile scope. |
| openclaw status --all | Full status diagnosis | Read-only and safe to paste into a report, with a security audit, plugin compatibility and memory-vector checks. |
| openclaw update | Update OpenClaw | npm, pnpm and bun installs use the package-manager flow; Docker users pull a new image and recreate the container. |
| openclaw update status | Show update status | With no update running it shows the last recorded update and its start time; add --json for scripts. |
| openclaw update --channel beta | Switch to the beta channel | The choice is saved once the core update succeeds; stable, extended-stable and dev are the alternatives. |
Hook events and commands (21)
| Command / Syntax | What it does | Notes |
|---|---|---|
| command:new | New-session command handled | Awaited before handling continues; previousSessionEntry in the context describes the session being replaced. |
| command:reset | Reset command handled | Also fires for a Gateway session reset, which sets commandSource to gateway:sessions.reset. |
| command:stop | Stop command handled | Fires after the abort request and cannot deliver a hook reply; it is not an agent-finalization gate. |
| command | Every command event | Avoid subscribing one handler to both command and command:new, or it runs twice for each new command. |
| session:auto-reset | Daily or idle reset | Context gives the reason, daily or idle, plus the next session id when one exists. |
| session:compact:before | Compaction about to start | Awaited; session:compact is no wildcard, so subscribe to both compaction keys by name. |
| session:compact:after | Compaction finished | Only after a successful run, with compactedCount and, when known, token totals before and after. |
| session:patch | Session settings patched | Also fires when /model or the model picker saves a change; a read-only status query does not. |
| agent:bootstrap | Workspace bootstrap step | Handlers may replace or extend the bootstrapFiles array, but deduplication and context budgets still apply. |
| gateway:startup | Gateway started | Runs after hooks and channels load without delaying the first bind; a hook reload does not replay it. |
| gateway:shutdown | Gateway shutting down | Runs before channels and plugins are torn down; the wait is capped at five seconds by default. |
| gateway:pre-restart | Planned restart ahead | Only when shutdown expects a restart, with its own ten-second budget on top of the shutdown wait. |
| message:received | Inbound message accepted | Observation only, it cannot block processing; duplicate or session-less inbound updates may produce no event. |
| message:transcribed | Audio transcript ready | Requires a session key and non-empty speech text; the transcript itself arrives in the context. |
| message:preprocessed | Media and links preprocessed | Fires even when preprocessing was skipped, though fast native-command paths can bypass it entirely. |
| message:sent | Send outcome reported | Check context.success, and avoid blind resends on failure because part of the message may already be out. |
| openclaw hooks list | List discovered hooks | --eligible keeps only loadable hooks and -v adds a Missing column; bare openclaw hooks prints the same report. |
| openclaw hooks info <name> | Show one hook's details | Accepts a hook name or its hookKey and warns about unknown event names, which explains a hook that never fires. |
| openclaw hooks check | Check hook eligibility | Exits 0 even when hooks are not ready, so scripts should read the JSON counts instead. |
| openclaw hooks enable <name> | Enable a hook | Writes local config only, not a remote Gateway, and the entry applies globally even with --agent. |
| openclaw hooks disable <name> | Disable a hook | Leaves hook files and the master switch alone; plugin-managed hooks are toggled through openclaw plugins. |
Recipes
Command sequences typed in chat to an OpenClaw gateway: signing in and choosing a model, then adding an MCP server.
Sign in from chat and switch the model for one session
/login codex → /model list → /model <model> -s
Run /login codex in a private chat or the Control UI to pair OpenAI, browse what is available with /model list, then pick a model with -s so configured defaults stay as they are. If the sign-in cannot be confirmed, /login refresh checks again without a second login.
Add an MCP server from chat
/mcp set context7={"command":"uvx","args":["context7-mcp"]} → /mcp show
With commands.mcp set to true, the owner can store a server under mcp.servers and read it back with /mcp show, which redacts secrets. /config is the general counterpart for other openclaw.json keys; /debug changes settings for the running process only.
Frequently Asked Questions
What is the difference between /config and /debug in OpenClaw?
/config writes validated changes to openclaw.json, so they survive a restart; invalid changes are rejected. /debug sets runtime-only overrides that new config reads pick up at once but that never reach the disk. Both are owner-only and stay off until commands.config or commands.debug is true.
How do I reset a session without losing the transcript?
Send /reset soft: the transcript stays, startup runs again and reused CLI backend session ids are dropped. Plain /reset resets the session in place, while /new archives it and opens a fresh one.
How do I set up OpenClaw from scratch?
Run openclaw setup in a terminal on the Gateway host. On a fresh machine it starts guided onboarding, the same flow as openclaw onboard; on a configured one it opens a chat with OpenClaw. openclaw setup --baseline only creates the config, workspace and session folders, and openclaw channels add connects chat accounts later.
Can I pick a model by its list number with /model?
No. In text commands, choose a model by provider/model or a configured alias; numeric choices such as /model 3 are not supported. On Discord, the bare native /model and /models commands open a dropdown picker instead.
Which OpenClaw chat commands are switched off by default?
/config, /mcp, /plugins, /debug and the /bash shell (with its ! prefix) stay disabled until their commands flag (commands.config, commands.mcp, commands.plugins, commands.debug, commands.bash) is true. /restart and /update are on by default through commands.restart.
Sources and checks
- OpenClaw docs (docs.openclaw.ai, 2026-10-10, newer than release 2026.9.9) — Slash commands Chat slash commands and directives, ! shell commands, bundled plugin commands, the /model, /config, /mcp and /plugins examples
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — Sub-agent slash command /subagents forms and the thread-binding controls (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — Hook event types and context Internal hook event keys, their triggers and context (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw hooks CLI reference openclaw hooks list, info, check, enable and disable (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw setup CLI reference openclaw setup, its --baseline mode and -m requests (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw configure CLI reference openclaw configure and its --section filter (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw channels CLI reference openclaw channels add (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw status CLI reference openclaw status --usage and --all (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — openclaw update CLI reference openclaw update, update status and --channel (markdown source of the page)
- OpenClaw docs (docs.openclaw.ai, 2026-10-10) — Context The /context list, detail and map views (markdown source of the page)
Every row on this page was matched to a line in the documentation above on . A command or parameter that could not be found there is not listed.
16 rows from the earlier version of this page were removed in that check: duplicates, and entries the documentation does not list or lists differently.
AI tools change their commands, parameters and model names between releases: the vendor's current documentation and the version you run have the last word. Found a wrong or missing entry? Tell us and it gets checked against the source. How we verify describes the process and its limits.
Related prompt references
Claude Code (157) · Aider (46) · Manus (47) · All AI prompt references