AgentRunCheckpoint
Interface: AgentRunCheckpoint
Defined in: src/core/runCheckpoint.ts:69
JSON-serializable checkpoint of an in-progress agent run. Persist
to ANY durable store (Redis / Postgres / S3 / disk / queue) and
resume hours / days / deploys later via agent.resumeOnError(...).
Stable shape — the version field guards forward compat. v1
→ v2 transitions will be supported via a migration helper.
Properties
checkpointedAt
readonlycheckpointedAt:number
Defined in: src/core/runCheckpoint.ts:89
Wall-clock when the checkpoint was captured. Diagnostic only.
failurePoint?
readonlyoptionalfailurePoint?:object
Defined in: src/core/runCheckpoint.ts:93
Where the failure happened. Diagnostic — surfaces in oncall triage so you can tell "LLM 500 mid-iteration" from "tool threw" from "validation kept failing".
iteration
readonlyiteration:number
phase
readonlyphase:"tool"|"llm"|"iteration"|"unknown"
history
readonlyhistory: readonlyLLMMessage[]
Defined in: src/core/runCheckpoint.ts:79
Conversation history at the LAST completed iteration boundary (LLM messages). The next iteration retries from here.
lastCompletedIteration
readonlylastCompletedIteration:number
Defined in: src/core/runCheckpoint.ts:84
Index of the last completed iteration in the FAILING run
(diagnostic — not consumed on resume). The resumed run restores
this history but re-seeds its own iteration counter at 1 with a
full maxIterations budget.
originalInput
readonlyoriginalInput:object
Defined in: src/core/runCheckpoint.ts:87
Original input message. Surfaces in observability + lets the consumer correlate checkpoint to the user's request.
message
readonlymessage:string
runId
readonlyrunId:string
Defined in: src/core/runCheckpoint.ts:76
runId of the FAILING run — lets the consumer correlate a
persisted checkpoint back to the original run's observability.
NOT reused on resume: resumeOnError starts a fresh run with a
fresh runId (only the conversation history is restored).
version
readonlyversion:1
Defined in: src/core/runCheckpoint.ts:71
Schema version. v1 = conversation-history-based.
