← Back to Guides

Companion to the book Building Real-World Agentic AI Systems with LangGraph · this part maps to Book Part VII · Chapters 24–27

GuideFor: AI Engineers, ML Engineers, Platform Engineers, AI Systems Architects

LangGraph Names the Guarantee, Not the Unit

Seven parts of measurement found one recurring shape: the bound is real, it is correctly enforced, and it is scoped to something you did not assume.

Updated
#langgraph#agent-runtime#durable-execution#framework-selection#production-engineering

16 November 2026: re-measured on langgraph 1.2.22 / langchain 1.5.0 / langchain-core 1.8.1. The triangular double-charge still holds exactly; the tool-body count is now scheduling-dependent at more widths; draw_mermaid() now lists a ToolNode's tool names (1.2.19); per-call HITL, strict resume, the maintainers' Send workaround and Temporal's LangGraph plugin are added; diagrams redrawn in D2.

A support agent asks a customer to approve three refunds. The customer approves all three. The refunds go out, the ticket closes, and the transcript looks perfect: three approval requests, three approvals, three confirmations, in order, with the right amounts.

The money moved six times. The first customer was refunded three times.

I want to be careful here, because I got this wrong in my own draft. I first wrote that the effect fired three times and only the code above the approval gate re-ran. Then I measured it, and the reassuring version was false. For three approval-gated refunds dispatched in one assistant message, the tool body runs twelve times in almost every run, the code below the gate runs six times, and the first ticket in the batch is charged once for every ticket in the batch.

The transcript still shows three refunds. Three approval requests, three approvals, three confirmations, right amounts, right order. Your test asserts on those and passes. Your trace shows one node. The thread afterwards holds three checkpoints, zero pending interrupts, and no field anywhere that records the number six.

Every measurement in this article was run on langgraph 1.2.9 while writing it and re-run on 1.2.22 in November 2026. The six post-gate effects did not move. Two things did: the drawing now lists a ToolNode's tool names, and the tool-body count, twelve at width three, now wobbles at more widths than it did. This part is about the shape those measurements keep turning up, rather than about any one of them.

The thesis: the feature list is the wrong question

Teams choose an agent runtime from a feature list. Does it have checkpointing. Does it have interrupts. Does it have typed state. Does it put control flow on inspectable edges.

LangGraph has all four. Every one of them works. Over seven parts I measured the runtime rather than reading about it, and outside one ordinary bug - LangChain #38720, where _resolve_schemas violated a documented last-position rule, which Part 3 reproduced and which was fixed by PR #39284 on 12 August 2026 - a defect rather than this article's shape - I did not find a case where a guarantee failed to hold over the unit it names. The checkpointer checkpoints. The recursion limit fires. The reducer merges. The compaction compacts.

What I found instead, seven times, is that the guarantee holds over a unit that is not the unit the reader assumed, and that the unit is not written down anywhere you would think to look. The reducer's tie-break rule is scoped to one superstep. Across supersteps the order comes from control flow instead, and neither rule is written down. The recursion limit is scoped to one invocation, not to the thread. A message deletion reaches the live channel value, not the thread's durable record. The drawing is sound at node granularity, not at action granularity.

So the question that predicts production pain is not does this runtime have the feature. It is:

For each guarantee this runtime gives me, what is its unit of scope, and which artifact tells me?

The two questions put the same four features through different tests, and only one of them can come back with a no:

d2
grid-rows: 1
grid-gap: 40
classes: {
  blue: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  purple: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  green: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  red: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
feature: "The feature-list question" {
  class: pane
  label.near: top-center
  f: "checkpointing, interrupts,\ntyped state, inspectable edges" {class: blue}
  q: "Does it have it?" {class: purple}
  v: "LangGraph: yes, four times\n(says nothing about production pain)" {class: green}
  f -> q -> v
}
unit: "The unit question" {
  class: pane
  label.near: top-center
  g: "each guarantee\nthe runtime gives you" {class: blue}
  u: "1. What is its unit?\nsuperstep, invocation, key" {class: purple}
  a: "2. Which artifact states it?\nmostly none" {class: red}
  g -> u -> a
}

That is the second demarcation criterion this series has produced. Part 1 asked whether a constraint holds regardless of whether the model complies, which is a question about the model. This one asks whether a constraint's scope survives contact with an engineer who did not write the runtime, which is a question about the reader. A mechanism can pass the first and fail the second. Part 6's recursion_limit is the clearest case: the runtime enforces it whether the model complies or not, and its axis is unstated.

I call a guarantee that fails the second criterion a Scope-Blind Guarantee.

Prior art: who already owns this shape

This shape is old, and the honest version of this article starts by saying who owns it.

Kleppmann and Jepsen own the ancestor. In 2015 Martin Kleppmann wrote Please stop calling databases CP or AP. His argument is that "within one piece of software, you may well have various operations with different consistency characteristics." Shoehorning a system into one bucket, he wrote, means "inevitably changing the meaning of 'consistency' or 'availability' to whatever definition suits them." Five years later Kyle Kingsbury's Jepsen analysis of etcd 3.4.3 caught etcd's own documentation claiming that "all API calls exhibit sequential consistency, the strongest consistency guarantee available from distributed systems." Sequential consistency is strictly weaker than linearizability, so the claim was wrong. A real guarantee, correctly enforced, described on the vendor's own artifact with a label that does not match what a reader will assume. That is this article's shape, in a different field, eleven years earlier.

There is an inversion worth noticing. etcd's documentation was wrong about the rank of its guarantee. It made a claim you could check and fail. LangGraph's artifacts make no claim about the unit at all. Nothing to check, nothing to fail, nothing to correct. That is a harder failure to catch, not an easier one, and it is the only part of the shape I am claiming.

The software engineering literature already measured the symptom. Zhu and colleagues' Bugs in Modern LLM Agent Frameworks: An Empirical Study, at FSE '26, mined issue trackers across agent frameworks. It found that problems "arise during scheduling, tool invocation, and graph execution, where mismatches between developer expectations and execution semantics often cause duplicated runs, stalled workflows, or premature termination." Their top two root-cause categories, API Misuse at 32.97% and API Incompatibility at 22.34%, are more than half of everything they classified.

That is the strongest objection to this article and I want it stated before the argument rather than after. Their finding is that developer expectations and execution semantics diverge. This article is about why a careful engineer's expectation diverges: not because the guarantee is weak, but because it holds over a unit that no artifact names. Their categories are the symptom the unit question predicts.

diagrid published the closest critique. In Still Not Durable (2 March 2026), Yaron Schneider writes that "checkpointing is a storage operation, not a reliability guarantee." He says LangGraph's checkpointing features "fall far short of durable execution" because "they save state, but leave failure detection, automatic recovery, and duplicate prevention entirely to you."

That is one instance of this shape, on the durability axis, and Schneider got there first. Two differences matter. His is a sufficiency critique: the guarantee is not strong enough, so build the rest yourself. Mine is a scope critique: the guarantee is strong enough for what it covers, and the problem is that what it covers is unstated. The same post concedes the premise for Microsoft Agent Framework, the other runtime it examines, when it calls that framework's checkpoint system "well-designed as a building block." Note also that diagrid sells a competing durable runtime, which does not make the critique wrong, but you should know it when you read it. Temporal made the same sufficiency argument when it launched its LangGraph plugin on 16 July 2026: "checkpoints are not durable execution," and "The checkpoint preserves your data, not your execution." LangChain's position is the opposite one, that its Agent Server delivers durable execution. All three are vendors.

The framework selection advice already exists. Alex Rivera's builder's guide states the heuristic plainly: "Don't choose based on features. Choose based on what your team can build around the framework and what the framework needs to give you." I agree with it and I am not coining it. What that advice does not supply is a procedure. This article supplies one.

The temporal version of the shape has a name. Igor Santos-Grueiro's Temporary Authority, Permanent Effects (v1, 11 July 2026) requires that "a durable effect is authorized only if the witness that licensed its derived state remains fresh, causally prior, bound to the same effect, and eligible at commit time." That is scope divergence along time: authority valid at one moment, used at another. This article is scope divergence along unit. The two are different axes, and the paper's own precondition is that runtimes emit the signals its monitor consumes. The finding here is that LangGraph's artifacts do not emit the unit. So the paper's requirement and this finding fit together.

Two more ancestors, because they are what half of you are already thinking. Spolsky's Law of Leaky Abstractions (2002) is about an implementation detail showing through an abstraction that promised to hide it. That is close but not the same: nothing here leaks, and nothing promised to hide. The guarantee is stated plainly, and what is missing is the quantifier on it. The closer ancestor is Evans's aggregate from Domain-Driven Design (2003), which is literally the instruction to name the unit your consistency guarantee holds over, because engineers will otherwise assume a larger one. Gray's work on granularity of locks (1975) is the same move in databases. Memory scopes in CUDA and C++, memory_scope_device against memory_scope_system, are the same move in hardware, where the field eventually put the unit in the type name. That is the strongest evidence I have that naming the unit is what fixes this, and none of it is mine.

Laid out by year, each ancestor owns one piece of the shape, and only the bottom row is new:

d2
grid-rows: 10
grid-columns: 3
grid-gap: 6
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  who: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  field: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  owns: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
  mine: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"; bold: true}}
}
h1: "Who, when" {class: head}
h2: "Field" {class: head}
h3: "What they already own" {class: head}
a1: "Gray et al., 1975" {class: who}
a2: "databases" {class: field}
a3: "granularity of locks: the unit is a design choice" {class: owns}
b1: "Spolsky, 2002" {class: who}
b2: "abstractions" {class: field}
b3: "leaky abstractions: close, but nothing here leaks" {class: owns}
c1: "Evans, 2003" {class: who}
c2: "domain-driven design" {class: field}
c3: "the aggregate: name your consistency unit" {class: owns}
d1: "Kleppmann, 2015" {class: who}
d2: "distributed systems" {class: field}
d3: "guarantees differ per operation, not per system" {class: owns}
e1: "Jepsen, etcd 3.4.3, 2020" {class: who}
e2: "distributed systems" {class: field}
e3: "a real guarantee, wrongly labelled on the vendor's page" {class: owns}
f1: "diagrid, March 2026" {class: who}
f2: "agent runtimes" {class: field}
f3: "checkpoints are not durable: a sufficiency critique" {class: owns}
g1: "Zhu et al., FSE '26" {class: who}
g2: "agent frameworks" {class: field}
g3: "the symptom: expectations diverge from semantics" {class: owns}
i1: "Santos-Grueiro, July 2026" {class: who}
i2: "agent authorization" {class: field}
i3: "scope divergence along time" {class: owns}
j1: "This article" {class: mine}
j2: "agent runtimes" {class: mine}
j3: "scope divergence along unit, audited across one runtime" {class: mine}

