Skip to content
Guides

OpenClaw resume

How to continue the same conversation in your terminal, in a coding harness, or from a short link

7 min read

You started the conversation in the OpenClaw Control UI, the reply is half useful, and the next step needs your terminal and your files. Pasting the transcript into a fresh chat throws away the session, its routing metadata and anything still running inside it. OpenClaw's answer is that the conversation never moves: the terminal, a mobile client and a coding harness all attach to the session the Gateway already owns. Here is how that handoff works, what the short links in those URLs mean, and the one credential rule that catches people out.

What is actually being shared

  • The Gateway keeps shared session state, and the Control UI, mobile clients, ACP, openclaw tui and openclaw attach project that state instead of keeping independent session copies. That is what lets one session be open in several clients without exporting or copying its transcript.
  • Use openclaw tui when you want to continue the conversation in a terminal. Use openclaw attach when you want a coding harness beside the session, with a temporary MCP grant scoped to that one session.
  • Embedded local mode is a separate thing: openclaw tui --local, openclaw chat and openclaw terminal use the local agent runtime and cannot accept a session target at all. If the conversation you want lives on a Gateway, those commands are not the route to it.
  • A mobile node stays a peripheral connected to the Gateway and does not become a second session owner. Most agent session keys join three parts with colons, the literal agent, the agent id, and a rest segment, where that rest can be a simple name, several colon-delimited routing segments, or a value ending in a UUID.
The Gateway owns session rows, transcript history, routing metadata, and active runs.

One owner, several views

Clients select a session key and read or update that same state through the Gateway protocol, so there is nothing to synchronise between them and no second copy to drift. A Gateway configured with global session scope uses the canonical global session instead, and when an agent-only URL is opened against one of those, the CLI asks the Gateway for its session scope and resolves the URL to that canonical session. Paste a complete session URL at the CLI root and the TUI opens on the canonical session key the Gateway returns; it does not clone the transcript or create a new session. A key the Gateway cannot find produces recovery guidance rather than a new empty session, and the session access controls still apply to whoever pasted the link.

The three target syntaxes

  • A complete Control UI URL, such as https://claw.example.com/dashboard/main/deploy-monitor-6db92d48. A URL or gateway shorthand authoritatively selects one normalised Gateway origin.
  • Gateway shorthand, the compact host, agent and reference form, such as claw.example.com/main/deploy-monitor-6db92d48.
  • A bare short reference or a full key, such as deploy-monitor-6db92d48 or agent:main:telegram:12345. Bare references use the configured or default Gateway rather than selecting one of their own.

The short reference is not a nickname. For a key whose rest ends in a UUID, the shareable short form takes 8 to 32 lowercase hexadecimal characters from the start of that UUID with the UUID dashes removed, and that short ID is the authoritative part; the display-name slug is decorative unless two sessions share the same prefix, in which case one exact slug match breaks the tie. For CLI short-link targets the agent segment is decorative too, because the Gateway resolves the short ID without constraining it to the agent named in the URL. Resolution belongs to the Gateway method sessions.resolve, which owns exact keys, raw session IDs, labels and short IDs, filters discovery selectors by the calling client's session visibility, and returns at most ten recent candidates when a short ID is ambiguous, so the client can ask you for a longer prefix instead of guessing. One requirement runs under all of it: short links need a current Gateway, and an older or custom one that rejects the shortId selector leaves you copying the full session key by hand. For the layer underneath, How OpenClaw routes sessions explains how an incoming message lands in a particular session, and The OpenClaw Gateway explained explains the process that owns them.

Continue in terminal, and what the command does not carry

From the Control UI, open the session header menu and choose Continue in terminal. The dialog copies a credential-free openclaw resume command carrying one opaque, versioned handoff argument that encodes only the exact agent-qualified session key and the selected Gateway WebSocket URL, with that key bounded to 512 user-perceived characters. Its URL-safe alphabet needs no shell quoting, so the same pasted line is safe in common POSIX shells, in PowerShell and in cmd.exe. What it does not carry is authorisation, because session URLs must not contain credentials: run it in an OpenClaw CLI profile that is already configured for that Gateway, since the terminal authenticates independently, and pass --token or --password separately when first pairing with an origin. Query-routed Gateway URLs cannot produce this credential-free command at all, because Gateway authentication and stored device scope are not query-aware, so use a manually authenticated CLI target or configure a queryless Gateway URL. Pairing and device approval covers approving that first connection, after which later connections to the same origin can use the stored device token. The other half of this is openclaw attach: the Gateway resolves the session first, then mints a temporary grant scoped to that session and launches the coding harness with a strict MCP configuration, the bearer token travels in the child environment instead of argv, and a normal launch revokes the grant when the harness exits; OpenClaw and Claude Code is the tool on the other end of it.

On Diali

Diali hosts OpenClaw, so the Gateway that owns these session rows is ours to keep running rather than yours. Each customer runs their own assistant, its runtime configuration is generated from the dashboard and replaced at each release, and its state sits on a persistent volume, which is why a session you opened last week is still there to resume today; daily snapshots and one-click restore are available through the Backups add-on (included on Max). Hosted OpenClaw on Diali sets out what the hosted runtime includes, and Diali pricing what the plans cost.

  • The session stays on the Gateway, only the client changes.
  • The short ID is the identity, the slug is decoration.
  • Pair the terminal with that origin before the copied command will run.
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.