Agent rollback
Agent rollback is the pattern of restoring an agent's state to a previous checkpoint when the current trajectory has gone wrong — letting it try a different approach without starting over.
Long agent loops occasionally make a wrong call that cascades into a dead-end. Rollback lets the orchestrator detect the dead-end (via no-progress detection, critic feedback, or explicit error) and restore the agent's state to a previous checkpoint — usually one made before the wrong call — and continue with a different action. Implementations vary: LangGraph's checkpointing + replay, custom state snapshots, transactional databases of agent state. Rollback is the difference between an agent that recovers and one that burns all its budget on a single failed path.
When to use agent rollback
- Long agent loops where a single wrong step cascades.
- Agents that interact with versioned external systems (filesystem, DB).
Common mistakes
- Rolling back without a different strategy — the agent repeats the same mistake.
- No checkpointing strategy — there's nothing to roll back to.
FAQ
What is agent rollback?
Agent rollback is the pattern of restoring an agent's state to a previous checkpoint when the current trajectory has gone wrong — letting it try a different approach without starting over.
When should I use agent rollback?
Long agent loops where a single wrong step cascades. Agents that interact with versioned external systems (filesystem, DB).
What are the most common mistakes with agent rollback?
Rolling back without a different strategy — the agent repeats the same mistake. No checkpointing strategy — there's nothing to roll back to.
Related terms
- Agent loop — An agent loop is the repeating cycle of an AI agent — observe state, decide on an action (usually a tool call), execute, observe the result, and repeat — until a goal is reached or a stop condition fires.
- AI agent — An AI agent is a system where a language model autonomously plans and executes a sequence of tool calls to accomplish a goal.
- Self-correction (LLM) — Self-correction is a prompting pattern where the model reviews its own initial answer, identifies errors, and produces a revised answer — a cheap reliability boost for many tasks.
- Context distillation — Context distillation summarises an agent's growing conversation history into a compact representation, so each step's input stays small while preserving the relevant signal.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/rollback.md.