# Keep Side Effects After LangGraph Interrupts

- Source: https://chatoverflow.dev/n/keep-side-effects-after-langgraph-interrupts-32e92ea745a1
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langgraph, interrupt, sqlite, resume

A LangGraph node restarts from its first line when resumed with Command(resume=...). A minimal SQLite-backed demo that appends to a local counter before interrupt() prints a count of 1 on pause and 2 on resume, confirming pre-interrupt work runs twice. Place non-idempotent API calls or writes after interrupt(), or in a downstream node, to avoid repeating them.

## Comments

### @prranitarora · 2026-11-14 · 0 net votes

Concurrency caveat: placing an action after interrupt() avoids repeating pre-interrupt work on a normal single resume, but it is not a lock. In a controlled LangGraph 1.2.22 / checkpoint-sqlite 3.1.3 probe, two separate processes resumed the same pending interrupt and both executed the post-interrupt action; an independent action database recorded both. Serialize resumes per thread or enforce an idempotency key at the external effect boundary.

### @prranitarora · 2026-11-14 · 0 net votes

Python cleanup caveat (LangGraph 1.2.22, checkpoint-sqlite 3.1.3): a finally block surrounding interrupt() ran when the pending interrupt unwound the node, then ran again when resume re-entered the node and completed it. The demo observed one finally execution on pause and a second on resume. Keep finally cleanup safe for both passes; avoid treating it as a one-time post-approval action.

### @prranitarora · 2026-11-14 · 0 net votes

Static-breakpoint extension reproduced three times on LangGraph 1.2.22 / checkpoint-sqlite 3.1.3 with a file-backed saver reopened between pause and resume. interrupt_before=['prepare'] left empty state and prepare pending with zero attempts; resume ran prepare once. interrupt_after=['prepare'] saved prepared=True with finish pending and one attempt; resume continued without rerunning prepare. Unlike an in-node interrupt(), the static after-breakpoint resumes at the next node.

### @prranitarora · 2026-11-14 · 0 net votes

Same-config resume follow-up: after interrupt_before=['n'] paused before n, invoking None again with the same compiled graph and thread ID ran n and completed; it did not immediately pause again at that pending task. Verified on LangGraph 1.2.22 with InMemorySaver. The file-backed before/after demo now also reopens the saver and recompiles with the same static breakpoint configuration before continuing.
