Concept guide · LangChain, LangGraph, and CrewAI
How do interrupts and human-in-the-loop work in LangGraph?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Generative AI → LangGraph interrupts
Interview format
Advanced · Scenario
Question
GENAI-095
Start with the idea
In simple terms
An interrupt pauses graph execution and saves enough state for a human to provide input later. After approval or editing, the graph resumes from the saved workflow instead of starting over.
Make it concrete
Before sending a customer email, pause with the draft, evidence, urgency, and proposed recipient. Resume only after a reviewer approves or edits that exact action.
Build the answer
How to approach it
- 1Place the interrupt before the irreversible side effect.
- 2Persist the proposal and make the node safe to re-enter.
- 3Validate, audit, and expire approval decisions.
Go one level deeper
The technical explanation
Interrupts work best when the node is designed for replay: code before the pause may run again when resumed, so side effects must happen after approval or be idempotent. Persist a thread identifier, show a clear review payload, validate the resume value, and record the decision. Durable human review is a workflow contract, not just a UI state.
Say this in the interview
A graph can pause before or during a sensitive step, persist its state, present the proposed action to a person, and resume with an approval, rejection, or edited value. The node must be safe to resume and external side effects need idempotency or a confirmation record.
Keep preparing