What is left, and what I am claiming: nobody has named this for agent runtimes, and nobody has run a cross-cutting audit of one agent runtime's guarantee scopes. That is what the last seven articles were, without my knowing it until the sixth.

What a Scope-Blind Guarantee is

A Scope-Blind Guarantee is a runtime guarantee that is real, correctly implemented and correctly enforced, whose unit of scope differs from the unit the adopting engineer assumes, and which appears on no artifact the framework renders that would correct the assumption.

Three properties, and all three are required:

  1. It is real. It fires. You can watch it fire. This is not a missing feature or a bug report.
  2. Its unit is not the assumed unit. The divergence is in what the guarantee ranges over, not in whether it holds.
  3. No rendered artifact names the unit. Not the diagram, not the type annotation, not the checkpoint, not the trace, not the test report.

Part 6 coined Width-Blind Bound for one instance of this: a run-level limit correctly enforced over the depth axis in a system where the width axis is chosen by the model. Its three properties were that it is real, that its unit is not the quantity the model chose, and that it reads as total. Those are the general form's three properties with "width" substituted in.

So a Width-Blind Bound is the width instance of a Scope-Blind Guarantee. They are not synonyms and neither replaces the other.

The relationship is containment: the general term needs all three properties, and Part 6's term fills the second one in with a specific pair of units:

d2
direction: down
classes: {
  prop: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  inst: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
sbg: "Scope-Blind Guarantee: all three required" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 16
  p1: "1. It is real\nit fires, you can watch it" {class: prop}
  p2: "2. Its unit is not\nthe assumed unit" {class: prop}
  p3: "3. No rendered artifact\nnames the unit" {class: prop}
}
wbb: "Width-Blind Bound (Part 6)\nrecursion_limit holds over depth;\nthe model chooses the width" {class: inst}
sbg -> wbb: "the width instance"

One clarification, because the suffix has to mean the same thing twice. In both terms the artifact is what is blind, never the reader and never the mechanism's correctness. recursion_limit is blind to width. LangGraph's rendered artifacts are blind to scope. Read it the other way - as the reader being blind - and the two terms come apart. Part 6 also drew a line between a width bound, which is a mechanism that mostly does not exist, and a Width-Blind Bound, which is a mechanism that does exist and is aimed elsewhere. That line still holds. This part sits one level of generality above Part 6. Nothing in Part 6 changes.

Seven LangGraph guarantees and the units they hold over

I have to be careful here, because the previous part taught me an expensive lesson about quantifiers. In Part 7 I wrote a sentence beginning "every defect this series measured," and peer review found it false in three separate ways before it shipped. So this section names each instance rather than quantifying over the series, and the exceptions get named too.

PartThe guaranteeThe unit it actually holds overThe unit a reader assumesWhat is silent
2the fold order among co-active writers follows the task-path sortwithin one superstepthe whole runthe type annotation, the drawing
3the rendered graph is a sound over-approximationnode granularityaction granularityat 1.2.9 draw_mermaid() was byte-identical for 1, 3 and 20 tools; since 1.2.19 it lists the ToolNode's declared tools, but not which ones middleware may hide or gate, and not how many calls one turn emits
4recursion_limit bounds the runone invocationthe threadnothing on the thread records spend
5RemoveMessage removes contentthe current channel valuethe thread's durable recordno error; delete_thread is the only primitive that reaches storage, and its unit is the whole thread
6recursion_limit bounds the rundepthtotal workone dotted edge, no worker count
7the eval suite covers the agentthe first entry into a threadthe systema green report
8BaseStore holds cross-thread memoryone key, last write winsshared memory with a merge policyno exception, no version, no second row

Part 1 is the frame rather than a row. A hand-rolled while loop is a runtime whose guarantees were never specified at all, which is the degenerate case of the same question: not a unit you got wrong, but no unit written down anywhere.

And the counter-examples, because they matter more than the pattern:

  • Part 2's order-coupled defect does not need a second entry into a thread. It needs three things at once - a non-commutative reducer, two co-active writers, and something downstream that reads the order - and all three can be met on a cold one.
  • Part 3's ungated refund fired on turn one. The prompt-only guard failed at the first opportunity, with no state involved.
  • Part 6's Width-Blind Bound fires on a cold thread with no checkpointer at all.

Three of the seven do not need any accumulated state. If I claimed this series had found one mechanism, those three would refute it. What the series found is one question that exposes all seven.

The error always runs in the same direction

Look down the two middle columns of that table. In six of the seven rows the assumed unit is broader than the real one. Superstep becomes the whole run. One key becomes shared memory. First entry becomes the system.

Row 3 is the exception, and it runs the other way. The rendered graph is sound at node granularity while the reader assumes soundness at action granularity, which is a finer unit, not a broader one. The direction flips because a node contains actions rather than the reverse. Since langgraph 1.2.19 the drawing names the tools a ToolNode declares, so the gap that remains is narrower: calls per turn, middleware filtering, and Send targets nobody declared. The failure is the same in mirror image: the reader assumes the guarantee covers more than it does, which is the invariant that actually holds across all seven.

Not once does an engineer assume a guarantee is narrower than it is. That asymmetry is not luck, and I think it has two causes worth naming, because they tell you where to look before you have measured anything.

The first is grammatical. A guarantee arrives as a capability: this runtime has checkpointing, it has a recursion limit. A capability with no stated bound reads as total, in the same way that "this car has brakes" does not invite the question over what distance. Narrowing requires a second sentence, and the second sentence is the one that does not get written.

The second is a vocabulary mismatch, and it is the more useful of the two. The real units in that table are superstep, node, invocation, channel value, depth and key - six nouns straight from the runtime's internal model. The seventh, first entry, is a name I had to invent, because the runtime offers none. The assumed units are run, thread, conversation, the system - nouns from the user's model of their own product. The two vocabularies do not overlap, so the narrowing is expressible only in words the reader has no reason to be thinking in. A superstep is not a thing your product manager has ever needed. It is, however, exactly the thing your reducer is scoped to.

Each row pairs a measured unit with the noun a reader puts in its place:

d2
grid-rows: 7
grid-columns: 3
grid-gap: 8
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  rt: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  part: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
  us: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
}
h1: "Runtime's vocabulary\n(where it really holds)" {class: head}
h2: "Measured in" {class: head}
h3: "Your product's vocabulary\n(what the reader substitutes)" {class: head}
r1: "superstep" {class: rt}
p1: "Part 2  ->  broader" {class: part}
u1: "the whole run" {class: us}
r2: "invocation" {class: rt}
p2: "Part 4  ->  broader" {class: part}
u2: "the thread" {class: us}
r3: "channel value" {class: rt}
p3: "Part 5  ->  broader" {class: part}
u3: "the record" {class: us}
r4: "depth" {class: rt}
p4: "Part 6  ->  broader" {class: part}
u4: "total work" {class: us}
r5: "first entry" {class: rt}
p5: "Part 7  ->  broader" {class: part}
u5: "the system" {class: us}
r6: "one key" {class: rt}
p6: "Part 8  ->  broader" {class: part}
u6: "shared memory" {class: us}

All six arrows point the same way, from a narrow internal noun to a broad product noun. Part 3 is left out of the figure because it is the one that inverts - a node contains actions rather than the other way round. A runtime that wanted to close this gap would not need better documentation. It would need a name on the left that is hard to confuse with the thing on the right.

That gives a cheap test you can apply to a runtime before you have written a probe:

Take each guarantee and state its unit. If you can only state it using a noun from the framework's internals, your users are not thinking in that noun, and they will assume the nearest noun from their own vocabulary - which is always the broader one.

It also explains why Temporal's disclosure works, and it is not because Temporal wrote more documentation. Workflow Execution and Workflow Function Execution are both internal nouns. But they are adjacent internal nouns that differ by one word, sitting in the same sentence, so the reader cannot pick up one without noticing the other exists. LangGraph's recursion_limit has no sibling noun. There is nothing beside it to make you ask which of the two things it means, and Part 4 and Part 6 measured that it means two different things.

Wrong way: BaseStore cross-thread memory silently loses concurrent writes

Part 5 promised a measurement of cross-thread store collisions and did not deliver it. Part 6 named the debt in its own text and left it open. This is it.

BaseStore is LangGraph's cross-thread memory surface. Graph state is per thread and has a declared concurrency policy, because Part 2 established that the reducer in the type annotation is that policy. The store is the thing you reach for when memory has to outlive a thread: user preferences, extracted facts, anything the next conversation should know.

Here is the shape almost every memory-extraction step takes. Read what is known about the customer, add what you just learned, write it back.

python
from langgraph.store.base import BaseStoreNS = ("memories", "customer-42")def remember(state: AtlasState, *, store: BaseStore) -> dict:    """Extract a fact from this turn and add it to the customer's profile."""    item = store.get(NS, "profile")    facts = item.value["facts"] if item else []    facts.append(extract_fact(state))          # the model call    store.put(NS, "profile", {"facts": facts})    return {"log": ["remembered"]}

That is a read, a modify, and a write, with a model call in the middle holding the window open. Run it in two threads for the same customer at the same time and one of the two facts is gone.

I measured it. The deterministic version first, because a race that only sometimes reproduces proves less than an interleave you construct on purpose:

text
thread A intended : ['seeded', 'A: prefers email']thread B intended : ['seeded', 'B: timezone IST']store now holds   : ['seeded', 'B: timezone IST']A's write survived: False

Step by step, the interleave that produced it looks like this. Watch the right-hand column:

