Skip to content

docs: propose durable agent coordination kernel - #97507

Closed
mjnkao wants to merge 2 commits into
openclaw:mainfrom
mjnkao:codex/openclaw-durable-rfc-refresh
Closed

mjnkao wants to merge 2 commits into
openclaw:mainfrom
mjnkao:codex/openclaw-durable-rfc-refresh

Conversation

@mjnkao

@mjnkao mjnkao commented Jun 28, 2026 •

Copy link
Copy Markdown

What Problem This Solves

OpenClaw has several existing durable-ish surfaces: background tasks for detached work, Task Flow for multi-step orchestration, Workboard for operator/task visibility, sessions for transcript state, and subagents for delegation. The open architecture question is whether these surfaces should share a small native coordination kernel so branching agent work can expose parent/child identity, fan-in readiness, restart recovery markers, and bounded observability without turning OpenClaw into a general-purpose workflow platform.

This RFC is intentionally proposal-only. It does not claim the durable kernel already exists on main, and it does not ask to replace Task Flow, background tasks, Workboard, or sessions. It gives maintainers a focused architecture boundary to approve, redirect into Task Flow internals, or narrow into a shared task/session module before implementation PRs go deeper.

Most useful validation evidence for this docs PR is review-focused rather than runtime-focused: it replaces the earlier broad docs stack, keeps public docs language explicitly proposed, names non-goals, and asks maintainers to decide the storage/core boundary before any default-on behavior exists.

Summary

