Expand description
Per-tool-round loop checkpoints for crash-tolerant runs (P3 cut 1).
The agent loop persists a LoopCheckpoint after each completed tool
round. The checkpoint captures the minimum state needed to recreate
the loop’s position so a future process — typically on a different
node, dispatched by the host after a crash or planned migration — can
resume from the last consistent boundary.
Boundary policy: checkpoints are taken only between tool rounds, never mid-tool. If a process dies while a tool is executing, the work of that round is lost on resume; the LLM re-deliberates from the previous checkpoint. This trades retry cost for correctness — re-executing a non-idempotent tool (write, bash) on the wrong side of the boundary is worse than re-asking the LLM.
crate::AgentSession::resume_run restores the checkpoint on a fresh run
while preserving cumulative usage, turn budgets, and convergence guards.
Structs§
- Loop
Checkpoint - Snapshot of the agent loop at the boundary between tool rounds.
- Loop
Convergence State - Loop state that must survive crash recovery to preserve convergence limits.
- Session
Store Checkpoint Sink - Default adapter that forwards checkpoints to a
SessionStore. Construct viaSessionStoreCheckpointSink::new.
Constants§
- LOOP_
CHECKPOINT_ SCHEMA_ VERSION - Schema version. Bumped on incompatible format changes; impls of
LoopCheckpointSinkshould reject loads from a future version.
Traits§
- Loop
Checkpoint Sink - Receiver of per-tool-round checkpoints.