d2
grid-rows: 5
grid-columns: 3
grid-gap: 8
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  a: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  b: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  ok: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  lost: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
}
h1: "thread A" {class: head}
h2: "thread B" {class: head}
h3: "store holds (key 'profile')" {class: head}
a1: "1. get -> ['seeded']" {class: a}
b1: "1. get -> ['seeded']" {class: b}
s1: "['seeded']" {class: ok}
a2: "2. model call appends\n'A: prefers email'" {class: a}
b2: "2. model call appends\n'B: timezone IST'" {class: b}
s2: "['seeded']" {class: ok}
a3: "3. put" {class: a}
b3: "(still in its model call)" {class: b}
s3: "['seeded', 'A: prefers email']" {class: ok}
a4: "(done, believes it succeeded)" {class: a}
b4: "4. put" {class: b}
s4: "['seeded', 'B: timezone IST']\nA's fact gone, no error" {class: lost}

Then with real threads and the window deliberately widened, on InMemoryStore:

text
  2 writers ->   1 facts survived ( 1 lost,  50% loss)  8 writers ->   1 facts survived ( 7 lost,  88% loss) 32 writers ->   2 facts survived (30 lost,  94% loss)

Those percentages are a demonstration, not a workload. I put a barrier before the read and a sleep in the middle to make every writer overlap, which is the worst case rather than the expected one. Be clear about what those numbers are. With every writer reading the same pre-state, exactly one survives, so the figure is (N-1)/N by construction. The 32-writer row reads 94% rather than 97% only because two writers happened not to overlap. The measurement here is that nothing prevents the collision, not the rate at which it happens. How often it bites you depends on how long your window is, and the window is a model call.

Then the same thing across two LangGraph threads sharing one store, which is the configuration the store exists for:

text
two threads ran, each appended one factstore holds : ['alice']survived    : 1 of 2Per-thread checkpoint state is isolated and intact:  t-alice: log=['alice wrote']  t-bob: log=['bob wrote']

Both threads believe they succeeded. Both checkpoints are correct. Bob's fact is gone. (At 1.2.9 it was Alice's; which writer loses depends on who writes last.) The contrast is the whole point: per-thread durability is the part LangGraph invests in, and I have written before about how that checkpoint architecture holds up under load. The cross-thread surface beside it has none of those properties.

Everything above ran on InMemoryStore, and the obvious rebuttal is that nobody runs that in production. So here is the load-bearing evidence, which is not the backend but the contract. put() has this signature in langgraph-checkpoint 4.3.2, re-checked in November 2026, and it is BaseStore's, which every backend implements:

text
put(self, namespace, key, value, index=None, *,    ttl: float | None | NotProvided = NOT_PROVIDED) -> None

There is no expected_value, no version, no etag, no compare-and-swap. A search of the method's own source for compare, expected, version, etag, cas, swap and if_match returns nothing. A feature request for concurrency-safe store.put was opened on 30 October 2025, describing exactly this "get, run logic, update" race and proposing optimistic locking. It still had no maintainer response as of 16 November 2026.

Compare that to what the same runtime does one layer down. Part 2 measured that two nodes writing the same state key in one superstep with no reducer raises:

text
InvalidUpdateError: At key 'evidence': Can receive only one value per step.

The in-thread surface refuses to guess. The cross-thread surface silently picks one. Three put calls on the same key produced zero warnings, zero stderr output, and zero exceptions. And afterwards there is nothing to find: the Item carries created_at and updated_at but no version field, and search() returns a single row. No history, no conflict record, no second copy.

So the guarantee is real, and it is exactly what a key-value store promises: your write lands. The unit is one key, last write wins. The assumed unit is shared memory with a merge policy, because that is what the rest of this runtime taught you to expect.

What that costs is not hypothetical, and it has been measured by people who were not looking at LangGraph. Yang and colleagues' No Attacker Needed: Unintentional Cross-User Contamination in Shared-State LLM Agents (1 April 2026) studies the case where "a single agent serves multiple users within a team or organization, reusing a shared knowledge layer across user identities." Their headline number: "under raw shared state, benign interactions alone produce contamination rates of 57 to 71%."

Note benign. No attacker, no prompt injection, no adversarial input. Just ordinary use, because, in their words, "information that is locally valid for one user can silently degrade another user's outcome when the agent reapplies it without regard for scope."

Their paper measures the semantic consequence: the wrong fact reaching the wrong user. My probe measures the mechanical cause one layer down: the write that never landed, on a surface with no compare-and-swap and no conflict signal. They are the same problem seen from two ends, and the phrase they reach for without having a concept for it - without regard for scope - is this article's subject.

Right way: one key per writer, merge at read time

Part 2 gave three fixes for a non-commutative reducer, in preference order: use a commutative reducer, carry an ordering key and sort at the point of use, or give each writer its own key. The store has no reducer and cannot be given one, so the first two are unavailable. The third works, and it works precisely because it removes the shared mutable cell.

python
from datetime import datetime, timezonefrom uuid import uuid4from langgraph.config import get_config          # Part 4: Runtime has no .configfrom langgraph.store.base import BaseStore# AtlasState gains one key in this part:#   log: Annotated[NotRequired[list[str]], operator.add]def remember(state: AtlasState, *, store: BaseStore) -> dict:    """Write to a key nothing else ever writes."""    thread_id = get_config()["configurable"]["thread_id"]    # One key per WRITE, not per writer. See below for why that matters.    store.put(        ("memories", state["customer_id"], "by_thread"),        f"{thread_id}:{uuid4().hex}",        {            "facts": [extract_fact(state)],            "written_at": datetime.now(timezone.utc).isoformat(),        },    )    return {"log": ["remembered"]}def recall(customer_id: str, *, store: BaseStore) -> list[str]:    """Merge at read time, which is where the merge policy can be stated."""    # Part 5: search() defaults to limit=10 and under-reports in silence.    # Paginate above this; a hard limit is the same defect with a bigger number.    items = store.search(("memories", customer_id, "by_thread"), limit=1000)    facts: list[str] = []    for item in sorted(items, key=lambda i: i.value["written_at"]):        facts.extend(item.value["facts"])    return facts

Each write lands in a row nothing else will ever write, and the merge happens on the way out:

d2
direction: down
classes: {
  w: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  row: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  fn: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  out: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
writers: "remember() calls" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  w1: "t-alice, turn 1" {class: w}
  w2: "t-bob, turn 1" {class: w}
  w3: "t-alice, turn 2" {class: w}
}
ns: "namespace (memories, customer_id, by_thread)" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  k1: "t-alice:uuid-1\n1 fact, written_at" {class: row}
  k2: "t-bob:uuid-2\n1 fact, written_at" {class: row}
  k3: "t-alice:uuid-3\n1 fact, written_at" {class: row}
}
recall: "recall(): search(limit=1000)\nsort by written_at, extend" {class: fn}
facts: "every fact survives;\nthe merge policy is in your code" {class: out}
writers -> ns: "one put per write, no shared cell"
ns -> recall
recall -> facts

One key per writer is not enough, and I had it wrong first. My initial version keyed on thread_id alone. A thread is a conversation and a conversation has many turns, so turn two overwrites turn one on exactly the surface this section exists to fix. Measured: two turns on one thread, and the store holds ['timezone IST']. The rule is one key per write, not per writer, and it only removes the lost update if each key is written once. Two nodes calling remember in the same superstep would collide again on a per-thread key, and do not on a per-write one.

AtlasState and extract_fact are the series' running example, carried from Part 1: customer_id is caller-supplied and required, and the model never writes it. That separation is what makes the namespace above safe to build from state. log is new in this part and needs operator.add, since more than one node appends to it.

The limit=1000 is not decoration. Part 5 measured that BaseStore.search() defaults to limit=10, so a sweep that does not pass a limit under-reports in silence. That default is itself a Scope-Blind Guarantee of the small and irritating kind: search really does return items, and it really is scoped to ten of them.

And the merge now happens at read time in code you wrote, which means the policy is stated. That is the whole move. You have not made the store concurrent. You have removed the need for it to be, and you have put the merge somewhere a reviewer can see it. If you genuinely need a single authoritative row that many writers update, the store is the wrong place for it. Use the compare-and-swap in the system of record that Part 4 built for the grant ledger: UPDATE ... WHERE, check rowcount, and let the database be the thing that arbitrates.

How many tool calls can one LangGraph model turn emit?

Part 6 named the tool-call list in one assistant message as a width surface and left it unmeasured. Here it is.

First, a question the research for this article could not settle from public sources: how does ToolNode actually dispatch parallel calls? Blog posts say ThreadPoolExecutor; a GitHub issue says asyncio.gather. Reading the installed source, langgraph/prebuilt/tool_node.py in langgraph-prebuilt 1.1.2, settles it, and both are right about different paths:

text
L831: executor.map(self._run_one, tool_calls, input_types, tool_runtimes)L866: outputs = await asyncio.gather(*coros)

The synchronous path goes through get_executor_for_config and executor.map. The async path uses asyncio.gather. This is the same mechanism Part 3 identified when it measured that parallel tool-call fold order follows the model's emitted token order rather than completion order, so nothing here contradicts that finding.

More interesting is what does not appear in that file at all. max_concurrency occurs zero times. Semaphore occurs zero times.

Then the width question. How many tool calls can one message carry?

text
    1 tool calls ->     1 ToolMessages  (    69.8 ms)  OK   10 tool calls ->    10 ToolMessages  (    56.2 ms)  OK  100 tool calls ->   100 ToolMessages  (   205.4 ms)  OK 1000 tool calls ->  1000 ToolMessages  (  1949.8 ms)  OK 5000 tool calls ->  5000 ToolMessages  (  7808.3 ms)  OK

No cap, no warning, no error. And max_concurrency behaves on this surface exactly as Part 6 measured it behaving on Send:

text
n=50, no config              -> peak simultaneity  12 | tools executed 50n=50, max_concurrency=2      -> peak simultaneity   2 | tools executed 50n=50, max_concurrency=5      -> peak simultaneity   5 | tools executed 50

Where each of those numbers lives on the dispatch path:

d2
direction: down
classes: {
  msg: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  node: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  path: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  knob: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  out: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
msg: "one AIMessage: N tool_calls\n(the model picks N; measured to 5000)" {class: msg}
tn: "ToolNode (langgraph-prebuilt 1.1.2)\nmax_concurrency: 0 occurrences, Semaphore: 0" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 16
  sync: "sync: executor.map\npeak = min(32, cpu + 4) = 12" {class: path}
  async: "async: asyncio.gather\none coroutine per call" {class: path}
}
knob: "config max_concurrency=2\nbounds simultaneity to 2" {class: knob}
out: "N ToolMessages, always\n50 of 50 ran in every run" {class: out}
msg -> tn: "no cap"
knob -> tn: "how many at once"
tn -> out: "how many in total: N"

