Use when work should span one or more detached tasks but still behave like one job with a single owner context. ClawFlow is the runtime substrate under authoring layers like Lobster, acpx, or plain code. Keep conditional logic in the caller; use ClawFlow for flow identity, waiting, outputs, and user-facing emergence.
Use ClawFlow when a job needs to outlive one prompt or one detached run, but you still want one owner session, one thread context, and one place to inspect or resume the work.
It does not own branching or business logic. Put that in Lobster, acpx, or the calling code.
createFlow(...)runTaskInFlow(...)setFlowWaiting(...) or setFlowOutput(...)resumeFlow(...)emitFlowUpdate(...) only when neededfinishFlow(...) or failFlow(...)const flow = createFlow({
ownerSessionKey,
goal: "triage inbox",
});
const classify = runTaskInFlow({
flowId: flow.flowId,
runtime: "acp",
task: "Classify inbox messages",
currentStep: "wait_for_classification",
});
resumeFlow({
flowId: flow.flowId,
currentStep: "route_results",
});
setFlowOutput({
flowId: flow.flowId,
key: "classification",
value: { route: "business" },
});
Use the flow runtime for state and task linkage. Keep decisions in the authoring layer:
business → post to Slack and waitpersonal → notify the owner nowlater → append to an end-of-day summary bucketskills/clawflow/examples/inbox-triage.lobsterskills/clawflow/examples/pr-intake.lobsterskills/clawflow-inbox-triage/SKILL.md for a concrete routing pattern