BTW Side Questions: Ephemeral Queries in OpenClaw
Learn how the /btw command fires one-shot side questions about the current session without saving them to history, and how it differs from the companion RPC thread for channel and TUI users.
Read this when
- You want to ask a quick side question about the current session
- You are implementing or debugging BTW behavior across clients
/btw (alias /side) fires off a brief side question about the current session without recording it in the conversation history. Its design draws from Claude Code's /btw, reworked for OpenClaw's Gateway and multi-channel setup.
The two side-question contracts are intentionally kept apart. BTW operates as a single-shot query on the session's live model, preserving harness behavior and Codex thread-fork continuity for channel ingress (WhatsApp, Telegram, and Discord), the TUI, and embedded tui --local; the TUI deliberately sticks with BTW. The companion, in contrast, is a persistent, read-only RPC thread meant for Control UI-class clients. Channels lack an RPC connection, so they cannot use the companion.
/btw what changed?
/side what does this error mean?
What it does
- Captures the current session as background context, including any in-flight main-run prompt.
- Executes a separate, one-shot side query that instructs the model to address only the side question and avoid resuming or redirecting the main task.
- Returns the response as a live side result, not as a standard assistant message.
- Refrains from writing either the question or the answer to session history or
chat.history.
If a main run is underway, it remains unaffected.
For Codex harness sessions, BTW forks the active Codex app-server thread into a temporary child thread instead of launching a separate provider call. This preserves Codex OAuth and native tool/thread behavior, and the forked thread inherits the parent thread's current approval policy, sandbox, and native tool surface. The forked thread receives a boundary prompt that tells the model everything before it is inherited reference context, not active instructions, and only messages after the boundary count as live. /btw needs an existing Codex thread; send a regular message first.
For CLI runtime aliases, BTW triggers the owning CLI backend in one-shot side-question mode: it injects sanitized conversation context into a fresh CLI invocation with tool bundling and reusable session state turned off, and appends any no-resume/no-tools flags the backend supports. Direct (non-CLI) runtimes instead rely on a direct one-shot provider call.
What it does not do
/btw does not establish a durable session, resume the unfinished main task, or persist question/answer data to transcript history. Detached BTW results vanish after a reload. The Control UI companion can restore its in-memory thread post-reload, but a session reset, Gateway restart, idle expiry, or the rail's clear button wipes that thread.
Delivery model
Standard assistant chat relies on the Gateway chat event. Detached BTW uses a distinct chat.side_result event so clients cannot confuse it with regular conversation history. The Control UI ignores that event; it invokes the session companion RPCs and displays their bounded exchange state in the rail.
Surface behavior
| Surface | Behavior |
|---|---|
| TUI | Rendered inline in the chat log, visibly distinct from a normal reply, dismissible with Enter or Esc. |
| External channels | Delivered as a clearly labeled one-off reply (Telegram, WhatsApp, Discord have no local ephemeral overlay). |
| Control UI / web | Routes /btw and /side to the expanded session rail companion. The read-only thread is keyed by session, rehydrates from Gateway memory, and can be cleared with the trash button. Esc collapses the rail. |
Selection popup (Control UI)
Selecting text within a chat message in the Control UI brings up a small popup with two choices:
- More details immediately asks the session rail companion to clarify the selected text within the current session's context.
- Ask in side chat opens the rail and populates its composer with a quoted draft so you can pose your own question about the selection.
Both options follow standard /btw semantics: the question and answer remain outside session history, and the main run stays untouched.
When to use it
Reach for /btw when you need a quick clarification, a factual side answer while a long run is ongoing, or a temporary response that should not leak into future session context.
/btw what file are we editing?
/btw summarize the current task in one sentence
/btw what is 17 * 19?
If you want something to become part of the session's future working context, pose it normally in the main session instead.
Related
-
Slash commands, Native command catalog and chat directives.
-
Thinking levels, Reasoning effort levels for the side-question model call.
-
Session, Session keys, history, and persistence semantics.
-
Steer command, Inject a steering message into the active run without ending it.