Simultaneity is bounded. Cardinality is not. All fifty ran every time. The unset peak of 12 is min(32, cpu + 4) on an eight-core machine, which is a default of the standard library rather than a decision LangGraph made about your agent.

The ToolNode reference documentation does not mention a cap either. Its only words about parallel dispatch are "Manages parallel execution, error handling."

The rendered graph carries none of this. Since langgraph 1.2.19, draw_mermaid() labels a ToolNode with its tool names (tools<hr/><small><em>__tools = t0, t1, t2</em></small>), so the drawing for one, three and twenty tools now differs: 333, 341 and 419 characters. It names the tools and still contains no count of calls. It cannot contain one. The drawing is produced before any state exists, and the width only exists once a model has emitted a message. That is the same structural reason Part 6 gave for the single dotted Send edge.

One number I am deliberately not giving you: provider limits. Search results will tell you that one vendor supports 128 tools and another 64. Those are limits on how many tool definitions you may send, not on how many calls one turn may emit. I could not find a documented bound on calls per turn from any provider, and I am not going to invent one.

Why LangGraph interrupts cause duplicate tool execution in parallel tool calls

Now the failure this article opened with.

On 24 December 2025, James Heavey filed langgraph issue #6624: "ToolNode doesn't collect all interrupts from parallel tool execution." The report says all three tools execute and call interrupt(), yet of the interrupt values "only 1 is captured". Maintainers closed it on 12 January 2026 as a duplicate of #6533, with a usage pattern rather than a code fix: "If you'd like to use tools w/ interrupts, we recommend using Send to trigger the tool node w/ each of your tool calls." I come back to that workaround below, measured.

That is Part 6's width surface meeting Part 7's rule that a node body executes interrupts + 1 times. I reproduced it at 1.2.9, and again at 1.2.22 with identical output, with three approval-gated tools in a single assistant message:

text
3 gated tool calls dispatched in ONE messagetool bodies that started : ['body-0', 'body-1', 'body-2']interrupts collected     : 1    -> {'approve': 0}

Three bodies ran. One interrupt was collected. So the human sees one approval request when three tools wanted one. langgraph 1.2.20 gave each interrupt() within a task its own id, and this still prints 1: ToolNode runs all three calls inside one task, and only one of the three interrupts reaches the state.

Then I drove it to completion, because a partial run tells you nothing about whether the thing terminates:

text
initial invoke: bodies=3 interrupts=1 next=('tools',)resume  1: +3 bodies (total  6) | interrupts pending 1resume  2: +3 bodies (total  9) | interrupts pending 1resume  3: +3 bodies (total 12) | interrupts pending 0converged            : True after 3 resume(s)tool bodies executed : 12 for 3 logical approvalsToolMessages produced: 3 (expected 3)  -> did-0:yes  -> did-1:yes  -> did-2:yes

The loop behind those numbers, at width three:

d2
direction: down
classes: {
  msg: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  body: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  state: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  human: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  out: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
msg: "1. one AIMessage, 3 gated tool_calls" {class: msg}
task: "ToolNode: ONE task runs all three bodies" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  b0: "body-0\ninterrupt()" {class: body}
  b1: "body-1\ninterrupt()" {class: body}
  b2: "body-2\ninterrupt()" {class: body}
}
st: "2. state holds 1 interrupt\n(not 3)" {class: state}
hu: "3. human answers it:\nCommand(resume=...)" {class: human}
out: "after 3 resumes: 12 body runs,\n3 correct ToolMessages" {class: out}
msg -> task
task -> st
st -> hu
hu -> task: "4. the whole task re-runs"
st -> out: "when none pending"

It converges. It is not a hang and not a livelock, and I would have written that it was if I had stopped after the first resume. Three approvals, three tool messages, correct contents. The synchronous and asynchronous paths produced identical counts at every width I tested, all of which are below the sync executor's default peak of 12. Above that I would expect them to diverge and I have not checked.

It costs twelve executions of the tool body.

I then tried to turn that into a law, and failed, which is worth showing because the failure is the finding. My hypothesis was that width W needs W resumes and re-runs all W bodies each pass, giving W * (W + 1) executions. Measured across widths 1 to 6:

WidthBody executions (most common, 1.2.22)Range over 30 runsResumesW * (W+1)Fits
12212yes
25526no
31211 to 12312yes
41716 to 18420no
52423 to 26530no
64241 to 42642yes

No formula fits. Worse, the count is not stable. At 1.2.9, five runs of the sweep found only width 5 moving (23, 24, 24, 24, 23). At 1.2.22, thirty runs found every width from 3 to 6 moving, and only widths 1 and 2 repeated exactly. So the execution count is scheduling-dependent and I will not give you a growth law for it.

One thing does hold across every width and every run I measured, at both versions: bodies <= W * (W + 1), reached at widths 1, 3 and 6. I will state that as an upper bound and not as a law, because the mechanism is a thread pool and I have not tested past width 6.

What is also stable: the number of resumes always equals the width, and the final tool message count is always the width and always correct.

The number that actually matters is the one below the gate

Counting tool-body entries understates this, and understating it is what my own first draft did. The interesting count is how many times execution gets past the interrupt() to the part that moves money. So I instrumented above and below the gate separately.

That count is not scheduling-dependent. It is exact, and it repeated identically across five trials at every width at 1.2.9, and across fifteen more at 1.2.22, while the body count above was moving:

WidthPost-gate effectsW(W+1)/2Times the first ticket is chargedToolMessages
11111
23322
36633
4101044
5151555
6212166

Post-gate effects are exactly W(W+1)/2, and the first tool call in the batch executes its effect once for every call in the batch. The pattern is triangular because each resume re-runs every body from the top, and each pass carries one more of them past its now-satisfied gate.

I refused to give you a growth law for the tool-body count two paragraphs ago because it was unstable. This one I will state as a law, because twenty trials at six widths, across two versions, produced identical numbers with no variance at all. The difference between those two cases is the only reason either statement is worth anything.

Read the last two columns together. At width six the customer is charged twenty-one times, the first ticket is charged six times, and the conversation shows six refunds with the right amounts. Every assertion an evaluation harness can reach agrees that this worked. Distinct approval values land positionally, too. Feeding ALPHA, BETA, GAMMA to three gates produced exactly did-0:ALPHA, did-1:BETA, did-2:GAMMA, and at 1.2.22 it did so in ten runs out of ten. So the second symptom in issue #6624, mismatched resume values, did not reproduce in this configuration. I am not claiming it never happens. Issue #6533 is the canonical report of it, and it reproduces with async tools and random delays that force the event loop to switch, which my synchronous probe does not do. I looked for it here and did not see it.

Which leaves the finding that matters. Here is the entire assertion surface after the width-3 run:

text
final ToolMessages          : 3     <- an output assertion passescontents                    : ['did-0:yes', 'did-1:yes', 'did-2:yes']checkpoints on the thread   : 3metadata['writes'] non-None : 0 of 3pending interrupts at end   : 0ACTUAL tool body executions : 12

Nothing there distinguishes three executions from twelve. Part 7 argued that evaluation asserts on what the model said and what the world shows, and never on what the runtime kept. This is that argument with a number attached: the answer is right, the world is right, and the runtime did four times the work, and the runtime's own records do not contain the difference.

The maintainers' Send workaround from #6533 changes the numbers, so I measured it too. Dispatch each tool call as its own task with Send("tools", ToolCallWithContext(...)), keep interrupt() inside the tool body, and answer by id:

text
W=1: interrupts at first pause=1 resumes=1 bodies=2 post-gate=1 worst ticket=1W=3: interrupts at first pause=3 resumes=1 bodies=6 post-gate=3 worst ticket=1W=6: interrupts at first pause=6 resumes=1 bodies=12 post-gate=6 worst ticket=1

Side by side at width three, pass by pass. A yellow cell waits at the gate and a red cell is a refund below it; count the red cells down each column:

d2
grid-rows: 1
grid-gap: 30
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  gate: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  fx: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  sum: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
one: "ToolNode, one task (#6624)" {
  class: pane
  label.near: top-center
  grid-rows: 6
  grid-columns: 4
  grid-gap: 6
  h0: "pass" {class: head}
  h1: "T0" {class: head}
  h2: "T1" {class: head}
  h3: "T2" {class: head}
  p0: "invoke" {class: head}
  a0: "waits" {class: gate}
  b0: "waits" {class: gate}
  c0: "waits" {class: gate}
  p1: "resume 1" {class: head}
  a1: "REFUND" {class: fx}
  b1: "waits" {class: gate}
  c1: "waits" {class: gate}
  p2: "resume 2" {class: head}
  a2: "REFUND" {class: fx}
  b2: "REFUND" {class: fx}
  c2: "waits" {class: gate}
  p3: "resume 3" {class: head}
  a3: "REFUND" {class: fx}
  b3: "REFUND" {class: fx}
  c3: "REFUND" {class: fx}
  t: "total" {class: head}
  ta: "3" {class: sum}
  tb: "2" {class: sum}
  tc: "1" {class: sum}
}
send: "Send per call (#6533 workaround)" {
  class: pane
  label.near: top-center
  grid-rows: 4
  grid-columns: 4
  grid-gap: 6
  h0: "pass" {class: head}
  h1: "T0" {class: head}
  h2: "T1" {class: head}
  h3: "T2" {class: head}
  p0: "invoke" {class: head}
  a0: "waits" {class: gate}
  b0: "waits" {class: gate}
  c0: "waits" {class: gate}
  p1: "resume 1" {class: head}
  a1: "REFUND" {class: fx}
  b1: "REFUND" {class: fx}
  c1: "REFUND" {class: fx}
  t: "total" {class: head}
  ta: "1" {class: sum}
  tb: "1" {class: sum}
  tc: "1" {class: sum}
}

Every interrupt arrives at the first pause, one resume answers them all, and each effect fires once. Each body still runs twice, which is Part 7's interrupts + 1 per task, and the width is still whatever the model chose: six calls dispatch six tasks with nothing to stop sixty. The workaround removes the triangle. It does not bound the width (Part 6).

