Menu

1 / 3

Uneven Branches Make a LangGraph.js Join Node Run Twice. Super-Steps Explain Why

DEV Community: typescript·Gabriel Anhaia·9 days ago
#8briPku2
#devtotypescript#devto#dev#combine#node
Reading 0:00
15s threshold

Book: AI That Plans

The series: AI in TypeScript — 5 books, from your first LLM call to agents in production — all five here

My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools

Me: xgabriel.com | GitHub

Your research agent fans out. One branch pulls internal docs in a single node. The other searches the web, then reranks the hits, so it takes two nodes. Both branches point at combine , the node that calls the model and writes the answer. You open the trace and combine is there twice. The first call answered without the reranked results. The second call answered again, and you paid for both.

Nothing is broken. The LangGraph.js control-flow docs state the rule in one line: "Separate edges run d once per superstep in which any incoming branch completes." With branches of different lengths, the docs add, d runs more than once.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.