AI

LangGraph JS 1.12.9 fixes streaming issues and tool call performance

LangGraph's JavaScript SDK 1.12.9 resolves streaming reconnection bugs, thread state handling, and quadratic argument re-parsing overhead in tool calls.

3 min readSource: LangGraph JS Releases

Curated by Kandala Guruprasad. Drafted with AI and checked against the source.

LangGraph JS 1.12.9 fixes streaming issues and tool call performance

TL;DR

  • SSE multiline JSON framing and reconnection handling now match Python SDK behavior, with proper null payloads and event inheritance
  • useStream hook and StreamOrchestrator no longer re-parse tool call arguments on every chunk, re-parsing at most every 50ms for linear instead of quadratic performance
  • Thread state management fixed for page reloads, run abandonment, joined streams, and history-enabled scenarios to prevent duplicate messages and lost edits
  • @langchain/core peer dependency raised to ^1.2.18 to support lazy chunk parsing
Version
1.12.9
Released
30 October 2026
Type
Patch release with performance

What happened

LangChain released version 1.12.9 of @langchain/langgraph-sdk on 30 October. This patch release addresses multiple streaming protocol bugs, thread state consistency issues, and a performance regression in the useStream hook where tool call arguments were being re-parsed excessively during streaming.

Streaming and reconnection fixes

The release aligns LangGraph JavaScript's Server-Sent Events (SSE) handling with the Python SDK's behavior. Empty event payloads now correctly yield null instead of being skipped. During reconnection, events properly inherit the reconnect cursor position, and ID-only or retry-only blocks update internal state without being yielded to callers. Cleared event IDs are now exposed as undefined rather than remaining in an ambiguous state. Pending unnamed data that arrives before end-of-file is flushed correctly, matching Python's tolerant EOF behavior. Additionally, frames containing only id or retry fields no longer count as events, and reconnecting streams now receive a fresh set of reconnect attempts when events arrive, preventing streams from giving up prematurely after multiple connection drops.

Thread state and run resumption

Several fixes address how thread state is managed during reloads, reconnections, and run transitions. When a run is abandoned via clear() or stop(), the onSuccess callback no longer fires, eliminating issues where thread switches during reconnection backoff could load the previous thread's history. Headless tool calls awaiting results when a thread opens (such as after a page reload) now run once and properly resume the run in the useStream hook and StreamOrchestrator, whereas previously the thread would stay paused. Stopped runs now correctly read the thread and show what the server preserved, with onStop edits applied on top, rather than reverting to the thread state from when it opened. Without history enabled, the hook no longer makes redundant requests after successful runs when the prior state showed no interrupts or errors.

Streaming and message deduplication

Multiple fixes prevent duplicate or misaligned messages during streaming. Joining a run from its first event in a mount that already streamed it no longer doubles each message's text, including subagent messages. Joins that resume from a specific lastEventId continue the message where it left off. After reloads, subagents delegated by older turns no longer appear with tool results from newer turns, and subagents still running or waiting for approval no longer show the state of regular tools called before them. With streamSubgraphs enabled, values from non-subagent subgraphs no longer replace the root state while the subgraph runs; results appear only after the node returns. History-enabled scenarios with joinStream now show the thread state read after the joined run ends, matching the behavior of submit.

Tool call argument parsing performance

The useStream hook from @langchain/langgraph-sdk/react previously re-parsed streaming tool call arguments on every messages chunk, causing work to grow quadratically with argument length. The fix reuses the previous parse and re-parses at most every 50ms, plus once more when the stream ends. Subagent messages receive the same treatment. To enable this speedup, the @langchain/core peer dependency has been raised from ^1.1.48 to ^1.2.18, the first release to parse tool call chunks lazily. Older versions will still parse on every chunk regardless, yielding the delay without the performance benefit. A numeric throttle now correctly notifies at most once per interval while values keep changing, as documented, instead of waiting until they stop.

Who it affects

Developers using @langchain/langgraph-sdk or its React, Vue, and Svelte companions (@langchain/react@1.2.9, @langchain/vue@1.2.9, @langchain/svelte@1.2.9) should upgrade to benefit from these fixes. The release is especially relevant for applications relying on streaming over unstable connections, handling tool calls with large arguments, or managing complex thread state across page reloads and reconnections.

Source

LangGraph JS Releaseshttps://github.com/langchain-ai/langgraphjs/releases/tag/%40langchain%2Flanggraph-sdk%401.12.9

AI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.

  • #langgraph
  • #javascript
  • #streaming
  • #performance
  • #bugfixes

More in AI