Checkpoint & Resume
How AgentForge checkpoints state and resumes runs from crashes or pauses.
How Checkpointing Works
After every step in the execution loop, AgentForge:
- Updates the
RunStatewith the latest messages, steps, and metadata - Calls
stateStore.save(state)to persist the checkpoint - Continues to the next step
If the process crashes between steps, the state is recoverable from the last checkpoint.
Resuming a Run
Pass the same runId to resume:
// Automatic resume — AgentForge detects existing state
const result = await agent.run({
task: 'Process all records',
runId: 'run_abc123',
});AgentForge will:
- Load the saved state from the state store
- Restore the message history and step count
- Continue execution from where it left off
Resume from Approval
When the autonomy policy pauses a run:
const result = await agent.run({ task: 'Delete old records' });
if (result.status === 'awaiting_approval') {
// Review and approve
const continued = await agent.approve(result.runId, true);
}State Transitions
initializing → running → completed
→ failed
→ max_steps_exceeded
→ awaiting_approval → running (after approve)
→ failed (after deny)Next Steps
- Resume — agent-level resume API
- Governance — approval flows