LangGraph 1.2 in depth: state, checkpoints, human interrupts, retries and time travel
LangGraph 1.2.24 arrived on 20 November 2026. This guide builds a refund approval graph that pauses for a human, survives a flaky payment API with a retry policy, and is then rewound to an earlier checkpoint to replay a different decision.
- Reading time
- 13 min
- Sections
- 9
- Code examples
- 14
- Tables
- 1
- Sources
- 6
- Published
- 23 Nov 2026
- What changed
- LangGraph 1.2.23 and 1.2.24
- Why it matters
- Checkpointing changes what an agent can promise.
- What to do
- Pin the stack
Most agent bugs are not about the model. They are about state: what the agent knew at step four, why it ran the payment twice, how to pause for a person and pick up an hour later on another server. LangGraph exists to make that state explicit. You describe your agent as a graph of nodes that read and write a shared state object, and a checkpointer saves that state after every step.
This article builds one small but realistic graph, a refund approval flow, and uses it to explain the five ideas that matter most in LangGraph 1.2: typed state with reducers, conditional edges, checkpoints and threads, interrupt with Command(resume=...), and replaying from an earlier checkpoint. Every snippet was run with langgraph==1.2.24 and langgraph-checkpoint==4.3.2 on Python 3.13, and the outputs shown are copied from those runs.
What happened
LangGraph 1.2.23 and 1.2.24 (19 and 20 November 2026)
Two patch releases of the core langgraph package went to PyPI on consecutive days, continuing a 1.2 line that has shipped a patch roughly every few days since September (1.2.12 on 21 September, 1.2.19 on 30 October). Everything in this article was run on 1.2.24, the newer of the two.
langgraph-prebuilt 1.1.3 (19 November 2026)
The prebuilt package, which holds the tool-executing node that LangChain's create_agent relies on, moved to 1.1.3 a few minutes before the 1.2.23 core release.
Checkpoint libraries updated (14 November 2026)
langgraph-checkpoint 4.3.2 and langgraph-checkpoint-postgres 3.2.1 were published on 14 November. The SQLite saver is at 3.1.3, published on 30 October. These are the packages that decide how and where your state is stored.
The building blocks: state, nodes, edges
A LangGraph graph is like a board game. The state is the board. Nodes are the moves: plain Python functions that read the board and return the changes they want to make. Edges are the rules for whose turn is next.
State is a TypedDict (or a Pydantic model or dataclass). Each key can have a reducer, which says how a node's update is merged into the old value. Without a reducer the new value replaces the old one. With operator.add on a list, updates are appended.
import operator
from typing import Annotated
from typing_extensions import TypedDict
class RefundState(TypedDict):
order_id: str
amount: float
decision: str
log: Annotated[list[str], operator.add] # reducer: append, never overwrite
That one annotation is why the final log below contains the lines from every node, not only the last one. The message lists used by chat agents work the same way with the add_messages reducer, which also replaces messages that share an ID.
Edges come in two kinds. A normal edge always goes to the same next node. A conditional edge calls a function on the state and returns the name of the next node. Passing the list of possible targets lets LangGraph draw and validate the graph.
Building the refund graph step by step
The flow: triage the request; refunds of 50 or less go straight to payment; larger ones need a human; the payment API is flaky.
pip install "langgraph==1.2.24"
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.types import interrupt, Command, RetryPolicy
def triage(state: RefundState):
route = "auto" if state["amount"] <= 50 else "review"
return {"decision": route, "log": [f"triage: {state['amount']} -> {route}"]}
def human_review(state: RefundState):
answer = interrupt({"question": f"Approve refund of {state['amount']} for {state['order_id']}?"})
return {"decision": "approved" if answer == "yes" else "rejected",
"log": [f"review: human said {answer}"]}
ATTEMPTS = {"n": 0}
def pay(state: RefundState):
ATTEMPTS["n"] += 1
if ATTEMPTS["n"] < 3: # fail twice, like a flaky payment API
raise ConnectionError("payment gateway timeout")
return {"log": [f"pay: refunded {state['amount']} on attempt {ATTEMPTS['n']}"]}
def route_after_triage(state: RefundState):
return "pay" if state["decision"] == "auto" else "human_review"
def route_after_review(state: RefundState):
return "pay" if state["decision"] == "approved" else END
builder = StateGraph(RefundState)
builder.add_node("triage", triage)
builder.add_node("human_review", human_review)
builder.add_node("pay", pay, retry_policy=RetryPolicy(max_attempts=3, initial_interval=0.1,
retry_on=ConnectionError))
builder.add_edge(START, "triage")
builder.add_conditional_edges("triage", route_after_triage, ["pay", "human_review"])
builder.add_conditional_edges("human_review", route_after_review, ["pay", END])
builder.add_edge("pay", END)
graph = builder.compile(checkpointer=InMemorySaver())
Now run it for a 120 refund on thread refund-42:
cfg = {"configurable": {"thread_id": "refund-42"}}
out = graph.invoke({"order_id": "A-42", "amount": 120.0, "log": []}, cfg)
print("paused with:", out["__interrupt__"][0].value)
print("next node:", graph.get_state(cfg).next)
paused with: {'question': 'Approve refund of 120.0 for A-42?'}
next node: ('human_review',)
How the interrupt works
interrupt(value) stops the run inside the node and hands value back to the caller under the __interrupt__ key. The checkpointer has already saved the state, so nothing is held in memory waiting. Your web app can show the question, close the request and come back tomorrow.
To continue, you invoke the graph again on the same thread with Command(resume=...). LangGraph re-runs the interrupted node from the top, and this time interrupt() returns the resume value instead of pausing:
out = graph.invoke(Command(resume="yes"), cfg)
print("final decision:", out["decision"])
for line in out["log"]:
print(" ", line)
final decision: approved
triage: 120.0 -> review
review: human said yes
pay: refunded 120.0 on attempt 3
The re-run detail matters. Any code before interrupt() in a node runs twice: once before the pause and once on resume. Keep side effects such as sending an email after the interrupt, or in a separate node.
How the retry worked
The pay node raised ConnectionError twice. The RetryPolicy on that node caught it and tried again, and the third attempt succeeded, which is why the log says "attempt 3". RetryPolicy defaults in 1.2.24 are max_attempts=3, initial_interval=0.5 seconds, backoff_factor=2.0, max_interval=128.0 and jitter on. We shortened the first wait to 0.1 seconds for the demo, so the waits were about 0.1 and 0.2 seconds. Retry policies apply per node, so a flaky API call does not force you to retry the whole run. For a visual version of the backoff schedule, try the retries and exponential backoff simulation.
Node-level timeouts exist too. add_node(..., timeout=...) accepts seconds, a timedelta or a TimeoutPolicy with a wall-clock run_timeout and an idle_timeout. The docstring is clear that timeouts are supported only for async nodes, because sync nodes "cannot be safely cancelled in-process". When a timeout fires, a NodeTimeoutError is raised and the retry policy decides what happens next.
Checkpoints, threads and time travel
A checkpointer saves a snapshot of the state after every super-step, keyed by thread_id. A thread is one conversation or one job. You can list the snapshots:
for s in graph.get_state_history(cfg):
print(f"step={s.metadata.get('step')} next={s.next}")
step=3 next=()
step=2 next=('pay',)
step=1 next=('human_review',)
step=0 next=('triage',)
step=-1 next=('__start__',)
Five checkpoints for one run: the input (step -1), then one after each step. Each snapshot records the values and which node runs next. The LangGraph state and checkpoints simulation animates exactly this list.
Time travel means starting again from any of these snapshots. Pass the snapshot's config, which carries its checkpoint_id, and LangGraph continues from that point, creating a new branch rather than deleting the old one:
history = list(graph.get_state_history(cfg))
before_review = next(s for s in history if s.next == ("human_review",))
out = graph.invoke(None, before_review.config) # replay: hits the interrupt again
out = graph.invoke(Command(resume="no"), cfg)
print(out["decision"], out["log"])
print(len(list(graph.get_state_history(cfg))))
rejected ['triage: 120.0 -> review', 'review: human said no']
7
The branch has no payment line, and the thread now holds seven checkpoints: the five from the first run plus two for the new branch. This is the tool you want when a user says "the agent did something wrong at step two": load that snapshot, fix the state with graph.update_state(...) if needed, and replay.
Choosing durability
invoke and stream accept durability, with three options in 1.2.24:
| Mode | When state is written | Use it when |
|---|---|---|
"sync" |
Before the next step starts | Every step has side effects you must never repeat |
"async" (default) |
While the next step runs | Normal agents: fast, with a small window of risk on a crash |
"exit" |
Only when the graph exits | Short, cheap runs where speed matters more than recovery |
InMemorySaver is for tests and notebooks; it disappears when the process ends. In production use the Postgres or SQLite savers, or the managed persistence in LangGraph's deployment platform.
Continue learning
How this article connects
4 pages link to or from it. Drag to turn, click a dot to open it.
Fan-out with Send: one task per item
Real refund queues arrive in batches. LangGraph's Send lets a conditional edge return a list of tasks instead of one node name. Each Send(node, payload) runs the node with its own small input, the tasks in one step run in parallel, and the reducer merges their outputs. This is the map-reduce pattern, and it is also how a supervisor can start several sub-agents at once.
from langgraph.types import Send
class BatchState(TypedDict):
refunds: list[dict]
results: Annotated[list[str], operator.add]
def fan_out(state: BatchState):
return [Send("check_one", r) for r in state["refunds"]] # one task per refund
def check_one(refund: dict):
verdict = "auto" if refund["amount"] <= 50 else "review"
return {"results": [f"{refund['order_id']}: {verdict}"]}
b = StateGraph(BatchState)
b.add_node("check_one", check_one)
b.add_conditional_edges(START, fan_out, ["check_one"])
b.add_edge("check_one", END)
print(b.compile().invoke({"refunds": [
{"order_id": "A-1", "amount": 20},
{"order_id": "A-2", "amount": 75},
{"order_id": "A-3", "amount": 49.99}], "results": []})["results"])
['A-1: auto', 'A-2: review', 'A-3: auto']
Two details are worth noticing. First, check_one receives the payload of its Send, a single refund dict, not the whole graph state. Second, without the operator.add reducer on results, the three parallel updates would conflict, because three tasks would be writing the same key in the same step. In 1.2.24 that raises InvalidUpdateError: At key 'results': Can receive only one value per step, which is a useful safety net: it forces you to say how parallel results combine. Think of a shared whiteboard. A reducer is the rule "everyone adds a line at the bottom" rather than "everyone wipes the board and writes their answer".
A worked number on why this matters: if each check calls an external fraud API that takes about 800 milliseconds, a sequential loop over 30 refunds takes about 24 seconds. Sent as 30 parallel tasks in one step, the wall-clock time is set by the slowest call plus overhead, subject to whatever rate limit the API imposes. Add a RetryPolicy to check_one and a single slow or failing call is retried without re-running the other 29.
Graphs versus the prebuilt agent
LangChain's create_agent builds a LangGraph graph with a model node and a tools node, and its middleware covers retries, limits and human approval for that loop. Write a graph yourself when the flow has fixed business steps, like our refund rules, when several agents share state, or when you need per-node retry and timeout policies. A rough rule: if you can draw your process as a flowchart with named boxes, draw it in LangGraph. If it is "let the model decide which tool to use next", start with create_agent. The ReAct tool-calling simulation shows that second loop.
What it means in practice
Checkpointing changes what an agent can promise. Without it, a pause for approval means holding a process open. With it, a pause is a row in a database, and the run can resume on a different machine. That is the basis for agents that take hours or days, which the long-running tasks page covers.
It also changes debugging. Because every step is a stored snapshot, you can reproduce a bad run exactly, fork it and test a fix. Combine this with tracing in LangSmith or Langfuse, which record the same steps as spans, and you get both the "what" and the "why".
The cost is discipline. Nodes must be safe to re-run, state must be serialisable, and you have to think about which side effects happen before an interrupt.
What to do now
- Pin the stack. Use
langgraph==1.2.24and pinlanggraph-checkpoint(4.3.2) and your saver package together. - Add reducers on purpose. For every list in state, decide between replace and append; use
operator.addoradd_messageswhere history matters. - Move side effects after interrupts. Audit nodes that call
interrupt()and make sure nothing irreversible runs before it. - Set retry policies on I/O nodes only. Give API-calling nodes a
RetryPolicywith an explicitretry_on, and leave pure logic nodes without one. - Make slow nodes async if you need timeouts. Node timeouts only work for async nodes in 1.2.24.
- Pick durability per graph. Use
"sync"for payment or deployment flows, keep"async"elsewhere. - Test time travel before you need it. Write one test that forks from a checkpoint and checks the branch, so the path is proven before an incident.
- Use a real saver outside tests. Replace
InMemorySaverwith Postgres or SQLite before any user-facing release.
Risks and open questions
Re-run semantics surprise people. Resuming re-executes the whole interrupted node. Teams that put a database write before interrupt() get duplicate writes.
Checkpoints grow. Every step stores a snapshot. Long chats with big tool outputs can make the checkpoint table large; plan retention and pruning.
State is data you must protect. Checkpoints contain user messages and tool results, possibly personal data. They need the same access control and deletion policy as your main database.
Fast patch cadence. Releases on 19 and 20 November show how quickly the 1.2 line moves. Pinning plus a weekly upgrade test is safer than floating versions.
Watch next: how the version="v2" streaming format, which returns typed StreamPart dicts, settles, and whether node timeouts gain support for sync nodes.
Frequently asked questions
What is a thread in LangGraph?
A thread is one sequence of checkpoints identified by thread_id in the config. Use one thread per conversation or job. Invoking again with the same thread continues from the saved state.
Why did my node run twice after resuming?
On resume, LangGraph re-runs the interrupted node from its first line, and interrupt() then returns the resume value. Code before the interrupt runs twice, so keep it free of side effects.
Do I need a checkpointer to use interrupt?
Yes. The interrupt saves state and returns control to the caller, so there must be somewhere to save it. Without a checkpointer, there is nothing to resume from.
What is the difference between retry_policy and a try/except in the node?
A retry policy re-runs the node with backoff and records each attempt, and it can be configured per node without changing node code. A try/except is fine for errors you can handle on the spot, but it hides failures from traces unless you log them.
Can I edit the state before replaying?
Yes. graph.update_state(config, values) writes a new checkpoint with your changes, as if a node had produced them. You can then invoke from that checkpoint to continue on the edited branch.
Summary
LangGraph 1.2.24, released on 20 November 2026, turns an agent into a graph of nodes over typed state, with every step saved by a checkpointer. In a single refund flow we used reducers to keep a full log, a conditional edge to route large refunds to a person, interrupt and Command(resume=...) to pause and continue, a RetryPolicy to survive two payment failures, and a checkpoint fork to replay a different human decision. The lessons are practical: keep side effects after interrupts, put retries on I/O nodes, choose durability per flow, and use a persistent saver in production.
Sources
Cite this article
Kelahmet, Ö. C. (2026, November 23). LangGraph 1.2 in depth: state, checkpoints, human interrupts, retries and time travel. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/langgraph-1-2-checkpoints-interrupts-time-travel
BibTeX
@online{kelahmet2026langgraph,
author = {Kelahmet, {\"O}zer Cem},
title = {{LangGraph 1.2 in depth: state, checkpoints, human interrupts, retries and time travel}},
year = {2026},
month = {nov},
url = {https://www.ozercemkelahmet.com/articles/langgraph-1-2-checkpoints-interrupts-time-travel}
}Version historyfirst version
- Published
Factual corrections are listed here with what changed. Wording and formatting edits are not listed.