TL;DR: The email is sent in the same step that pauses for approval. When the run resumes, the framework re-executes that step from its first line (LangGraph documents this for
interrupt()), so the email goes again. Prove it from the trace (two sends, one before the pause and one at resume, same step id), then move the send after the pause or into its own completed step, and add an idempotency key to the send so any future replay is harmless. Add the scenario to the test suite.
How to approach it
Establish the pattern from evidence first (timing, step ids), then explain the resume semantics, then fix both the placement and the idempotency, then prevent regression.
A strong answer
Read the evidence. Group sends by run id. Every duplicated email has one send timestamped before the approval request and one at the moment the approval arrived, both attributed to the same node. Runs without an approval step have one email. That points to resume, not to retries in the email client.
Explain the mechanism. The node does three things in order: compose the confirmation, send it, call interrupt() to ask for approval. On the first pass it sends and pauses; state is checkpointed. On resume, the framework re-runs the node from the top with the approval as the return value of interrupt(), so compose and send run again.
sent = []
def node(state, resume=None):
sent.append(state["order"]) # side effect before the pause
if resume is None:
return "paused"
return f"approved={resume}"
node({"order": "A-17"}) # first pass: pauses
node({"order": "A-17"}, resume="yes") # resume re-runs the node
print(sent) # => ['A-17', 'A-17']
Fix the placement. Split the node: a notify step that sends and completes (and is checkpointed), then an ask step that only interrupts. On resume the graph continues at ask. Or, if the email should only go after approval, move the send to the step after it.
Make the send idempotent anyway. Use a key derived from the business event (confirmation:{order}:{version}) that the email service or an outbox table deduplicates. Placement fixes this bug; idempotency protects against the next one (a retry, a redeploy, a different resume path).
Prevent regression. A test with a scripted model runs the graph to the interrupt, restarts the process, resumes, and asserts one send.
What interviewers probe next
"Isn't the checkpoint supposed to prevent this?" The checkpoint saves state at the pause, inside the node. It records where to resume, not which lines already ran.
"Where else does this bite?" Any side effect before an interrupt: payments, tickets, Slack messages, database writes.
How it's scored
Weak: Adds a dedupe check in the email service without finding the cause.
Hire: Identifies the resume re-running the node and moves the send.
Strong Hire: Proves the pattern from run and step ids, explains resume semantics, fixes placement and adds business-keyed idempotency, and adds a restart-and-resume regression test.
Common mistakes
- Blaming the model or the email provider.
- Fixing placement but leaving the send non-idempotent.
- Testing resume only within one process, without a restart.