Help us shape the future of Go! Take the 2026 Go Developer Survey

recover

command
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL