11---
22title : Durable Core Beta 3 Architecture
3- summary : " Review anchor for the opt-in durable runtime architecture, boundaries, stack order, and PR body language on the beta 3 line."
3+ summary : " Architecture anchor for opt-in durable runtime invariants and boundaries on the beta 3 line."
44read_when :
5- - Reviewing the durable runtime beta 3 stack
6- - Checking the durable core boundary before implementation PRs
7- - Writing or reviewing cumulative durable-runtime PR bodies
5+ - Reviewing durable runtime beta 3 architecture
6+ - Checking durable runtime owner boundaries before implementation
7+ - Auditing recovery, wake, and delivery invariants
88---
99
1010# Durable Core Beta 3 Architecture
1111
12- This page is the PR1 docs/RFC anchor for the beta 3 durable-runtime stack . It
13- describes the intended architecture and review boundary only. It does not claim
14- that runtime behavior, external delivery, replay, worker recovery, or CLI/Gateway
15- control behavior has landed in this PR .
12+ This page is the beta 3 durable-runtime architecture anchor . It describes the
13+ intended architecture and review boundary only. It does not claim that runtime
14+ behavior, external delivery, replay, worker recovery, or CLI/Gateway control
15+ behavior has landed from this document .
1616
1717## General Durable Runtime RFC
1818
1919Durable core is the shared, opt-in runtime substrate beneath OpenClaw agent,
20- session, subagent, task, channel, and operator surfaces. Its job is to record
21- runtime facts that must survive process restarts: accepted work identity,
22- ordered steps and events, parent/child links, bounded refs, leases, recovery
23- states, wake/attention obligations, delivery evidence, and read-only inspection
24- state.
25-
26- The durable runtime layer exists because no single product surface can safely
27- own those facts. Task Flow, Workboard, channel UI, plugins, and session UX may
28- project from durable facts, but they must not define the persistence boundary.
29- The core must remain useful when those products are disabled, absent, or
30- changing independently.
20+ session, subagent, task, channel, and operator surfaces. Its job is to define
21+ the cross-owner invariants for runtime facts that must survive process restarts:
22+ accepted work identity, ordered steps and events, parent/child links, bounded
23+ refs, leases, recovery states, wake/attention obligations, delivery evidence,
24+ and read-only inspection state.
25+
26+ The durable runtime layer builds on the existing local state owners in
27+ ` openclaw.sqlite ` . The target base already persists audit events, state leases,
28+ task and subagent runs, durable delivery queues, task delivery state, and flow
29+ runs. This RFC is not a competing ledger for those owners. It names the residual
30+ contracts needed when facts cross owner boundaries: stable refs, append-only
31+ event evidence, lease expiry, terminal immutability, wake/attention routing,
32+ dedupe, inspection, and fail-closed recovery.
3133
3234The RFC boundary is intentionally conservative:
3335
@@ -45,15 +47,18 @@ The RFC boundary is intentionally conservative:
4547
4648OpenClaw is no longer only a synchronous chat loop. It now spans long-running
4749agent turns, subagents, tool calls, channel delivery, local operator inspection,
48- and process restarts. Without a durable substrate, the only common record is the
49- transcript plus process-local memory. That is not enough to prove whether a
50- child run was spawned, whether a side effect already happened, whether a parent
51- is waiting on fan-in, or what a restart may safely reclaim.
52-
53- Durable core gives OpenClaw a local-first operational record for those runtime
54- facts. The record is meant to answer what OpenClaw accepted, what ran, what is
55- waiting, what failed, what became stale after restart, and which bounded recovery
56- action is safe to present to an owner or operator.
50+ and process restarts. Existing durable owners already record important parts of
51+ that work in ` openclaw.sqlite ` , including audit events, leases, task/subagent
52+ state, delivery queue entries, task delivery state, and flow runs.
53+
54+ The remaining architecture problem is cross-owner consistency. A task row,
55+ subagent run, delivery queue entry, flow run, and audit event can each be valid
56+ on its own while still leaving unclear whether a parent is waiting on fan-in,
57+ whether a side effect already happened, whether a wake was delivered, or what a
58+ restart may safely reclaim. Durable core gives those owners shared invariants so
59+ OpenClaw can answer what it accepted, what ran, what is waiting, what failed,
60+ what became stale after restart, and which bounded recovery action is safe to
61+ present to an owner or operator.
5762
5863## Why Beta 3 Needs This Foundation
5964
@@ -64,7 +69,7 @@ message did not arrive"; it is that OpenClaw can accept work, delegate it, defer
6469it, or route it through a channel without a durable obligation that later code
6570can inspect, recover, acknowledge, or fail closed.
6671
67- The root causes PR2 through PR5 must address are:
72+ The remaining root causes implementation work must address are:
6873
6974- ** Coordinator silence:** a coordinator can promise later progress or
7075 completion, then depend on transcript intent and voluntary follow-up instead
@@ -86,24 +91,21 @@ The root causes PR2 through PR5 must address are:
8691 unsafe unless idempotency and authority gates prove it.
8792
8893This foundation lets beta 3 treat those cases as inspectable runtime states
89- instead of as unrelated prompt, channel, or UI bugs. PR1 only documents that
90- boundary and proof model; implementation and runtime claims remain deferred to
91- the later PRs that add and validate code.
92-
93- ## Stack Position
94+ instead of as unrelated prompt, channel, or UI bugs. This page documents the
95+ boundary and proof model; implementation and runtime claims belong to the
96+ changes that add and validate code.
9497
95- PR1 is the docs/RFC/boundary anchor for a cumulative five-PR stack:
98+ ## Implementation Position
9699
97- | PR | Scope | Boundary |
98- | --- | ----------------------------------------------------------------- | --------------------------------------------------------------------------- |
99- | PR1 | Architecture, boundary, reviewer language, and test plan | Docs-only review anchor; no runtime behavior claim |
100- | PR2 | Runtime foundation, SQLite store, and terminal immutability guard | Durable primitives and storage invariants |
101- | PR3 | Wake targets, producers, replay/resume semantics | Attention obligation and idempotent recovery paths |
102- | PR4 | Controls, inspection, CLI, and Gateway surface | Read/control APIs over durable facts |
103- | PR5 | Internal session delivery handoff and final hardening | Cumulative durable core; internal handoff only unless external proof exists |
100+ Durable runtime implementation should extend the existing state owners where
101+ they already own the fact, then add shared contracts only for cross-owner
102+ questions those tables cannot answer alone. New records should be source-backed
103+ by a concrete invariant, migration, recovery path, or inspection need.
104104
105- Every later branch must be based on the previous PR head. PR5 is therefore the
106- cumulative top of the stack, not a standalone handoff-only patch.
105+ Architecture review should check whether each proposed durable fact has a clear
106+ owner, retention posture, privacy posture, disabled-runtime behavior, stale-owner
107+ handling, and read path. If an existing owner can answer the question without a
108+ new shared record, prefer the existing owner.
107109
108110## Durable Core Boundary
109111
@@ -167,12 +169,13 @@ user, or create new work.
167169
168170Internal session delivery-queue handoff satisfies the durable-core delivery
169171boundary only for a resolved session target. External channel transport remains a
170- separate delivery claim and must not be implied by PR1 or by the internal handoff
171- unless a later PR implements and proves it.
172+ separate delivery claim and must not be implied by this RFC or by the internal
173+ handoff unless implementation work proves it directly .
172174
173175## Non Goals
174176
175- - No runtime code, schema, worker, CLI, Gateway, or transport changes in PR1.
177+ - No runtime code, schema, worker, CLI, Gateway, or transport changes from this
178+ docs-only RFC.
176179- No default-on durable runtime behavior in beta 3.
177180- No product-specific task-card or Workboard policy in durable core.
178181- No raw prompt, task, or tool-payload persistence by default.
@@ -181,26 +184,6 @@ unless a later PR implements and proves it.
181184- No external delivery claim without direct implementation and live or
182185 maintainer-grade proof.
183186
184- ## PR Body Requirements
185-
186- Every PR in the durable stack should keep stable reviewer-facing headings so
187- ClawSweeper and human reviewers can compare scope and proof across exact heads:
188-
189- - ` Context capsule `
190- - ` Stack position `
191- - ` What Problem This Solves `
192- - ` Why This Change Was Made `
193- - ` User Impact `
194- - ` Proof matrix `
195- - ` Live proof `
196- - ` ClawSweeper requirements `
197- - ` Evidence `
198-
199- Each body must name root cause and stack context, record base/head SHAs, describe
200- non-scope, state data-model and upgrade/default posture, and say which downstream
201- PR owns deferred behavior. PR1 should explicitly say live/runtime proof is not
202- applicable because the branch is docs-only.
203-
204187## Related
205188
206189- [ Durable Core Beta 3 Test Plan] ( /specs/durable-core-beta3-test-plan )
0 commit comments