#[non_exhaustive]pub struct RunCheckpoint {
pub run_id: RunId,
pub step_index: u32,
pub thread_id: ThreadId,
pub messages: Vec<Message>,
pub pending_tool_calls: Option<Vec<ToolCall>>,
pub resume_attempted: bool,
pub created_at: DateTime<Utc>,
}Expand description
Minimal state required to resume a suspended run. Excludes the Agent
(its Arc<dyn _> ports are not serializable) — only the conversation and
the tool calls awaiting approval are captured.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.run_id: RunIdStable across resume; doubles as the KvStore key for this checkpoint.
step_index: u321-indexed step the resume re-enters the loop at.
thread_id: ThreadIdThread whose short-term history is cleared and restored from messages.
messages: Vec<Message>Short-term history captured at suspend time, oldest first.
pending_tool_calls: Option<Vec<ToolCall>>Tool calls held back for approval; Some only when the paused step’s
finish reason was ToolCalls.
resume_attempted: boolLatched true by the first resume before it dispatches the pending
calls, so a later (retried, cross-process) resume can tell it is not the
first attempt. A retry that finds this set refuses to re-dispatch a
non-idempotent pending call rather than risk a duplicate side effect
(ADR-045 fail-closed). #[serde(default)] keeps pre-existing persisted
checkpoints (no field) readable — they default to false, the
first-attempt state.
created_at: DateTime<Utc>Suspend timestamp, for TTL/GC of abandoned checkpoints.
Trait Implementations§
Source§impl Clone for RunCheckpoint
impl Clone for RunCheckpoint
Source§fn clone(&self) -> RunCheckpoint
fn clone(&self) -> RunCheckpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more