resume: true reads what finished, takes those stages as done, and
runs the rest. This file is one three-stage team, gather the facts, draft
the report, check the draft, run by two workers in turn: the first is
stopped the moment its first stage finishes, and the second is given the
record and completes the run. The single seat is asked exactly twice.
Run it
Set the project up as Installation describes. Copy the file withbriefs/, logs/ and tools/ beside it, sign in to
Claude Code, and run it from that directory:
Terminal
Output, from the offline proof
gather and
was stopped; its run ended as aborted with the gather stage finished on the
record. The second worker took gather from the record without running
it, ran draft, ran the check, and completed. The seat wrote the facts
once and the draft once. records/weekly-report.jsonl holds both workers’
events in order.
The file
The team is oneworkflow(): two writing stages and a check whose exit
code fails the draft if an incident is missing:
examples/use-cases/ops/handoff-that-resumes.ts (excerpt)
run with the same record. The first is
stopped from its own event stream the moment the gather stage is done, as a
worker that lost its machine would be. The second is started with
resume: true and nothing else:
examples/use-cases/ops/handoff-that-resumes.ts (excerpt)
workflow() resumes stage by stage: a stage the record
shows finished is returned as recorded, and the run carries on from the
first stage that isn’t. To resume, the second worker keeps the workflow’s
name, workspace, brief, stage list and seats the same; change any of them
and the run starts again. A stage that was mid-flight when the first worker
died is a different case, and Running says what a
resumed run repeats and what it asks a person to reconcile.
The brief
The brief
briefs/report.md
Full file
Full file
examples/use-cases/ops/handoff-that-resumes.ts
The team’s shape
What the run did
The proof runs the file against a scripted seat and checks what the page describes: the first worker aborted with one stage run, the second worker took that stage from the record and ran the other two, the seat asked exactly twice, and both files on disk. Obversa recorded both workers into one event log, so the record shows the gather stage’s turn, the abort, the second worker’s start, the gather stage returned from the record with no turn under it, and then the draft and the check. The record is what the second worker reads, and it is enough. There is no handoff note, no summary of the first worker’s work for the second to trust, and no second gather. The supervised runner does this restart for you, with a watchdog and limits; this file shows the same resume with two plain calls torun.
Next steps
- Running: what a resumed run repeats and what it asks a person to reconcile.
- The record: the event log both workers wrote to.
- Supervised local runs: the restart done by a watchdog instead of by hand.