Every run should end honestly.
Return the useful result when the workflow has satisfied its requirements:
return { published: true, version };TypeScript and Python complete by returning. Go uses ctx.Complete(value) and
Rust returns Ok(value).
Use Blocked when the workflow cannot continue without new information or a
real-world change:
ctx.blocked("three probes failed; new evidence is required");Blocked is not an error to hide. It records the frontier so another session can understand why the work stopped.
Use Refused when the workflow deliberately declines to perform an action:
if (approval !== "yes") ctx.refused("release not approved");Refused is useful for rejected approvals, unsafe requests, or policy choices. It is distinct from a missing dependency or exhausted investigation.