Documentation
¶
Overview ¶
Command recover shows durable resume via named-step memoization: a run journals its model turns and tool results to the store, so re-invoking Run with the SAME runID against the SAME store reuses the recorded steps rather than re-running them. The tool here increments a process-local counter on every real execution; after the run completes, a second Run leaves the counter unchanged, demonstrating at-most-once execution across a resume (the property a crash-recovery supervisor relies on; see agent.Recover).
It then shows the other side of at-most-once: a side effect whose outcome was lost is not fired again. The resumed Step halts with *agent.OutcomeUnknown, an operator records the verified outcome with agent.ResolveHaltRef, and the Step then returns it.
It runs with NO API key: the model is a small inline scripted Model.
go run ./examples/recover