The interrupt guarantee is real. Approval is genuinely required, and nothing executes past the gate without it. Its unit is one interrupt per resume, not one interrupt per gated call. LangGraph's fault-tolerance page now states half of this: a retry "gives at-least-once semantics for node execution," and "The same re-execution model applies after an interrupt or a crash resume." That names the node function as the unit that re-runs. No artifact says that width multiplies it.

First, the part LangChain already solved

Before I show you a hand-rolled node, the honest disclosure: the shipped HumanInTheLoopMiddleware does not have this problem. Part 3 introduced it as an after_model hook that gets its own node. I measured it against the same three-call message:

text
3 gated tool calls in one messageinterrupts raised : 1  payload is a dict carrying an action_requests list of 3tool bodies run so far: 0

One interrupt for the whole batch, carrying all three requests, raised before any tool body runs. That is the default, interrupt_mode="batched". Since langchain 1.4.6 there is a second mode, HumanInTheLoopMiddleware(interrupt_mode="per_call"), which LangChain's own docstring says "is planned to become the default in the next major release." I measured it against the same message at langchain 1.5.0:

text
[batched]  interrupts raised: 1 | tool bodies run before approval: 0[batched]  resumes=1 tool bodies=3 per ticket={'T0': 1, 'T1': 1, 'T2': 1}[per_call] interrupts raised: 3 | tool bodies run before approval: 0[per_call] resumes=1 tool bodies=3 per ticket={'T0': 1, 'T1': 1, 'T2': 1}

Per-call raises three interrupts, one per call, still before any body runs, and one resume keyed by interrupt id answers all three. Both modes avoid the re-execution failure, because create_agent dispatches each call as its own task and the gate sits outside the tool body. The batched node is the checkpoint membrane doing exactly the job it exists for. That is the correct design, and it is first-party. If your gating need is approval, use it, and the twelve-executions failure never happens to you.

Where each of the three designs puts its gate, with the counts measured on the same three-call message:

d2
grid-columns: 1
grid-gap: 18
classes: {
  model: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  gate: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  tools: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  bad: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  good: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
a: "interrupt() inside the tool body (issue #6624)" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  m: "model: 3 calls" {class: model}
  t: "ToolNode, one task:\nbody -> gate -> refund" {class: tools}
  r: "1 interrupt per resume\n12 body runs, 6 refunds" {class: bad}
}
b: "HumanInTheLoopMiddleware, batched (default)" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  m: "model: 3 calls" {class: model}
  g: "after_model node:\n1 interrupt, 3 requests" {class: gate}
  r: "0 bodies before approval\n3 bodies, 3 refunds" {class: good}
}
c: "HumanInTheLoopMiddleware, per_call (langchain 1.4.6+)" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 14
  m: "model: 3 calls" {class: model}
  g: "wrap_tool_call, one task per call:\n3 interrupts, before each body" {class: gate}
  r: "1 resume keyed by id\n3 bodies, 3 refunds" {class: good}
}

So be precise about what the wrong way actually is. It is not "approval in LangGraph is broken." It is that interrupt() called inside a tool body - a documented pattern, and the one issue #6624 reports - meets the re-execution rule and the width surface at the same time. The built-in avoids it by sitting one node earlier.

Right way: bound the width and gate the batch in one node

What the built-in does not do is bound the width. In its default batched mode it will raise one approval for a forty-call batch, and in per_call mode forty, and then dispatch all forty either way. So the node below is not a replacement for HumanInTheLoopMiddleware on the approval axis, where the middleware is better. It earns its place on the width axis, which nothing in the runtime covers, and it is the same shape Part 6 shipped as bounded_fan_out.

Put one node in front of the dispatch, where the whole tool-call list is visible at once, and make it do both jobs.

python
from typing import Literalfrom langchain_core.messages import AIMessage, ToolMessagefrom langgraph.checkpoint.memory import InMemorySaverfrom langgraph.graph import END, START, MessagesState, StateGraphfrom langgraph.prebuilt import ToolNodefrom langgraph.types import interruptfrom pydantic import BaseModelHARD_CEILING = 25       # above this, refuse outrightMAX_DISPATCH = 5        # above this, truncate# refund is Part 3's @tool; any @tool(ticket_id: str, cents: int) works here.class BatchDecision(BaseModel):    decision: Literal["approve", "reject"]def _refuse(calls, reason: str) -> dict:    """Answer EVERY call being refused, so no tool_call_id is left open."""    return {"messages": [        *[ToolMessage(content=reason, tool_call_id=c["id"], name=c["name"])          for c in calls],        AIMessage(content=reason),    ]}def _keep_only(msg: AIMessage, kept: list) -> AIMessage:    """Drop the truncated calls from tool_calls AND from content blocks."""    ids = {c["id"] for c in kept}    content = msg.content    if isinstance(content, list):   # Anthropic-style: tool_use blocks in content        content = [b for b in content                   if not (isinstance(b, dict) and b.get("type") == "tool_use"                           and b.get("id") not in ids)]    return msg.model_copy(update={"tool_calls": kept, "content": content})def bound_and_approve(state: MessagesState) -> dict:    """Bound the dispatched width, then take ONE approval for the batch."""    msg = state["messages"][-1]    calls = list(getattr(msg, "tool_calls", []) or [])    if not calls:        return {}    assert msg.id is not None, "add_messages substitutes by id"    requested = len(calls)    if requested > HARD_CEILING:        return _refuse(calls, f"refused: {requested} calls exceeds {HARD_CEILING}")    dispatched = calls[:MAX_DISPATCH]    answer = interrupt({        "action": "approve_batch",        "width_requested": requested,      # carry both, per Part 6        "width_dispatched": len(dispatched),        "calls": [{"name": c["name"], "args": c["args"]} for c in dispatched],    }, response_schema=BatchDecision)      # langgraph >= 1.2.12 validates it    if answer.decision != "approve":        return _refuse(calls, "refused by reviewer")    # Substitution by id REMOVES the dropped calls from history, so they must    # NOT also be answered - a tool_result with no tool_use is the mirror defect.    return {"messages": [_keep_only(msg, dispatched)]}g = StateGraph(MessagesState)g.add_node("gate", bound_and_approve)g.add_node("tools", ToolNode([refund]))g.add_edge(START, "gate")g.add_edge("gate", "tools")     # dispatch only happens past the gateg.add_edge("tools", END)app = g.compile(checkpointer=InMemorySaver())   # interrupt() requires one

The _refuse helper is not defensive coding. My first version of this node returned a bare AIMessage on both refusal paths, and peer review caught what that does. MessagesState uses add_messages, so a message with no id is appended, not substituted. The original assistant message stays in history carrying all its tool_calls, and nothing answers them. I measured it: the ceiling refusal left 40 orphaned tool_call_ids and the reviewer refusal left 3.

The toy graph never notices, because tools goes straight to END and there is no second model call. In the agent loop this node is written for, the next model call ships that history to the provider and gets a 400. OpenAI: an assistant message with tool_calls must be followed by tool messages responding to each tool_call_id. Anthropic: tool_use ids were found without tool_result blocks. That is Part 1's orphaned-handshake rule, and my own fix broke it.

Then the correction introduced its own defect, which is worth showing because it is the same trap one layer down. My first repair also answered the truncated calls on the approval path. But the approval path substitutes the message by id, so those calls no longer exist in history, and answering them produced 7 dangling tool_results with no matching tool_use - the mirror error. Refuse and you answer everything, because the calls stay. Approve and you answer nothing extra, because the substitution removes them. Both directions measured at zero only after that.

Two changes came out of the November re-check. The first is _keep_only, and it closes the same trap a third time. Truncating only tool_calls leaves an Anthropic-style message's tool_use content blocks in place: with twelve calls carried as content blocks, the version that copied tool_calls alone left all twelve blocks and 7 orphaned tool_use ids, and filtering the blocks too brought it to zero. The second is response_schema=BatchDecision, available since langgraph 1.2.12. A reviewer who answers a bare "approve" now gets a ValidationError and the interrupt stays pending, where before any value other than the exact string silently counted as a refusal. A JSON-schema dict is accepted as response_schema too, and LangGraph does not validate against it, so pass a pydantic model.

Measured:

text
requested=  3 -> interrupts=1 resumes=1 effects=3  toolmsgs=3  (capped at 5)requested=  5 -> interrupts=1 resumes=1 effects=5  toolmsgs=5  (capped at 5)requested= 12 -> interrupts=1 resumes=1 effects=5  toolmsgs=5  (capped at 5)requested= 40 -> interrupts=0 resumes=0 effects=0  refused above ceilingdenied       -> effects=0                          nothing fired

What happens to each requested width on its way through the gate:

d2
direction: down
classes: {
  msg: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  rule: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  stop: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  tools: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  out: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
msg: "model message: requested = 3, 5, 12 or 40 calls" {class: msg}
gate: "gate: bound_and_approve" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 10
  r1: "1. over HARD_CEILING (25)?\nrefuse, answer every call\n(40 -> 0 effects)" {class: stop}
  r2: "2. truncate to\nMAX_DISPATCH (5) with\n_keep_only" {class: rule}
  r3: "3. ONE interrupt,\nresponse_schema=\nBatchDecision" {class: rule}
}
tools: "ToolNode: dispatch only past the gate" {class: tools}
out: "effects: 3 -> 3, 5 -> 5, 12 -> 5,\none resume each; reject -> 0" {class: out}
msg -> gate
gate -> tools: "approve"
tools -> out

Width 3 goes from twelve tool-body executions and three resumes to three and one. More to the point, post-gate effects go from six to three: each refund fires exactly once, the first ticket is no longer charged three times, and the triangular growth disappears because the batch is approved once instead of once per member. A twelve-call message dispatches five. A forty-call message never reaches a tool. And the reviewer sees the whole batch in one decision, with width_requested beside width_dispatched, instead of approving one refund while two more happen invisibly. Batching the decision is also what makes a risk-based approval architecture affordable, because it costs one human interaction per batch rather than one per call.

Carrying both numbers is Part 6's rule and it matters here for a reason specific to this surface: width_requested is the only place the model's actual choice is recorded. Truncate without carrying it and you have destroyed the evidence that the model asked for twelve.

Two things this does not fix, and you should not let it look like it does.