This is a replacement RFC for the earlier durable-core docs PR (#97467). It keeps the proposal intentionally small and avoids describing implementation as if it already exists on main.

The RFC proposes a durable agent coordination kernel underneath existing OpenClaw surfaces:

  • background tasks remain the detached-work ledger;
  • Task Flow remains the multi-step orchestration surface;
  • Workboard remains an optional operator/card surface;
  • sessions remain the model-visible transcript boundary;
  • the proposed kernel only owns coordination identity, event ordering, child links, fan-in readiness, restart recovery markers, and bounded observability.

Why This Shape

ClawSweeper correctly noted that the previous docs stack was hard to review because it documented future code as present behavior and overlapped with Task Flow/product direction. This replacement is proposal-only and asks for maintainer alignment before deeper implementation.

Non-Goals

  • No Temporal/Restate/Hatchet/LangGraph clone.
  • No default-on behavior change.
  • No raw prompt/task persistence in coordination metadata.
  • No plugin/dashboard/channel coupling.
  • No claim that Task Flow or Workboard should be replaced.

Review Focus

Please review whether this is the right architectural boundary for future work:

  1. Should this live as a standalone core runtime module, inside Task Flow internals, or as a narrower shared task/session submodule?
  2. Is shared state/openclaw.sqlite the right lifecycle home for the first local-first ledger?
  3. Is the proposed primitive set small enough for upstream OpenClaw?

Evidence

Docs-only RFC. No runtime behavior ships from this branch, so no runtime tests were run for this branch.

Validation evidence for this PR:

  • The document is explicitly framed as an architecture proposal, not current product behavior.
  • It preserves Task Flow, background tasks, Workboard, and sessions as existing supported surfaces.
  • It narrows the durable-kernel ownership to coordination identity, event ordering, child links, fan-in readiness, restart recovery markers, and bounded observability.
  • It lists non-goals to avoid implying a Temporal/Restate/Hatchet/LangGraph replacement or a default-on runtime change.
  • The companion implementation PR feat(durable): add opt-in agent coordination kernel #97508 carries runtime validation for the opt-in slice while this RFC remains the maintainer architecture decision point.

2026-06-30 Update: Recommended Boundary

The RFC now includes a recommended maintainer decision rather than only open questions:

  • keep the durable ledger as a small standalone core runtime primitive;
  • expose it to Task Flow, Workboard, CLI, and Control UI through Gateway-facing projections;
  • use shared state/openclaw.sqlite as the first local-first lifecycle home;
  • keep the MVP boundary at opt-in read-only inspection plus restart/upgrade safety.

The remaining product decisions are framed as non-blocking follow-ups: first operator surface, timeline retention/compaction, and doctor/migration checks before any default-on behavior. Companion implementation/proof is tracked in #97508.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jun 28, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 3:45 AM ET / 07:45 UTC.

Summary
Adds a proposal-only Markdown RFC under docs/specs recommending a small opt-in durable coordination ledger for agent work, shared SQLite storage, and Gateway-facing projections.

PR surface: Docs +155. Total +155 across 1 file.

Reproducibility: not applicable. This PR is a docs-only architecture RFC, not a bug report with a runtime reproduction path. Source review confirms the branch adds one docs/specs page.

Review metrics: none identified.

Root-cause cluster
Relationship: canonical
Canonical: #97507
Summary: This PR is the current proposal-only RFC for the durable coordination boundary; linked implementation and follow-up PRs depend on it but are not merged superseding targets.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Record maintainer acceptance or redirection of the durable coordination boundary before merging the public RFC.

Risk before merge

  • [P1] Merging this PR would publish a recommended core durable-ledger and shared-SQLite architecture before maintainers have accepted that boundary over Task Flow internals or a narrower task/session module.
  • [P1] The companion implementation and follow-up stack are still open, so schema, runtime, projection, and recovery details may change enough to make a public RFC stale.

Maintainer options:

  1. Keep Draft Until Boundary Is Accepted (recommended)
    Wait for a maintainer to choose core, Task Flow internals, or shared task/session ownership before publishing the RFC as in-tree direction.
  2. Land As Intentional Proposed Direction
    Maintainers can accept the public-docs product-direction risk if they want this proposal visible before the implementation stack settles.
  3. Defer To Implementation Review
    Pause or close the RFC if maintainers prefer to decide the durable boundary through the companion implementation and follow-up PRs first.

Next step before merge

  • [P2] The next action is maintainer architecture and storage-boundary judgment, not an automated docs repair.

Security
Cleared: The diff only adds a Markdown RFC under docs/ and introduces no executable, dependency, workflow, secret-handling, or supply-chain surface.

Review details

Best possible solution:

Keep the RFC as a draft discussion artifact until maintainers explicitly accept or redirect the durable coordination ownership boundary, then merge or revise it to match that decision.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR is a docs-only architecture RFC, not a bug report with a runtime reproduction path. Source review confirms the branch adds one docs/specs page.

Is this the best way to solve the issue?

Unclear as the final product solution: the RFC is a reasonable discussion artifact, but the best permanent fix depends on maintainer direction for core versus Task Flow versus a narrower task/session module.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 56c2d637d940.

Label changes

Label justifications:

  • P3: This is a docs-only draft RFC for future architecture direction, not an urgent regression or shipped runtime issue.
  • merge-risk: 🚨 other: Merging would publish an unaccepted durable-coordination architecture recommendation in public docs, a product-direction risk CI cannot settle.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed

PR surface:

Docs +155. Total +155 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 155 0 +155
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 155 0 +155

What I checked:

Likely related people:

  • vincentkoc: Recent commits and PR history show Task Flow restore/maintenance hardening, registry observer refactors, and automation docs work in the area the RFC would sit beneath or beside. (role: recent Task Flow and docs contributor; confidence: high; commits: 0f45630d1937, 7aa22959e47f, a2b6fdc3df11; files: src/tasks/task-flow-registry.ts, docs/automation/taskflow.md, docs/automation/tasks.md)
  • mbelinky: Merged PR history identifies this account with the minimal flow registry scaffold that underpins the current Task Flow surface. (role: Task Flow introducer; confidence: high; commits: 7590c22db7d2; files: src/tasks/flow-registry.ts, src/tasks/flow-registry.store.sqlite.ts, src/tasks/task-registry.ts)
  • steipete: History shows adjacent work sharing Task Flow create parameters and task runtime seams, both relevant to a proposed durable coordination primitive. (role: adjacent task/runtime refactor contributor; confidence: medium; commits: 2f84c47b8bc2; files: src/tasks/task-flow-registry.ts, src/plugins/runtime/runtime-tasks.types.ts, src/tasks)
  • tyler6204: Subagent descendant settlement and completion-routing history is relevant because the RFC targets child links, fan-in readiness, and restart recovery markers. (role: adjacent subagent contributor; confidence: medium; commits: 81b93b9ce04b; files: src/agents/subagent-registry.types.ts, src/agents/subagent-registry.ts, docs/tools/subagents.md)
  • giodl73-repo: Recent shared state schema work is relevant to the RFC's proposed use of the canonical shared SQLite database for a future coordination ledger. (role: recent shared-state schema contributor; confidence: medium; commits: d1b917120a47; files: src/state/openclaw-state-schema.sql, src/state/openclaw-state-db.generated.d.ts, src/state/openclaw-state-schema.generated.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@mjnkao
mjnkao force-pushed the codex/openclaw-durable-rfc-refresh branch from 0c0a6eb to 6416188 Compare June 28, 2026 14:56
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 28, 2026
@mjnkao
mjnkao force-pushed the codex/openclaw-durable-rfc-refresh branch from 6416188 to d9d81e0 Compare June 28, 2026 15:04

mjnkao commented Jun 28, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Updated the RFC with docs front matter (title, summary, read_when) to address the docs routing finding.

@clawsweeper

clawsweeper Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jun 28, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jun 28, 2026
@mjnkao

mjnkao commented Jun 28, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Updated PR body with the repository-required What Problem This Solves and Evidence sections. This remains proposal-only docs; the implementation/runtime proof is on companion PR #97508.

@mjnkao

mjnkao commented Jun 30, 2026

Copy link
Copy Markdown
Author

Update pushed for re-review.

This RFC now includes a concrete recommended maintainer decision instead of only open questions:

  • keep the durable ledger as a small standalone core runtime primitive;
  • expose it to Task Flow, Workboard, CLI, and Control UI through Gateway-facing projections;
  • use shared state/openclaw.sqlite as the local-first lifecycle home;
  • keep the MVP boundary at opt-in read-only inspection plus restart/upgrade safety.

The former open questions are now framed as non-blocking follow-ups so this RFC can be reviewed on the architecture boundary without pulling Task Flow, Workboard UI, retention, compaction, or worker policy into the first slice.

Companion implementation/proof remains #97508. Requesting a fresh reviewer-agent look specifically on whether this boundary is acceptable for upstream.

@mjnkao

mjnkao commented Jun 30, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Pushed RFC update in 46417e9. Please re-check the clarified recommended maintainer decision and non-blocking follow-up framing.

@clawsweeper

clawsweeper Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@mjnkao

mjnkao commented Jul 1, 2026

Copy link
Copy Markdown
Author

Replacement durable runtime stack submitted for review:

I am not closing this older PR yet. I will wait for reviewer/ClawSweeper feedback on the new PR stack first, then close or supersede the old PRs once the replacement direction is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant