What problem does it solve? Long-running background work often spans multiple prompts, detached subagent runs, and external waits, making it hard to keep one owner context, one resumable state, and one place to inspect progress. TaskFlow solves this by giving multi-step jobs a durable identity with persisted state, wait metadata, and conflict-safe mutations. ## Core Features & Use Cases - Managed flow lifecycle: Create, run child tasks, wait, resume, finish, fail, or cancel a flow through api.runtime.tasks.flow with revision-checked mutations. - Persisted state and waits: Store resumable state in stateJson and structured wait reasons in waitJson so jobs survive restarts and external delays. - Child task linkage: Use runTask(...) to attach detached ACP or subagent tasks to a parent flow and inspect them with getTaskSummary(flowId). - Use Case: An inbox-triage plugin classifies messages in a detached task, waits on a Slack reply, then resumes to finalize and finish — all tracked as one flow with one owner session. ## Quick Start Ask the agent to create a managed TaskFlow for your multi-step background job, run its first detached task, and set the flow to waiting until the external reply arrives.