In OpenClaw, what do the chat commands `/new`, `/reset`, `/compact` and `/stop` each do to the current session?
answer
- no timed reset by default
- start over versus summarize
- soft reset keeps the transcript
- stop ends the run, not the session
- standalone message, authorized sender
basics
~20 sOpenClaw's /new and /reset start the conversation over, /compact summarizes older turns so the same conversation continues in a smaller context, and /stop aborts the current run without touching history. None of them erases the stored transcript.
solid answer
~50 sAs of OpenClaw 2026.9.9 a session has no timed reset unless `session.reset` is configured, so these commands are how you manage it from chat. `/new` archives the current session and starts a fresh one, and `/new <model>` also switches the model; `/reset` resets the session in place. Both leave the model without the old turns while the earlier transcript stays in the session store. `/reset soft` is the light variant: it keeps the transcript, drops reused CLI backend session ids and reruns startup. `/compact [instructions]` keeps the same conversation but replaces older turns with a summary and keeps the recent tail. `/stop` aborts the run in progress and leaves the session as it was. Each is sent as its own message by an authorized sender; command-only messages skip the queue and the model, which is why `/stop` works while the agent is busy.
go deeper
Recall the split: /new and /reset start over, /compact summarizes and continues, /stop ends only the current run. Say that none of them erases the stored transcript.
Explain why the commands matter: as of 2026.9.9 there is no timed reset unless session.reset is configured, so compaction and manual resets bound a session. Mention /new with a model argument and what /reset soft keeps.
Show operating judgment: /compact when the thread still matters, /new when it has drifted, /stop mid-run because command-only messages skip the queue. Note that an unauthorized sender's command is ignored on external channels.
Treat the reset policy as a team default: rolling sessions give continuity and lean on compaction, while daily or idle resets give predictable fresh context at the cost of continuity. Set it per chat type with resetByType rather than one global rule.
## What a session is, and why it keeps rolling In OpenClaw a **session** is the conversation bucket the Gateway keeps for one route. By default every direct message to an agent lands in that agent's main session, and each group chat gets a session of its own. The session holds the transcript the model sees on the next turn, plus per-session settings such as the selected model and the thinking level. As of 2026.9.9 a session does **not** reset on a timer unless you configure one. `session.reset` defaults to mode `none`; a daily reset (`mode: "daily"` with `atHour`, default `4`, local to the Gateway host) and an idle reset (`mode: "idle"` with `idleMinutes`) are opt-in. Release 2026.8.1 is where sessions without a configured policy began staying open across days, so guides written for earlier releases may describe a nightly reset. Long conversations are kept inside the model's context window by automatic compaction instead, which makes the chat commands below the everyday way to manage a session. ## The commands at a glance | Command | What it changes | What it keeps | |---|---|---| | `/new [model]` | Archives the current session and starts a fresh one; a model argument also switches the model | The earlier transcript, in the session store | | `/reset` | Resets the current session in place, so the model starts without the old turns | The earlier transcript, in the session store | | `/reset soft` | Drops reused CLI backend session ids and reruns startup | The transcript and the conversation | | `/compact [instructions]` | Replaces older turns with a summary | The recent tail and the same conversation | | `/stop` | Aborts the run in progress | The whole session | ## Starting over: `/new` and `/reset` Use them when the topic changes completely, when a long thread has drifted, or when automatic recovery after a Gateway restart has given up and you want a clean replacement session. - `/new <model>` accepts a model alias, a `provider/model` reference or a provider name. If nothing matches, the text is treated as the first message of the new session. - Neither command deletes history. The previous transcript stays in the Gateway's session store and remains searchable; deleting a session is a separate operation. - A standalone `/new` or `/reset` is acknowledged without starting a model turn. Text sent after the command does run through the model. - `/reset soft` is not a way to clear context: it keeps the conversation and only refreshes startup. - In the browser Control UI, typed `/new` creates and switches to a fresh dashboard session, except in the agent's main session under `session.dmScope: "main"`, where it resets that main session in place. What the fresh session re-reads from the workspace memory files is a separate subject; the command decides only where the conversation restarts. ## Shrinking without starting over: `/compact` `/compact` forces the compaction that otherwise runs automatically near the context limit. Older turns are summarized into one entry saved in the transcript, recent messages stay intact, and the conversation continues. In the built-in runtime you can steer the summary, for example `/compact Focus on the API design decisions`, and the retained tail is sized by `agents.defaults.compaction.keepRecentTokens` (default 20,000). Choose it over `/new` when the thread still matters but its early detail does not. The full history stays on disk; compaction only changes what the model sees next, and `/status` shows how many compactions the session has had. ## Ending a run, not a session: `/stop` `/stop` aborts the current run in the active chat session. It does not clear context, change settings or touch the transcript, and the next message continues the same conversation. Cancellation is not rollback: what a tool already did stays done, and a compaction that already completed remains in the transcript. `/stop` gets through while the agent is busy because command-only messages from authorized senders are handled on a fast path that bypasses the message queue and the model. How other messages that arrive mid-run are queued or steered is a separate subject. ## How the commands must be sent 1. Send the command as the only content of its message; commands are standalone `/...` messages. 2. Send it as an authorized sender. When `commands.allowFrom` is set it is the only allowlist; otherwise authorization follows the channel's allowlists and pairing. On external channels an unauthorized command-only message is silently ignored. 3. Read the acknowledgement, then send `/status` if you want to confirm the model, context usage and toggles the session now has.
- Why does an OpenClaw chat still remember yesterday's conversation this morning?Because as of 2026.9.9 there is no timed reset unless `session.reset` is configured; since 2026.8.1 a session without a policy stays open across days and compaction keeps it within the context window. For a daily fresh start set `session.reset` to `mode: "daily"` with `atHour` (local to the Gateway host), or `mode: "idle"` with `idleMinutes`. With both, whichever expires first wins, and `resetByType` can differ for direct, group and thread sessions.
- When is `/compact` the better choice than `/new` in OpenClaw?When the thread's goal and recent decisions still matter but the early detail is crowding the context. `/compact` summarizes the older turns, keeps the recent tail and continues the same conversation, and you can add focus text such as `/compact Keep the deployment decisions`. `/new` is for a change of subject or a thread that has drifted: the model starts without the old turns, while the transcript stays stored.
- Does `/stop` undo what the agent already did in that run?No. `/stop` aborts the current run from that point on. Work a tool already completed is not reversed, and a compaction that already finished stays in the transcript. The session's history and settings are untouched, so the next message continues the same conversation.
- OpenClaw's /reset deletes the conversation's transcript from disk.
- /compact throws the conversation away and starts an empty session.
- /stop clears the session context so the next message starts fresh.
- In OpenClaw 2026.9.9, every session resets automatically each night by default.
- /reset soft is the way to clear a context that has grown too large.
Assumes OpenClaw 2026.9.9; since release 2026.8.1 a session without a configured session.reset policy stays open across days, so manual commands and compaction are what bound it.