Skip to content

Error Handling

Failures are classified, recorded, and either retried or terminated. Executors no longer return TaskFailure effects.

Retryable vs Permanent

An activity handler throws a retryable or permanent error. Retryable failures use backoff and the same idempotency key. Permanent failures fail the command. Exhausted retries become dead letters and can be retried manually as a new attempt.

Saga Compensation

Use saga when completed side effects must unwind in reverse order. Each compensate is a durable service task. Compensation runs once.

Cancellation

cancel is a first-class terminal. It reaches pending work and attached spawned runs. Branch onCancel cleans up losers after race or quorum. Cancellation cannot un-write an external system; compensate explicitly.

Redrive

Redrive re-evaluates a failed or stuck run from current history. It is an audited operator action, not an automatic restart.

See Also