It does not make the tool body run exactly once in general. Anything that re-enters this thread still re-runs bound_and_approve under Part 7's rule, and a fork charges again. What it does is remove the case where width multiplies the re-execution, and put every irreversible line below the gate rather than above it.

And it does not record anything. If you need to know how many times an effect fired, no arrangement of interrupts will tell you, because Part 7 measured that the count is not on the thread. That needs the ledger with an attempts counter that Part 7 ended on: a row you own, outside the rollback surface, incremented on conflict. Gating the batch is the cheap structural fix. The ledger is the one that makes the failure visible.

If you genuinely need one approval per call, Part 4's map form is the shape that survives: Command(resume={interrupt_id: value}), which Part 7 verified holds up across sequential single-gate resumes with the answers preserved in order. The first-party per-call option is now HumanInTheLoopMiddleware(interrupt_mode="per_call") (langchain 1.4.6 or later), measured above. With the map form, langgraph 1.2.20 and later offer an opt-in strict resume that refuses an answer naming an interrupt that is not pending, an empty map, or one value while several are pending (not_pending, empty_map, ambiguous). It is switched on through the private config key __pregel_strict_resume, it is not in the interrupts documentation yet, and a private key can move.

Stripped of the refund example, the question behind every fix in this series is a two-step decision, and the four guarantees on the bottom right failed its second step:

d2
grid-rows: 4
grid-columns: 2
vertical-gap: 56
horizontal-gap: 24
classes: {
  start: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  q: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  sb: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  ok: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  ex: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
}
g: "A guarantee the runtime gives you:\ncheckpoint, limit, reducer, interrupt" {class: start}
blank: "" {style.opacity: 0}
q1: "1. What unit does it\nactually hold over?" {class: q}
a1: "Cannot answer: Scope-Blind Guarantee.\nAudit it or do not rely on it" {class: sb}
q2: "2. Which rendered artifact\nstates that unit?" {class: q}
a2: "None: Scope-Blind Guarantee" {class: sb}
ok: "A diagram, a type, a doc that names it:\nspecified, a reviewer can check you" {class: ok}
ex: "Failed question 2:\nPart 2 superstep, Part 4 invocation,\nPart 6 depth, Part 8 one key" {class: ex}
g -> q1
q1 -> q2: "you can answer it"
q2 -> ok: "named"

LangGraph vs Temporal, DBOS, Convex and Microsoft: does the criterion discriminate?

A criterion that flags everything is not a criterion. So I applied it to four other durable runtimes, and this is the part of the article I was least sure about before doing the work.

It discriminates, and it is worth being precise about how. Under question 2 of the audit - which artifact states the unit - all four comparators pass and LangGraph mostly fails. That is a binary. The ranking I give below is a second and softer axis, how hard the unit is to miss, and it is a judgement rather than a test.

Start with the single most useful sentence I found while researching this article, from Temporal's workflow definition page:

"A Workflow Execution effectively executes once to completion, while a Workflow Function Execution occurs many times during the life of a Workflow Execution."

That is the phenomenon this article opened with. The function body runs many times per logical execution. Temporal states it in one sentence, on the page that defines the concept, using two distinct nouns for the two units. Part 7 measured LangGraph doing the identical thing and found no sentence, no noun, and no field. LangGraph's fault-tolerance page now has the sentence, quoted above. It still has neither the noun nor the field.

Same physics. Opposite disclosure.

It is not an isolated sentence either. Temporal's retry policy documentation says a retry policy "instructs the Temporal Service how to retry a failure of either a Workflow Execution or an Activity Task Execution." It then states that activities retry by default, while "Workflow Executions do not retry by default." It then adds that retry policies "do not apply to Workflow Task Executions." Three units, three names, three different defaults, stated together. Its timeout documentation does the same thing: Workflow Execution Timeout covers "retries and any usage of Continue As New," Workflow Run Timeout "does not include retries or Continue-As-New," and Workflow Task Timeout is about a worker holding a task. The inclusion rule is stated for each.

The others do it in their own register, and not equally well. I would rank them by how hard the unit is to miss, which is a different question from how well documented it is.

Convex comes closest to Temporal. Its actions documentation puts the negative case in the same sentence as the positive, so you cannot read one without meeting the other: "multiple runQuery / runMutations execute in separate transactions and aren't guaranteed to be consistent with each other," while "a single runQuery / runMutation will always be consistent." The boundary is not in a note further down the page. It is in the clause.

Microsoft's durable extension does the single thing I would most want from LangGraph. It tells you outright that two different things are both called checkpointing, and that its own checkpointing "is different from checkpoint storage in standard workflows." That is a collided noun being disambiguated on purpose, which is exactly what recursion_limit needs and does not have.

DBOS states its unit clearly enough - the step, with "one database write per step" - and it is honest about what it does not promise. It never claims exactly-once. Instead it states the requirement that falls on you: "steps should be idempotent, meaning it should be safe to retry them multiple times." It also warns that a change to which steps run "makes the workflow difficult to recover." The unit is there, but you meet it while reading an architecture page rather than while typing a name, which is the weakest of the four positions.

Put next to each other, the five runtimes differ in where a reader meets the unit, and the bottom row is the one with two units under one name:

d2
grid-rows: 6
grid-columns: 3
grid-gap: 6
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  rt: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  best: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  good: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  weak: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  none: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  note: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
h1: "Runtime" {class: head}
h2: "Where you meet the unit" {class: head}
h3: "Example" {class: head}
t1: "Temporal" {class: rt}
t2: "in the noun" {class: best}
t3: "WorkflowExecutionTimeout, WorkflowRunTimeout,\nWorkflowTaskTimeout: three units, three names" {class: note}
c1: "Convex" {class: rt}
c2: "in the same clause" {class: good}
c3: "a single runQuery is consistent;\nmultiple ones are not, same sentence" {class: note}
m1: "Microsoft durable extension" {class: rt}
m2: "a collided noun, disambiguated" {class: good}
m3: "its checkpointing is different from\ncheckpoint storage in standard workflows" {class: note}
d1: "DBOS" {class: rt}
d2: "on an architecture page" {class: weak}
d3: "one database write per step;\nsteps should be idempotent" {class: note}
l1: "LangGraph" {class: rt}
l2: "mostly nowhere" {class: none}
l3: "one recursion_limit: per invocation (Part 4)\nand depth (Part 6). Named honestly:\nthread_limit, max_concurrency, per_call" {class: note}

Now the finding, which is narrower than a ranking.

Every one of those four discloses the unit in prose only. None of them renders scope into a diagram, and none puts it in the type system in a way a type checker enforces. Temporal's workflow sandbox and its Replayer determinism check are real enforcement, but they police determinism rather than scope. If you do not read the documentation, you are in the same position with Temporal as with LangGraph. What Temporal does consistently, and LangGraph does only once, is put the unit in the noun: WorkflowExecutionTimeout and WorkflowRunTimeout and WorkflowTaskTimeout are three different names because they are three different units, and you cannot type one while meaning another.

LangGraph has one recursion_limit. Part 4 measured it scoped per invocation. Part 6 measured it scoped to depth. Two different scope facts, one name, and the name says neither.

So the finding is: Temporal puts the unit in the noun for its three timeouts, and LangGraph does it for recursion_limit nowhere. Not "Temporal is better," and not "LangGraph never does it."

That second qualification is not a hedge, because LangGraph does do it once, and the counter-case is instructive enough that leaving it out would be dishonest. ToolCallLimitMiddleware(thread_limit=20) puts the unit in the parameter name. Part 3 recommended it for exactly that clarity. Then Part 4 went and measured it, and found something my three properties do not cover: thread_limit is named honestly, the reader's assumption about its unit is correct, and the guarantee is still only approximate, because the counter lives in graph state and rolls back with the checkpoint on a crash. Part 4 called that the Halfway pattern.

So thread_limit is not a Scope-Blind Guarantee. It fails the second property outright: the unit is not misread. It is a strength problem, which is diagrid's axis, not mine. That is the criterion doing its job rather than failing it. A test that flagged everything in the runtime would be worthless, and this one declines to flag the one parameter that names its unit properly.

max_concurrency sits in the same category, and this article measured it: it says simultaneity and it means simultaneity. So does interrupt_mode="per_call", added in langchain 1.4.6: it says per call, and on three calls it raised three interrupts. Every time I checked, the LangGraph name that states its unit turned out to state it correctly. The problem is how few of them there are. A correctly named setting can still be offered for a checklist item it does not satisfy, which is a separate pattern, the Namesake Fix.

Since 30 October 2026 the comparison is no longer either-or. Temporal made its LangGraph integration generally available that day, so a LangGraph graph can run inside a Temporal Workflow. In the plugin, every node must declare execute_in: "activity" runs it as a Temporal Activity with Temporal's timeouts and retries, and "workflow" runs it inline, where it must be deterministic. interrupt() is supported in Activity nodes and resumed from Workflow code with Command(resume=...). What that buys is Temporal's named units for the activity layer. LangGraph's own guarantees keep their LangGraph units inside it: recursion_limit and ToolNode width are unchanged, and the store does not come along at all, because the plugin docs say a Store is not accessible inside Activity nodes and runtime.store is None there. These are vendor docs, and the docs page still carried a Public Preview banner when I read it on 16 November 2026. This series grew into a book: Building Real-World Agentic AI Systems with LangGraph. Chapter 25, "Choosing Your Stack (and When Not to Use LangGraph)," works through that composition, with Temporal owning the long-running workflow and a LangGraph subgraph handling the one step that branches on model output.

Why LangGraph production bugs never become bug reports

There is a reason this class of problem does not show up in the places you would look for it.

The state of the art in static verification for agent graphs is Agentproof, which extracts an abstract graph model from LangGraph, CrewAI, AutoGen and Google ADK, and checks reachability, isolation and temporal properties exhaustively. It is good work. Its threat model contains this line:

"The approach assumes that the framework API semantics (e.g., LangGraph's StateGraph, CrewAI's Crew) are correct: the extractor faithfully reads the graph structure that the framework will execute."

That assumption is reasonable, and it is exactly where these findings live. Agentproof would read a graph whose drawing names the tools a ToolNode declares (since langgraph 1.2.19; at 1.2.9 it was byte-identical for one tool or twenty) but says nothing about how many of them one turn may call, and see nothing wrong, because nothing is wrong with the graph. It would read a fan-out that dispatches a thousand workers as one node, because it is one node. The verifier is sound with respect to the artifact. The artifact is silent about the unit.

