Copies the state at a chosen step into a new directory with a fresh run id, optionally mutating it, and runs forward from there. The original run is untouched: resume continues the same run, fork branches a new one.
Usage
fork_workflow(
x,
wf,
at = NULL,
new_dir = NULL,
mutate = NULL,
max_steps = 64L,
quiet = TRUE,
...
)Arguments
- x
A
checkpoint_diroragent_workflow_run.- wf
The
agent_workflow(needed to run the branch).- at
Step index to fork from (default: the last completed step).
- new_dir
Directory for the branch (default: a fresh temp dir).
- mutate
Optional
function(state) -> stateapplied before running.- max_steps, quiet, ...
As in
run_workflow().
