What this thread does
The job
Compile with a checkpointer, set a thread_id, pause with interrupt(), and resume the same thread with Command(resume=...). For retried approvals, use the pending interrupt ID and the versioned strict-resume options below.
As of November 2026. Use this before an agent sends an email, runs a query or spends money; the person can approve or cancel.
Do first: the recipe from the LangGraph docs
The LangGraph Interrupts docs give three requirements:
1. A checkpointer. Compile the graph with one so state can be saved. The docs say to use a durable one in production, not in-memory. 2. A thread_id in the run config: config={"configurable": {"thread_id": "thread-1"}}. Reusing the id resumes that saved run; a new id starts empty. 3. interrupt(value) inside a node. The value must be JSON-serializable and is shown to the caller.
from langgraph.types import interrupt, Command
def approval_node(state):
approved = interrupt({"question": "Proceed?", "details": state["action_details"]})
return Command(goto="proceed" if approved else "cancel")
The first run returns with the pause visible (with invoke() it appears in result["__interrupt__"]). To continue, call the graph again with Command(resume=True) and the same config. The resume value becomes the return value of interrupt().
The rules that cause most bugs
- The node restarts from the top on resume. Anything before
interrupt()runs again. The docs say to make it idempotent (upserts) or move side effects after the interrupt or into another node. This is the usual reason an email goes out twice. - Do not wrap
interrupt()in a baretry/except. The pause raises an exception, so a broad handler swallows it. - Keep interrupt order stable within a node: resume values are matched by position, so do not skip interrupts conditionally.
- Validate input with a conditional edge, not a
while Trueloop inside the node. - Simple payloads only: strings, numbers, booleans, lists, dicts. No functions or class instances.
- Parallel branches: each interrupt has an id; resume with a dict mapping id to answer.
Reject stale approval answers: 1.2.20 and SDK 0.4.14
LangGraph 1.2.20, released 5 November 2026, gives each interrupt() within a task its own ID and adds opt-in strict resume. Python SDK 0.4.14, released 6 November, exposes strict_resume on run creation, streaming and waiting.
python -m pip install "langgraph==1.2.20" "langgraph-sdk==0.4.14"
For a local graph, enable the private configurable key before invoking:
config["configurable"]["__pregel_strict_resume"] = True
paused = graph.invoke(initial_state, config=config)
pending = paused["__interrupt__"][0]
result = graph.invoke(Command(resume={pending.id: True}), config=config)
This extends the existing compiled graph recipe; initial_state is your graph's input. For this single-approval example, take the ID from the actual paused result. The strict-resume implementation raises UnknownInterruptError before writing state for an ID that is not pending, an empty resume map, or one scalar answer when several interrupts are pending. The key is private and RemoteGraph does not forward it. Enforcement is skipped for nested graphs and superseded checkpoints; keep the side-effect and interrupt-order rules above.
For a remote thread run, set strict_resume=True in your existing client.runs.create, client.runs.stream or client.runs.wait call and submit an ID-keyed answer. The SDK change says a supporting server refuses a stale answer with UnknownInterruptError and leaves the thread unchanged. A server without support ignores the field; upgrading the client alone does not enable enforcement. The parameter is omitted for stateless runs.
Try answering an approval, then submitting its old ID again after the next question appears. Use the current pending ID for that next answer: the per-interrupt ID change distinguishes successive questions in a task. This does not replace application-level checks on what action a person approved.
Common mistakes
- Forgetting the checkpointer or changing the thread_id between runs, so the graph begins again from scratch.
- Putting the risky action before the interrupt in the same node.
Caveats
Check your installed version: the Interrupts docs also show stream_events(..., version="v3"), where pauses appear on stream.interrupts; the invoke() example above uses result["__interrupt__"].
Sources
LangGraph Interrupts: checkpointing, thread IDs, pause/resume payloads, node restarts, exception handling, interrupt order, parallel ID-keyed answers and input validation. Use a durable checkpointer in production.
Started from a post by @LangChain, packaged by the editor. Original post