ClawFlow
ClawFlow is the flow layer above Background 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. 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.TL;DR
- Tasks are the execution records.
- ClawFlow is the job-level wrapper above tasks.
- A flow keeps one owner/session context for the whole job.
- Use
openclaw flows list,openclaw flows show, andopenclaw flows cancelto inspect or manage flows.
Quick start
How it relates to tasks
Background tasks still do the low-level work:- ACP runs
- subagent runs
- cron executions
- CLI-initiated runs
- it keeps related task runs under one flow id
- it tracks the flow state separately from the individual task state
- it makes blocked or multi-step work easier to inspect from one place
Runtime substrate
ClawFlow is the runtime substrate, not a workflow language. It owns:- the flow id
- the owner session and return context
- waiting state
- small persisted outputs
- finish, fail, cancel, and blocked state
- Lobster
- acpx
- plain TypeScript helpers
- bundled skills
createFlow(...)runTaskInFlow(...)setFlowWaiting(...)setFlowOutput(...)appendFlowOutput(...)emitFlowUpdate(...)resumeFlow(...)finishFlow(...)failFlow(...)
Authoring pattern
The intended shape is linear:- Create one flow for the job.
- Run one detached task under that flow.
- Wait for the child task or outside event.
- Resume the flow in the caller.
- Spawn the next child task or finish.
CLI surface
The flow CLI is intentionally small:openclaw flows listshows active and recent flowsopenclaw flows show <lookup>shows one flow and its linked tasksopenclaw flows cancel <lookup>cancels the flow and any active child tasks
flows show also surfaces the current wait target and any stored output keys, which is often enough to answer “what is this job waiting on?” without digging into every child task.
The lookup token accepts either a flow id or the owner session key.
Related
- Background Tasks — detached work ledger
- CLI: flows — flow inspection and control commands
- Cron Jobs — scheduled jobs that may create tasks