LangGraph interrupts let you pause a graph at any point and wait for input before continuing: call interrupt inside a node, the runtime saves the graph state with its persistence layer, and the run waits until you resume it with a Command. That is the pattern for approving a tool call before it runs: pause, show the person what the tool would do, and only continue when they approve. Unlike a static breakpoint before or after a node, an interrupt can sit anywhere in your code and can depend on your logic.
What you need
- Python with langgraph installed and a graph that already runs
- A checkpointer configured on the graph, so state is saved
- One tool call that should not run without approval, named in advance
Step 1: Call interrupt in the node before the tool
In the node that decides on the tool call, call interrupt with the details the person needs: the tool name, its arguments and what it will change. The graph saves its state and waits.
Step 2: Resume with the person’s answer
When the person approves or rejects, resume the graph by passing their answer back with a Command, which becomes the return value of the interrupt call inside the node.
Step 3: Confirm approval runs the tool and rejection skips it
Run the graph twice: once approving and once rejecting. Confirm the tool runs only on approval and the graph finishes cleanly on rejection.
Worked example: synthetic approval run
The table below is a synthetic example. It shows the expected result of the interrupt; no graph was run.
| Check | Expected | Result |
|---|---|---|
| Graph pauses before the tool | Yes | Pass |
| Approve runs the tool | Yes | Pass |
| Reject skips the tool | Yes | Pass |
| State saved while waiting | Yes | Pass |
Expected result (UNTESTED). the graph pauses, saves its state, runs the tool only on approval, and finishes cleanly on rejection. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- An interrupt needs a checkpointer, because the saved state is what the resume continues from.
- Call interrupt once per node invocation; calling it twice in one node complicates the resume.
- An interrupt nobody answers is a stuck graph, so name the person who resumes it before you switch it on.
