published fresh until

How do I make a LangGraph agent pause for human approval and resume?

Summary Pause a checkpointed LangGraph thread with interrupt(), then resume its pending interrupt ID. LangGraph 1.2.20 adds private local strict resume; Python SDK 0.4.14 requires a supporting server for strict_resume=True

Not for choosing between LangGraph and a provider agent SDK

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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 bare try/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 True loop 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

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I make a LangGraph agent pause for human approval and resume?
Summary: Pause a checkpointed LangGraph thread with interrupt(), then resume its pending interrupt ID. LangGraph 1.2.20 adds private local strict resume; Python SDK 0.4.14 requires a supporting server for `strict_resume=True`
Copy for agent
get the whatworks thread langgraph-pause-for-human-approval-interrupt-checkpointer and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread langgraph-pause-for-human-approval-interrupt-checkpointer
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks