The thing background work fears most is not failure — it is scattering. A multi-step task spread across several sessions, half-finished, with no clear owner, and all state lost after a restart. OpenClaw's official TaskFlow Skill pulls that kind of work into "one job": one owner, one context, one set of state — restarts, waits, and child tasks all managed inside a single container.
What it solves: single ownership for long-running work
One job, one home: multi-step background work has a clear flow identity, owner session, and requester origin — no scattering across sessions
Persisted state: currentStep, stateJson and waitJson are tracked end-to-end, so work resumes after a process restart
Child-task management: attaches subtasks with their parent flow id and waits for detached ACP / subagent tasks before continuing
Complete lifecycle: full finish / fail / cancel / waiting / blocked states with conflict-safe revisions
How it works: a clear division of responsibility
TaskFlow is deliberately restrained about its scope: it owns flow identity, owner context, step state, waits, and child-task links — but it does not own branching or business logic. Those belong to acpx, Lobster, or the calling code. That boundary is the design core: TaskFlow is a job container, not a business engine.
The canonical entry point is api.runtime.tasks.flow: use fromToolContext(ctx) when you already have trusted tool context, or bindSession() when the binding layer has already resolved the session and delivery context. Two binding paths let the skill adapt to different hosts.
Typical use cases
Multi-step content pipelines: fetch → clean → generate → publish, with every step's state inspectable and failures resumable
Waiting on external tasks: the main flow dispatches an ACP / subagent task, TaskFlow waits, and collects one clear update back to the owner on completion
Restart-surviving work: plugin or tool-level long jobs that must survive restarts and concurrent revision conflicts cleanly
How to use & download
OpenClaw users: taskflow is a built-in skill, used via the api.runtime.tasks.flow API; trigger it in natural language for persistent multi-step work. See OpenClaw docs.
Other agent users: follows the standard SKILL.md convention; you can build similar durable task orchestration. Source: OpenClaw GitHub repo.
Related resources
Combine with the orchestration set: ACP Router (acp-router) handles coding-agent dispatch, Spike (spike) validates ideas fast, and mcporter wires in MCP servers.