Skip to content
Guides

The OpenClaw btw command

A side question about the current session that never enters its history, and how it differs from side chat

4 min read

Halfway through a long run you want to know which file the agent is editing, or what an error means, without that question and its answer becoming part of the session’s future context. OpenClaw’s btw command, alias side, asks exactly that kind of side question about the current session without adding it to the conversation history. It is modelled after Claude Code’s command of the same name and adapted to the Gateway and its multi-channel architecture. Here is what it does, how it runs on the different runtimes, what it deliberately does not do, how it is delivered and rendered, and when to reach for it.

What it does

  • It snapshots the current session as background context, including any in-flight main-run prompt.
  • It runs a separate one-shot side query that tells the model to answer only the side question and not to resume or steer the main task.
  • It delivers the answer as a live side result rather than a normal assistant message.
  • It never writes the question or the answer to session history or the chat history, and when the runtime reports usage, completed side questions report it through the diagnostics pipeline without touching session-derived cost totals.
The main run, if one is active, is left untouched.

Runtimes and the other contract

The docs keep two side-question contracts deliberately separate. Btw is a one-shot question on the session’s actual model, preserving harness behaviour for channel ingress such as WhatsApp, Telegram and Discord, the TUI and the embedded local TUI. Side chat, by contrast, is a persistent read-only RPC thread for Control UI class clients; its first question lazily prepares bounded visible context from the selected session, a temporary history failure stays retryable rather than running as an empty session, and channels cannot use it because they have no RPC connection. For Codex harness sessions, btw forks the active app-server thread into an ephemeral child instead of making a separate provider call, keeping Codex OAuth and native tool and thread behaviour intact, inheriting the parent’s approval policy, sandbox and tool surface, and adding a boundary prompt that marks everything before it as inherited reference context; an existing Codex thread is required, so send a normal message first. For CLI runtime aliases, btw invokes the owning backend in one-shot side-question mode with sanitised context seeded into a fresh invocation and tool bundling and session reuse disabled; direct runtimes use a direct one-shot provider call.

What it does not do

  • It creates no durable session, does not continue the unfinished main task, and persists nothing to transcript history; detached results do not survive a reload, while the Control UI side chat can rehydrate its in-memory thread after a reload but is cleared by a session reset, a Gateway restart, idle expiry or the rail’s clear button.
  • Normal assistant chat uses the Gateway chat event; detached btw uses a separate side-result event so clients cannot mistake it for conversation history, and the Control UI does not consume that event at all, calling the companion RPCs and rendering their bounded exchange state in its rail instead.
  • Surfaces differ: the TUI renders the answer inline, visibly distinct and dismissible with Enter or Escape; external channels get a clearly labelled one-off reply since they have no local overlay; and the Control UI routes both commands to the expanded side chat, keyed by session, rehydrated from Gateway memory, preserving a failed question for retry, cleared with the trash button and collapsed with Escape. Highlighting text in a Control UI message opens a popup whose one action opens the rail with a quoted draft to ask about the selection, under the same semantics.

Steering an active OpenClaw run is the command for the opposite intent, changing the main run, and OpenClaw slash commands the catalogue both belong to.

When to use it

Use it for a quick clarification, a factual side answer while a long run is in progress, or a temporary answer that should not enter future context: which file are we editing, summarise the task in one sentence, a bit of arithmetic. Anything you want to become part of the session’s working context belongs in a normal message instead. OpenClaw sessions explains the history it stays out of, and OpenClaw thinking levels the reasoning levels the side call can use.

On Diali

On Diali the side question works from any connected chat channel as a labelled one-off reply, and nothing from it lands in the history the dashboard shows. Hosted OpenClaw on Diali is the assistant and OpenClaw and Claude Code the tool the command was modelled on.

  • One-shot, on the session’s model, out of history.
  • Codex forks a thread; CLI backends run fresh.
  • A side result event, never a chat event.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.