@langchain/langgraph-sdk
1.17.0 · 17 Nov 2026MIT5.6M / weekRepositoryHomepagenpmAtom feed
1.17.0 is the newest release of 1.x.
In short
1 new6 fixed
Release note
Minor Changes
Expose connection lifecycle callbacks for built-in streaming transports.
onConnectedruns after the initial SSE or WebSocket connection becomes usable and after every successful reconnect. Its payload distinguishes aninitialconnection from areconnectedconnection and includes the reconnect attempt number.onReconnectnow also receives the scheduleddelayMs, allowing applications to display accurate retry state before the next connection attempt. React, Vue, Svelte, and Angular stream hooks forward both callbacks.
Patch Changes
Recover cleanly when a thread's root event stream terminates unexpectedly.
If the stream fails or closes while a run is active, the controller now records the transport error and clears
isLoadingrather than leaving the UI in a permanently running state. Once the failed pump settles, a later submission can start a fresh root subscription without recreating the thread stream or replaying the failed command.sdk: Appropriately track persisted seq for stream replay
Sequences weren't being appropriately attributed when rehydrating the page (e.g. on refresh). This meant we'd lose stream information on
useStreamon reloads. This has been fixed by adding a lookup step to determine what the most appropriate sequence index is to track in the event stream.:xSend
checkpoint_idin theruns.stream()request body, so acheckpointIdpassed toclient.runs.stream()forks from the requested checkpoint instead of being silently dropped. Matchesruns.create()andruns.wait(), which already send it.sdk: Show interrupts raised after a passive thread rejoin
After a page refresh mid-run,
useStreamfiltered every interrupt it did not
already know from the hydrated thread state as replayed history, and waited
for acheckpointsevent to lift that filter. Current runtimes never emit
that event and the replay buffer trims it on long runs, so interrupts raised
after the refresh never appeared until the next reload. Unknown interrupts are
now settled against the server's thread state when the run reaches a terminal
lifecycle: the ones the server lists as pending are shown, the rest are
dropped as history.sdk: Recover from a server-side thread stream drop instead of freezing
The protocol SSE transport now reconnects when the server closes the event
stream cleanly. The thread stream is open-ended, so a clean close only happens
when the server's own upstream consumer died or it is restarting; before, the
client treated it as the end of the thread and the UI froze mid-run with no
error. A connection that delivered events also resets the reconnect budget, so
long-lived pages survive repeated deploys.maxReconnectAttempts: 0keeps the
old end-on-close behavior.Unsolicited server error frames (no command id) and a shared stream that gives
up reconnecting now reachstream.error:ThreadStream.onErrorexposes them,useStreamsetserror, clearsisLoading, and settles the in-flightsubmit()as failed.sdk: Coalesce locally resolved interrupts
when resolving interrupts using
useStream, there was a case where we prioritized the remote state values (which we lookup in React Strict mode on every page transition) over the local interrupt responses we know we've responded with.This has since been fixed to first prioritize the local cache of interrupts, resolved against the remote state values when a run hits a terminal event
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.