Skip to main content
You get the work back from the last step that finished, not from the start and not from the model’s memory of what it was doing. A run under the supervised runner writes each step to a record as it happens. Kill the process, start it again, and a replacement worker reads the record and carries on. Steps that finished are never repeated. A step that was mid-flight when the worker died runs again only if its binding declares it safe to retry; otherwise the run pauses and asks a person to reconcile it, so uncertain work is never repeated silently.

In Obversa

The runner starts the worker with a restart budget and a time limit, and a crashed worker is replaced inside them:
examples/supervised-run.ts (excerpt)
restart.maxRestarts caps how many replacement workers the run gets, with a backoff between them. readSupervisedRunStatus reads the run’s phase and whether a worker is alive from any process that shares the storage, so you can see what happened without taking the run over. Starting a run again is not an approval: a question that was waiting for a person is still waiting.

Durable execution

Durable execution is the phrase for systems such as Temporal that replay an event history on a service and keep a process alive for days across many workers. Obversa is a library with no server: the record is a file on one machine, and a run carries on from it. Do I need Temporal to survive a crash? draws the line.

Next steps