AI

LangGraph JS 1.16.0 adds subagent streaming and run resumption across tabs

LangGraph's JavaScript SDK now streams subagent panels independently and preserves runs when browser tabs close.

5 min readSource: LangGraph JS Releases

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

LangGraph JS 1.16.0 adds subagent streaming and run resumption across tabs

TL;DR

  • Subagent panels now stream independently only when open, reducing bandwidth and keeping their messages separate from the main conversation
  • Runs persist across tab closures with streamResumable and onDisconnect options, allowing users to pick up where they left off after reloading
  • New client.info() method reads server version and supported features; reconnect options provide fine-grained control over stream recovery behavior
  • Message metadata now tracks parent checkpoint IDs for editing and optimistic status for UI updates
Version
1.16.0
Released
November 12, 2026
Package
@langchain/langgraph-sdk

Scoped subagent streaming reduces overhead

Subagents now stream only to their own panels and remain open only while those panels are visible. The StreamOrchestrator acquires scopes via scopes.acquire(namespace), each returning snapshot data with the subgraph's messages as BaseMessage instances and its latest values. When scopedSubagents is set to true, each subagent streams independently and its messages stay out of the main conversation. On servers supporting stream_namespaces and stream_lifecycle flags, the main run stream carries only the primary conversation and subagent lifecycle events. This architecture prevents subagent messages from cluttering the UI and reduces data transfer on long-running threads.

The server filters shared scope joins to their namespaces when possible. For subagents with no active run, data is read once from thread history. A new resolveSubagentNamespace(toolCallId) helper identifies a subagent's namespace after reload using its tool message or a small page of thread history. This change is off by default because subagents receive status and results but not messages on servers without full support; those messages come from the scope instead.

Runs now persist across browser tabs and reloads

Version 1.16.0 introduces durable runs that continue executing even after a user closes their browser tab. Runs created with streamResumable and onDisconnect set to continue will persist on the server and resume when the thread reloads. The hydrate(threadId?) method, hydrationPromise, and a new activate() function manage the lifecycle. When a tab closes, stop() stops the stream immediately and cancels the run on the server, but a run joined via joinStream() keeps running. Alternatively, stop({ cancel: false }) and dispose() leave the run running without stopping the stream.

Each thread load joins any running run from the loaded checkpoint, so users see their in-progress execution resume transparently. A new onRunEnd({ runId, reason }) callback fires when a run completes, passing reason as success, error, interrupt, or stopped. Setting durableRuns to false reverts to the previous behavior where runs tie to their tab. For clients using v3, submitted runs send config.configurable.__event_streaming_v2: false so threads stream in the shape the engine expects, unless context is sent (which the Agent Server does not accept alongside configurable).

Improved server communication and metadata tracking

The SDK now exports client.info(), which reads the server version and feature flags from GET /info in a single call. This allows clients to discover what the server supports before making requests. Both client.runs.stream() and client.runs.joinStream() accept per-call reconnect options: maxReconnectAttempts (use 0 to throw on disconnect instead of reconnecting), reconnectDelayMs, onReconnect (fired with attempt, cause, lastEventId, and delayMs), and onConnected. The client.threads.joinStream() method now sends modes as a comma-joined stream_modes parameter for compatibility with older servers. The Run type now includes kwargs.

Message metadata is now tracked per message ID in the messageMetadataStore. Each message carries a parentCheckpointId for forking during edits, and an optimisticStatus that shows pending until a values event confirms it sent, or marks it failed or sent based on the run outcome. The engine reads metadata from thread history whenever idle with unplaced messages, such as after load or following each run back to previously read checkpoints. It reads about 1 KB per step and only full message content for messages no step wrote. Messages older than roughly 500 steps do not receive metadata. MessageMetadataMap and OptimisticStatus are now exported for use in custom implementations.

Interrupt handling and queue management

New respond(value, { interruptId? }) and respondAll({ [interruptId]: value }) methods answer interrupts during run execution. Without an interruptId, respond() targets the newest interrupt. Both accept update, goto, config, metadata, and strictResume parameters. By default they request strict resume, so an answer to an interrupt no longer waiting fails the run instead of rerunning the step. During execution, the answer queues instead of interrupting. Once answered, an interrupt hides until the run ends; if the answer fails, it displays again.

Submits now queue at the client with queue: local, keeping them on the client during a run and sending them once the run ends, rather than queueing on the server. A submit with multitaskStrategy set to interrupt or rollback during a run replaces that run's stream immediately. Each interrupt now carries the namespace it was raised in. Thread loads also list queued runs, so a run queued before reload shows in the queue again and streams when its turn arrives. The cancelQueueItem() and clearQueue() methods still cancel queued runs, and the queue advances when a joined run ends.

New UI exports and stream event handling

The @langchain/langgraph-sdk/ui module now exports SubgraphDiscovery with its types SubgraphDiscoverySnapshot, SubgraphMap, and SubgraphByNodeMap. Its push() method accepts any event with a method, params.namespace, and params.data—such as those from StreamOrchestrator.onChannelEvent(). The onChannelEvent(listener) method hands every stream event to the listener in the shape @langchain/react 1.x expects: { method, params: { namespace, timestamp, data } }. CustomStreamOrchestrator also supports this method.

The module exports seedToolCallsFromMessages, which builds AssembledToolCall instances from messages, along with AssembledToolCall and ToolCallStatus types. AssembledToolCallFromTool and InferAssembledToolCalls are also exported; @langchain/langgraph-sdk/stream exports InferAssembledToolCalls as InferToolCalls, while the existing InferToolCalls export from ./ui infers message tool calls and remains unchanged. When the server restarts a run—such as during a worker failure or deploy—the main conversation discards half-streamed cut attempt data and keeps finished steps, instead of showing both.

Performance and compatibility improvements

After a reload, useStream now requests only checkpoints and tasks from /history to match subagents to cards. The Python Agent Server 0.17.0 and later omits the thread's values in this case, cutting response size from 55 MB to 298 KB on a 20-turn thread. Subagent cards no longer show another subagent's messages or none when another tool call in the same AIMessage was answered before subagents started, such as one a human rejected. JavaScript graphs require @langchain/langgraph 1.7.2 or later for that case; on older versions, unfinished subagents from that step display no messages after reload.

Thread switching no longer shows the previous thread's messages, error, or selected branch while the new thread loads; values falls back to initialValues and isThreadLoading remains true until the read arrives. A thread ID that does not yet exist loads as an empty thread with no error, and the first submit creates it via POST /threads with that ID before running, allowing the app's auth handler to run. A submit made while the thread loads waits for completion. Links to deleted threads show them empty, and their first submit recreates them.

Source

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

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
  • #agents
  • #llms

More in AI