Follow the drawing through that pipeline and the unit drops out at the first step:

d2
direction: down
classes: {
  src: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  art: {style: {fill: "#4B0082"; stroke: "#3A0066"; font-color: "#FFFFFF"}}
  ver: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  ok: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  lost: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
}
g: "the running graph:\ncalls per turn, re-executions,\nsuperstep-scoped order" {class: src}
a: "the artifact: nodes, edges,\ndeclared ToolNode tools (1.2.19+)" {class: art}
lost: "not on the artifact:\nwidth, re-execution count, unit" {class: lost}
v: "Agentproof: extract, then check\nreachability, isolation, temporal" {class: ver}
ok: "sound with respect to the artifact:\nno violation found" {class: ok}
g -> a: "1. draw / extract"
g -> lost: "dropped"
a -> v: "2. verify"
v -> ok: "3. verdict"

This is also why these do not become bug reports. A bug report needs a violated expectation you can point at. "The reducer merged in an order I did not expect" gets closed with a link to the superstep documentation, correctly. "My recursion limit did not stop the run" gets closed by explaining that width is not depth, correctly. Every individual case has a correct answer that makes the reporter look like they did not read the docs. The pattern only becomes visible when you line seven of them up. Retrieval has the same structural problem, which I have called the evals blind spot: the measurement everyone runs cannot see the failure everyone has.

Which is also, I think, why the migration literature is empty. I looked for a dated post-mortem from a named company that moved off LangGraph and found none. The genre that exists is about LangChain, mostly from 2024, and it is the opposite complaint: too much abstraction, not too little. That is an absence of evidence rather than evidence of absence. My reading of it - that these produce incidents attributed to the model rather than migrations - is a hypothesis I cannot test from public sources.

When not to use LangGraph

The saturated answer is that you should not use a framework for simple flows. That is true and it is not worth your time.

Here is the answer this article's criterion produces. LangGraph is a low-level runtime, and its own documentation is straightforward about that: "It does not abstract prompts or force a fixed agent architecture," and LangChain's product page positions it as the alternative to "a single black-box cognitive architecture." That is an accurate description of what you get and it is the reason to choose it. The machinery is exposed.

Exposed machinery has a cost, and the cost is that the units are yours to establish. Seven parts of this series are the invoice. Every one of those findings took a probe, a measurement, and in several cases a reversal after the first measurement was wrong. That is the work the framework leaves you, and it is the same trade Rivera's guide describes as the harness you build around the framework.

So LangGraph is the wrong tool when you cannot pay that. Concretely:

  • Nobody on the team will read the runtime's source. Several findings in this series are source-only. Part 2's fold order is in apply_writes and documented nowhere. If reading pregel/_loop.py is not something your team will ever do, you are relying on assumptions you have no way to check.
  • You need the vendor to own the units. Your compliance story may require a documented guarantee with a stated scope that somebody else is accountable for. Then a runtime that names its units in its type names beats one that names them nowhere. A managed durable-execution service beats either. LangChain's own managed option is LangSmith Agent Server, and LangChain says durable execution is delivered there; that is a vendor framing, so check what it states the units are.
  • Your failure mode is money or data, and you have no system of record. Every fix in this series that had to survive a crash, a fork or a concurrent writer pushed the record outside the runtime's rollback surface: Part 4's grant ledger, Part 7's attempts counter, this part's per-writer keys. The purely structural fixes - Part 2's commutative reducer, Part 3's wrap_tool_call refusal - stay inside it, and that is fine, because nothing about them needs to outlive a rollback. If you are not going to build that, the checkpointer is not going to save you, which is the accurate half of diagrid's critique.
  • You need to change workflow code while executions are in flight. This one is not about your team at all. Temporal ships patched() and worker versioning for exactly this, and DBOS warns you about it in the passage quoted above. LangGraph has neither. A thread parked on a Friday interrupt is resumed on Monday against whatever node graph is deployed then, and nothing checks that the two agree. For workflows measured in days or weeks that is a hard blocker, and you cannot read your way out of it. Running the graph on Temporal's LangGraph plugin (GA on 30 October 2026) gets you Temporal's durability, but as of November 2026 its docs say nothing about patched() or worker versioning for graph code, and inline workflow nodes must be deterministic or they fail on replay. Check before you rely on it. Durable timers for waits measured in days are a second one, and multi-language workers a third.
  • You do not have a second, deliberately warm test suite. Part 7's argument was that a first-entry harness cannot exercise these. If your testing discipline is "start every test from a clean database," it is structurally blind to the cases this series measured.

Each condition, and what it costs you if it is true of your team:

d2
grid-rows: 5
grid-columns: 2
grid-gap: 14
classes: {
  q: {style: {fill: "#6F00FF"; stroke: "#5500CC"; font-color: "#FFFFFF"}}
  cost: {style: {fill: "#FB923C"; stroke: "#EA580C"; font-color: "#2C2C2A"}}
}
q1: "1. Nobody will read the runtime's source" {class: q}
a1: "source-only units stay unknown\n(Part 2's fold order lives in apply_writes)" {class: cost}
q2: "2. The vendor must own the units" {class: q}
a2: "pick a runtime that names them in its types,\nor a managed service, and check its units" {class: cost}
q3: "3. Money or data, no system of record" {class: q}
a3: "the checkpointer will not save you:\nthe record must sit outside the rollback" {class: cost}
q4: "4. Code changes while executions are in flight" {class: q}
a4: "no patched() or worker versioning;\nthe Temporal plugin docs are silent on it too" {class: cost}
q5: "5. No deliberately warm test suite" {class: q}
a5: "a first-entry harness cannot reach\nthe cases this series measured" {class: cost}

And the inverse, which matters just as much: a runtime that hides the machinery does not remove the units. It removes your ability to audit them. Every finding here exists because LangGraph let me look. That is a point in its favour, and it is why this series exists at all.

There is a harder version of this I have been circling for seven articles, and I should say it plainly. The explicit-control positioning is part of what licenses the silence.

A framework that promises to hide complexity owes you a statement of what it hides. That is the whole contract, and when it breaks, you file a bug. A framework that promises to expose the machinery makes the opposite promise, and "you have full control" quietly implies that you already know what you are controlling. It shifts the burden of knowing onto the reader by design. So when recursion_limit turns out to mean per invocation in one place and depth in another, nothing has been violated. You had the source. You could have read pregel/_loop.py.

I do not think this is cynical, and I do not think it is deliberate. It is what low-level positioning does to a documentation culture. The team building the runtime knows what a superstep is, so the unit is obvious to everyone in the room, and an obvious thing does not get written down. Expertise creates the gap.

Which is why "read the source" is not the answer, even though it is what I did. Seven parts of probes is not a review practice you can put in a sprint. The answer is that a runtime aimed at production should name its units in the API surface, the way Temporal named three timeouts instead of one. That is a design change. It is the specific thing I would ask LangGraph for. Two releases since this article first ran have started on it: 1.2.19 puts a ToolNode's tool names on the drawing, and langchain 1.4.6 put per_call in a parameter name. Neither touches recursion_limit.

The runtime scope audit: three questions to ask

Here is the procedure. It is short on purpose.

For each guarantee your runtime gives you, answer three questions in writing:

  1. What is the unit? Per invocation, per thread, per superstep, per node, per key, per entry into the state. Write the noun.
  2. Which artifact states it? A rendered diagram, a type name, a documentation sentence you can link, a field in the checkpoint. If the answer is "I inferred it from behaviour," that counts as no artifact.
  3. What happens at the boundary? What occurs on the second invocation, the concurrent write, the resume, the fork, the wider fan-out.

Any guarantee where question 2 has no answer is a Scope-Blind Guarantee. That does not mean stop using it. It means the unit is now your assumption to document and your test to write, and it should be in your design review rather than in your incident review.

Filled in for LangGraph 1.2.22 (first measured on 1.2.9), so you can copy the rows rather than re-derive them:

GuaranteeUnitArtifact that states itWhat happens at the boundary
the task-path sort that breaks tieswithin one superstepnoneacross supersteps the order comes from control flow instead, and is still deterministic
draw_mermaid() soundnessnodethe drawing, at node granularity, plus declared ToolNode tool names (1.2.19 and later)lists declared tools but not calls per turn; an undeclared Send target runs and is not drawn at all (re-checked at 1.2.22), which breaks soundness rather than coarsening it
recursion_limitone invocation, and depthnonea resume grants it again; width costs one superstep
RemoveMessagethe current channel valuelive state, which shows the trimdelete_thread is the only primitive reaching storage, and it takes the whole thread
interrupt()one interrupt per resumethe fault-tolerance page says node execution is at-least-once, after interrupts too; nothing states the width effectwidth multiplies tool-body re-execution; 1.2.20 gives each interrupt() in a task its own id, and still records no re-execution count
BaseStore.putone key, last write winsnonea concurrent read-modify-write loses one write
checkpoint historyper threadget_state_historya fork adds checkpoints that are not marked as a fork
eval assertionsthe first entry into a threadthe test report, which cannot say thisa warm thread exercises code the suite never built

Only draw_mermaid(), get_state_history and one documentation sentence about re-execution put anything on an artifact, and all three are partial. That is the honest summary of this series.

For LangGraph specifically, the series ships four audit tools, and they compose. Part 2's print_merge_policy reports which state keys have a merge policy and tests commutativity on sampled values. Part 3's print_agent_surface reports the dispatch alphabet and middleware composition order. Part 6's print_width_surfaces finds the places model output becomes a dispatch. And this part adds the boundary checks the others do not cover:

