You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f86e5c0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Docs: https://docs.openclaw.ai
25
25
- Flows/tasks: add a minimal SQLite-backed flow registry plus task-to-flow linkage scaffolding, so orchestrated work can start gaining a first-class parent record without changing current task delivery behavior.
26
26
- Flows/tasks: route one-task ACP and subagent updates through a parent flow owner context, so detached work can emerge back through the intended parent thread/session instead of speaking only as a raw child task.
27
27
- Flows/tasks: persist blocked state on one-task flows and let the same flow reopen cleanly on retry, so blocked detached work can carry a parent-level reason and continue without fragmenting into a new job.
28
+
- ClawFlow: add the first linear flow control surface with `openclaw flows list|show|cancel`, keep manual multi-task flows separate from one-task auto-sync flows, and surface doctor recovery hints for obviously orphaned or broken flow/task linkage.
28
29
- Matrix/history: add optional room history context for Matrix group triggers via `channels.matrix.historyLimit`, with per-agent watermarks and retry-safe snapshots so failed trigger retries do not drift into newer room messages. (#57022) thanks @chain710.
29
30
- Diffs: skip unused viewer-versus-file SSR preload work so `diffs` view-only and file-only runs do less render work while keeping mode outputs aligned. (#57909) thanks @gumadeiras.
30
31
- Matrix/threads: add per-DM `threadReplies` overrides and keep thread session isolation aligned with the effective room or DM thread policy from the triggering message onward. (#57995) thanks @teconomix.
@@ -33,6 +34,7 @@ Docs: https://docs.openclaw.ai
33
34
- Slack/exec approvals: add native Slack approval routing and approver authorization so exec approval prompts can stay in Slack instead of falling back to the Web UI or terminal. Thanks @vincentkoc.
34
35
35
36
### Fixes
37
+
36
38
- Image generation/build: write stable runtime alias files into `dist/` and route provider-auth runtime lookups through those aliases so image-generation providers keep resolving auth/runtime modules after rebuilds instead of crashing on missing hashed chunk files.
37
39
- Config/runtime: pin the first successful config load in memory for the running process and refresh that snapshot on successful writes/reloads, so hot paths stop reparsing `openclaw.json` between watcher-driven swaps.
38
40
- Config/legacy cleanup: stop probing obsolete alternate legacy config names and service labels during local config/service detection, while keeping the active `~/.openclaw/openclaw.json` path canonical.
summary: "ClawFlow workflow orchestration for background tasks and detached runs"
3
+
read_when:
4
+
- You want a flow to own one or more detached tasks
5
+
- You want to inspect or cancel a background job as a unit
6
+
- You want to understand how flows relate to tasks and background work
7
+
title: "ClawFlow"
8
+
---
9
+
10
+
# ClawFlow
11
+
12
+
ClawFlow is the flow layer above [Background Tasks](/automation/tasks). Tasks still track detached work. ClawFlow groups those task runs into a single job, keeps the parent owner context, and gives you a flow-level control surface.
13
+
14
+
Use ClawFlow when the work is more than a single detached run. A flow can still be one task, but it can also coordinate multiple tasks in a simple linear sequence.
15
+
16
+
## TL;DR
17
+
18
+
- Tasks are the execution records.
19
+
- ClawFlow is the job-level wrapper above tasks.
20
+
- A flow keeps one owner/session context for the whole job.
21
+
- Use `openclaw flows list`, `openclaw flows show`, and `openclaw flows cancel` to inspect or manage flows.
22
+
23
+
## Quick start
24
+
25
+
```bash
26
+
openclaw flows list
27
+
openclaw flows show <flow-id-or-owner-session>
28
+
openclaw flows cancel <flow-id-or-owner-session>
29
+
```
30
+
31
+
## How it relates to tasks
32
+
33
+
Background tasks still do the low-level work:
34
+
35
+
- ACP runs
36
+
- subagent runs
37
+
- cron executions
38
+
- CLI-initiated runs
39
+
40
+
ClawFlow sits above that ledger:
41
+
42
+
- it keeps related task runs under one flow id
43
+
- it tracks the flow state separately from the individual task state
44
+
- it makes blocked or multi-step work easier to inspect from one place
45
+
46
+
For a single detached run, the flow can be a one-task flow. For more structured work, ClawFlow can keep multiple task runs under the same job.
47
+
48
+
## CLI surface
49
+
50
+
The flow CLI is intentionally small:
51
+
52
+
-`openclaw flows list` shows active and recent flows
53
+
-`openclaw flows show <lookup>` shows one flow and its linked tasks
54
+
-`openclaw flows cancel <lookup>` cancels the flow and any active child tasks
55
+
56
+
The lookup token accepts either a flow id or the owner session key.
57
+
58
+
## Related
59
+
60
+
-[Background Tasks](/automation/tasks) — detached work ledger
61
+
-[CLI: flows](/cli/flows) — flow inspection and control commands
62
+
-[Cron Jobs](/automation/cron-jobs) — scheduled jobs that may create tasks
Copy file name to clipboardExpand all lines: docs/automation/index.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,19 @@ The most effective setups combine multiple mechanisms:
51
51
3.**Hooks** react to specific events (tool calls, session resets, compaction) with custom scripts.
52
52
4.**Standing Orders** give the agent persistent context ("always check the project board before replying").
53
53
5.**Background Tasks** automatically track all detached work so you can inspect and audit it.
54
+
6.**ClawFlow** groups related detached tasks into a single flow when the work needs a higher-level job view.
54
55
55
56
See [Cron vs Heartbeat](/automation/cron-vs-heartbeat) for a detailed comparison of the two scheduling mechanisms.
56
57
58
+
## ClawFlow
59
+
60
+
ClawFlow sits above [Background Tasks](/automation/tasks). Tasks still track the detached runs, while ClawFlow groups related task runs into one job that you can inspect or cancel from the CLI.
61
+
62
+
See [ClawFlow](/automation/clawflow) for the flow overview and [CLI: flows](/cli/flows) for the command surface.
63
+
57
64
## Related
58
65
59
66
-[Cron vs Heartbeat](/automation/cron-vs-heartbeat) — detailed comparison guide
Copy file name to clipboardExpand all lines: docs/automation/tasks.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,12 @@ A sweeper runs every **60 seconds** and handles three things:
210
210
211
211
## How tasks relate to other systems
212
212
213
+
### Tasks and ClawFlow
214
+
215
+
ClawFlow is the flow layer above tasks. A flow groups one or more task runs into a single job, owns the parent session context, and gives you a higher-level control surface for blocked or multi-step work.
216
+
217
+
See [ClawFlow](/automation/clawflow) for the flow overview and [CLI: flows](/cli/flows) for the command surface.
218
+
213
219
### Tasks and cron
214
220
215
221
A cron job **definition** lives in `~/.openclaw/cron/jobs.json`. **Every** cron execution creates a task record — both main-session and isolated. Main-session cron tasks default to `silent` notify policy so they track without generating notifications.
@@ -233,7 +239,9 @@ A task's `runId` links to the agent run doing the work. Agent lifecycle events (
233
239
## Related
234
240
235
241
-[Automation Overview](/automation) — all automation mechanisms at a glance
0 commit comments