Source reading · eight-part route

OpenClaw: from “can chat” to “can stay alive”

The hard part is not how a model writes one reply. It is how a message reaches the right Session, when a Tool may run, how child work returns, and which interrupted work can safely continue after restart. These eight chapters follow one source snapshot from a single message through always-on operation and recovery.

Eight-part OpenClaw source route: main path, Gateway, routing and sessions, context and memory, capability assembly, security, multi-agent, and recovery

How to use the route.Read 01–08 in order for a first tour. For diagnosis, jump directly to routing, context, capabilities, security, or recovery. Every chapter states its prerequisites near the top and keeps source links and official documentation at the end.

01 · Main path

How one message completes an Agent turn

Follow a message from ChannelPlugin through sessionKey, execution queues, the Embedded Agent, Tool events, and the final ReplyPayload.

Read the article →
02 · Gateway

Why the Gateway is a control plane

Separate operator, node, and restricted worker entry paths, then follow handshakes, authorization, and event delivery to see why gaps require a fresh state read.

Read the article →
03 · Routing and Sessions

Which history receives a message?

See how Bindings, dmScope, groupScope, and identityLinks produce sessionKey, then compare the execution order of Steer, Followup, Collect, and Interrupt.

Read the article →
04 · Context and Memory

What does the model actually see?

Separate model input, durable history, and summary views; follow Memory, Pruning, Compaction, and session maintenance after delivery.

Read the article →
05 · Capability assembly

How does an installed capability become callable?

Follow discovery, registration, and Policy filtering; distinguish ordinary tools from host-authorized capabilities, and direct schemas from deferred catalogs.

Read the article →
06 · Security

What does each of the four checks protect?

Separate Tool Policy, Sandbox, Exec Approval, and Elevated Mode to determine who may use a Tool, access a resource, and run a particular command.

Read the article →
07 · Multi-agent

How does delegation inherit and deliver work?

Compare configured Agents, Native Subagents, and ACP Harnesses, then trace the identity, context, and permissions a child receives and how completion returns.

Read the article →
08 · Always-on recovery

How does an Agent keep working across time?

Separate Heartbeat, Automations, Background Tasks, and Restart Recovery as they schedule, record, and deliver work—and stop replay when the outcome is uncertain.

Read the article →