Cancellation and Failures

WOML distinguishes failure, cancellation, timeout, and ambiguous interruption because they imply different recovery behavior.

Cancel a run

Terminal
woml cancel <runId>

Rust records the request, stops new work, signals active workers and capabilities, invalidates approvals, preserves committed effects, and then runs on-cancel and on-complete.

Cancellation does not roll back external side effects or automatically cancel independently started child workflows. A synchronous child call remains part of the parent's outcome boundary.

Failed runs never print partial output as a successful workflow result. Use woml get <runId> and logs for safe failure details.

Request cancellation

Terminal
woml list --status running
woml cancel run_123
woml get run_123

Cancellation is a durable request, not an operating-system kill. The engine records it, closes admission for new owned work, signals active workers and managed capabilities, invalidates pending approval authority, and settles the run through lifecycle hooks.

Repeated cancellation is idempotent. A run whose business outcome is already decided rejects a contradictory late cancellation.

Know what cancellation cannot undo

Cancellation preserves completed effects. It cannot un-send a message, un-charge a card, or reverse a committed database transaction. Model compensation as explicit business steps when the domain requires it; WOML v1 does not provide automatic sagas.

Independently started child workflows keep their own ownership. Cancelling the parent does not automatically cancel them. A waiting synchronous call participates in the parent's outcome boundary, but the child remains an independently durable run.

Distinguish failure categories

A script throw, workflow timeout, operator cancellation, provider failure, and ambiguous process interruption are different outcomes. Do not flatten them into one generic retry loop. Inspect stable diagnostic codes and ambiguous metadata before deciding whether any external effect is safe to repeat.

Partial internal step results may exist in durable history for diagnosis, but WOML never presents them as a successful final workflow result.