python
import osfrom langgraph.store.base import BaseStoretry:  # Part 6's checklist says not to import this; there is no public accessor    from langgraph._internal._config import DEFAULT_RECURSION_LIMITexcept ImportError:                       # private path, may move    DEFAULT_RECURSION_LIMIT = Nonedef print_scope_report(compiled, config: dict | None = None) -> None:    """Report the guarantee units this runtime does not put on an artifact.    Composes with print_merge_policy (Part 2), print_agent_surface (Part 3)    and print_width_surfaces (Part 6). `config` is the config you intend to    invoke with, because a compiled graph does not carry one.    """    cfg = config or {}    print("== bounds ==")    limit = cfg.get("recursion_limit", DEFAULT_RECURSION_LIMIT)    if "recursion_limit" in cfg:        source = "your config"    elif os.getenv("LANGGRAPH_DEFAULT_RECURSION_LIMIT"):   # read at import        source = "env LANGGRAPH_DEFAULT_RECURSION_LIMIT"    else:        source = "the library default"    print(f"  recursion_limit = {limit}  (from {source})")    print("    NOT readable from the compiled graph: it is an invocation value.")    print("    unit: ONE INVOCATION, and DEPTH. Not the thread, not total work.")    print("    a resume grants it again; a fan-out of any width costs 1 superstep.")    print("== durable state ==")    cp = getattr(compiled, "checkpointer", None)    print(f"  checkpointer: {type(cp).__name__ if cp else 'NONE'}")    if cp is None:        print("    get_state and get_state_history raise: No checkpointer set.")        print("    an eval harness compiled this way has no object to assert on.")    print("== cross-thread memory ==")    store: BaseStore | None = getattr(compiled, "store", None)    if store is None:        print("  no store: cross-thread memory is not in play")    else:        print(f"  store: {type(store).__name__}")        print("    unit: ONE KEY, LAST WRITE WINS. No compare-and-swap exists.")        print("    read-modify-write from two threads loses one write silently.")        print("    search() defaults to limit=10 - always pass an explicit limit.")    print("== what this tool CANNOT check ==")    for gap in (        "how many times a node body ran (not recorded on the thread)",        "how many tool calls one model turn will emit (no cap exists)",        "whether a side effect sits above an interrupt (read the body)",        "whether your effects are idempotent (only your ledger knows)",    ):        print(f"  - {gap}")

Part 6's own checklist told you not to import langgraph._internal._config, because it is private and may move. The tool does it anyway, behind a try, because there is no public accessor for the default. That is a small instance of this article's subject showing up in the article's own tool.

That config parameter is not an API convenience. My first version of this function read compiled.config, which exists and is None, so the tool crashed with an AttributeError the first time I ran it. recursion_limit is an invocation value, not a property of the compiled graph. The bound's value is not on the artifact either, which is the article's own thesis turning up inside the article's own tool.

Run against a graph compiled with no checkpointer, it prints this (unchanged at 1.2.22; with LANGGRAPH_DEFAULT_RECURSION_LIMIT=50 set, that line reads recursion_limit = 50 (from env LANGGRAPH_DEFAULT_RECURSION_LIMIT)):

text
== bounds ==  recursion_limit = 10007  (from the library default)== durable state ==  checkpointer: NONE    get_state and get_state_history raise: No checkpointer set.    an eval harness compiled this way has no object to assert on.

Six lines, and both facts on them took a probe to learn.

What the four tools cover between them, and the four gaps all of them share:

d2
direction: down
classes: {
  tool: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  gap: {style: {fill: "#F87171"; stroke: "#DC2626"; font-color: "#2C2C2A"}}
  ledger: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
  struct: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  pane: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
}
tools: "What the audit tools read off the graph" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 12
  t2: "print_merge_policy\n(Part 2)\nmerge policy per key" {class: tool}
  t3: "print_agent_surface\n(Part 3)\ndispatch alphabet" {class: tool}
  t6: "print_width_surfaces\n(Part 6)\nwhere output dispatches" {class: tool}
  t8: "print_scope_report\n(Part 8)\nbounds, saver, store" {class: tool}
}
gaps: "What none of them can check" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 12
  g1: "times a node\nbody ran" {class: gap}
  g2: "tool calls one\nturn will emit" {class: gap}
  g3: "effects above\nan interrupt" {class: gap}
  g4: "whether effects\nare idempotent" {class: gap}
}
fix: "How each gap is closed" {
  class: pane
  label.near: top-center
  grid-rows: 1
  grid-gap: 12
  f1: "count and idempotence:\na ledger outside the rollback surface" {class: ledger}
  f2: "width and gate position:\nbound before dispatch, effects below the gate" {class: struct}
}
tools -> gaps: "inherit the framework's silences"
gaps -> fix

The last block is not a joke at the tool's expense. A tool that reads the framework's artifacts inherits the framework's silences, which is the argument of the whole article compressed into a function. The four gaps it prints are the four things you have to establish yourself, and they split two and two. For the execution count and for idempotence, the shipped fix was the same shape: record it outside the rollback surface, in a table you own, with a compare-and-swap you wrote. The other two are structural and cost nothing to store: bound the width before the dispatch, and put every irreversible line below the gate.

What stays true as the ecosystem churns

This article was first measured on 1 August 2026 at langgraph 1.2.9, langchain 1.3.14, langchain-core 1.5.1 and langgraph-checkpoint-sqlite 3.1.0. Every probe in it was re-run on 16 November 2026 and verified on langgraph 1.2.22, langgraph-prebuilt 1.1.2, langgraph-checkpoint 4.3.2, langchain 1.5.0 and langchain-core 1.8.1 on Python 3.13.9 (langchain 1.5 requires Python 3.11 or later). None of these probes touches the SQLite saver.

The August version of this paragraph said that pregel/_loop.py, where Part 7's re-execution rule lives, was byte-identical in 1.2.10. That stopped being true. Through 1.2.22 the resume path changed several times: 1.2.13 stopped reporting answered interrupts in get_state, 1.2.16 applied a resumed Command update once, 1.2.20 gave each interrupt() in a task its own id and added strict resume (_loop.py now reads its config key), and 1.2.19 changed the drawing. Against all of that, the numbers moved less than the code did. The triangular post-gate count, the twelve bodies at width three (in 28 of 30 runs), the one collected interrupt and the store's lost write all held. The tool-body count became unstable at more widths, the drawing gained tool names, and the timings moved with the machine.

Release by release, against what this article measures:

d2
grid-rows: 7
grid-columns: 3
grid-gap: 6
classes: {
  head: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"; bold: true}}
  ver: {style: {fill: "#38BDF8"; stroke: "#0EA5E9"; font-color: "#2C2C2A"}}
  chg: {style: {fill: "#F3F4F6"; stroke: "#D1D5DB"; font-color: "#2C2C2A"}}
  held: {style: {fill: "#4ADE80"; stroke: "#16A34A"; font-color: "#2C2C2A"}}
  moved: {style: {fill: "#FACC15"; stroke: "#CA8A04"; font-color: "#2C2C2A"}}
}
h1: "Release" {class: head}
h2: "Change on a measured path" {class: head}
h3: "Effect on this article" {class: head}
v0: "langgraph 1.2.9" {class: ver}
c0: "first measurement, 1 August 2026" {class: chg}
e0: "12 bodies, 6 effects at width 3" {class: held}
v1: "1.2.13" {class: ver}
c1: "answered interrupts hidden from get_state" {class: chg}
e1: "no measured count moved (checked at 1.2.22)" {class: held}
v2: "1.2.16" {class: ver}
c2: "a resumed Command update applied once" {class: chg}
e2: "no measured count moved (checked at 1.2.22)" {class: held}
v3: "1.2.19" {class: ver}
c3: "drawing lists ToolNode tool names" {class: chg}
e3: "no longer byte-identical: 333 / 341 / 419 chars" {class: moved}
v4: "1.2.20" {class: ver}
c4: "per-interrupt ids, opt-in strict resume" {class: chg}
e4: "at 1.2.22: still 1 interrupt collected,\ntriangle held" {class: held}
v5: "langgraph 1.2.22" {class: ver}
c5: "re-measured, 16 November 2026" {class: chg}
e5: "body count unstable at widths 3 to 6;\npost-gate W(W+1)/2 exact" {class: moved}

The specific numbers in this series have a shelf life, and some of them will be wrong within a year. DEFAULT_RECURSION_LIMIT was 25, then 1000 in the documentation, and is 10007 in the shipped source that Part 6 measured. That is three values for one constant. At 1.2.22 it is still 10007 unless the process environment sets LANGGRAPH_DEFAULT_RECURSION_LIMIT, which is one more unit fact no artifact states: the default now belongs to the process, not to the graph or the config. Re-running probes on every release is the habit Chapter 26 of my book, "The Frontier and Future-Proofing," turns into a playbook: deprecation warnings fail the test run, and the eval suite is pointed at a candidate version before you adopt it.

One debt goes unpaid. Part 6 owed you a traced and costed four-hundred-way fan-out, and moved it here. This part did not get to it. The shape of the answer is bounded by your provider's per-call price and the writes-table row growth Part 6 already published, and I would rather leave the debt named than pay it badly.

The question survives the numbers. It is not a LangGraph question. Ask it of the next runtime, and of the next version of this one:

For each guarantee, what is the unit, and which artifact tells me?

If the answer is a noun you can point at, the vendor did the work. If the answer is "I ran a probe and found out," you are holding a Scope-Blind Guarantee, and it is now yours to write down.

Part 2 of this series described its defect as a state-management failure wearing a reasoning failure's clothes. I still think that is right, and I would now say it more precisely. They are unit failures wearing a reasoning failure's clothes. The state was managed. The bound was enforced. The checkpoint was written. All of it was correct, over a unit nobody wrote down, and the model got the blame.

Going deeper

  • Reading the series' findings as recurring production patterns: Chapter 24, "Patterns from Production"
  • Deciding whether LangGraph fits a project at all: Chapter 25, "Choosing Your Stack (and When Not to Use LangGraph)"
  • Running a LangGraph graph inside a Temporal workflow: Chapter 25, "Choosing Your Stack (and When Not to Use LangGraph)"
  • Re-checking behaviour on every version bump: Chapter 26, "The Frontier and Future-Proofing"
  • Building a new approval-gated vertical end to end: Chapter 27, "Capstone"

References


Agentic AI

Follow for more technical deep dives on AI/ML systems, production engineering, and building real-world applications:


Books by Ranjan Kumar

Federated AI Agents cover

Federated AI Agents

Right-Sized AI cover

Right-Sized AI

Harness Engineering for Production AI Systems cover

Harness Engineering

The 7 GenAI Architectures cover

The 7 GenAI Architectures

Building Real-World Agentic AI Systems with LangGraph cover

Building Real-World Agentic AI Systems

The ChatML Handbook cover

The ChatML Handbook

The Chat Templates Handbook cover

The Chat Templates Handbook

Comments