Overview
LangGraph supports time travel through checkpoints:- Replay: Retry from a prior checkpoint.
- Fork: Branch from a prior checkpoint with modified state to explore an alternative path.
Replay
Invoke the graph with a prior checkpoint’s config to replay from that point.
get_state_history to find the checkpoint you want to replay from, then call invoke with that checkpoint’s config:
Fork
Fork creates a new branch from a past checkpoint with modified state. Callupdate_state on a prior checkpoint to create the fork, then invoke with None to continue execution.

From a specific node
When you callupdate_state, values are applied using the specified node’s writers (including reducers). The checkpoint records that node as having produced the update, and execution resumes from that node’s successors.
By default, LangGraph infers as_node from the checkpoint’s version history. When forking from a specific checkpoint, this inference is almost always correct.
Specify as_node explicitly when:
- Parallel branches: Multiple nodes updated state in the same step, and LangGraph can’t determine which was last (
InvalidUpdateError). - No execution history: Setting up state on a fresh thread (common in testing).
- Skipping nodes: Set
as_nodeto a later node to make the graph think that node already ran.
Interrupts
If your graph usesinterrupt for human-in-the-loop workflows, interrupts are always re-triggered during time travel. The node containing the interrupt re-executes, and interrupt() pauses for a new Command(resume=...).
Multiple interrupts
If your graph collects input at several points (for example, a multi-step form), you can fork from between the interrupts to change a later answer without re-asking earlier questions.Subgraphs
Time travel with subgraphs depends on whether the subgraph has its own checkpointer. This determines the granularity of checkpoints you can time travel from.- Inherited checkpointer (default)
- Subgraph checkpointer
By default, a subgraph inherits the parent’s checkpointer. The parent treats the entire subgraph as a single super-step — there is only one parent-level checkpoint for the whole subgraph execution. Time traveling from before the subgraph re-executes it from scratch.You cannot time travel to a point between nodes in a default subgraph — you can only time travel from the parent level.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

