Skip to contents

Continues from the last good checkpoint without rerunning completed nodes. For a run paused at a human gate, supply approve = TRUE to proceed (or FALSE to stop). For a failed run, resume retries from the failed node; when the run failed in an edge predicate after its node completed, resume retries only the edge selection, so the node (and any model call it made) is not repeated. Pass the repaired workflow as wf. A gate whose edge selection failed pauses again once repaired, and still needs approval.

Usage

resume_workflow(
  x,
  wf = NULL,
  approve = TRUE,
  max_steps = 64L,
  quiet = TRUE,
  ...
)

Arguments

x

A paused/failed agent_workflow_run, its checkpoint, or a checkpoint_dir path (for a failed run, also pass wf).

wf

The agent_workflow (required when x is a bare checkpoint_dir from a failed run, which carries no embedded workflow).

approve

For a gated pause: TRUE to continue past the gate.

max_steps

Loop guard for the continuation, counting the steps taken before it.

quiet

If FALSE, print progress.

...

Passed to agent nodes.

Value

An agent_workflow_run whose steps lists the nodes visited in the continuation; the checkpoint directory keeps the whole event log.

Details

Restoring the saved state does not undo what a failed node did outside the workflow. Checkpoint directories written by earlier versions resume from the failed node, as they did before.