@langchain/langgraph-sdk
1.17.0 · 17 Nov 2026MIT5.6M / weekRepositoryHomepagenpmAtom feed
215 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 2.x
2.0.0
18 Feb 2026- 1.x · latest line
1.17.0
17 Nov 2026CustomStreamOrchestrator(@langchain/langgraph-sdk/ui), the engine for custom transports:ToolCallStatushas a fourth value,"incomplete": the call has no result, and no run can still give one, because the run stopped, failed, or waits on an interrupt, or a later message closed the call's turn.seedToolCallsFromMessagesgives it to such calls. Pass{ isLoading: false }when no run streams. It defaults totrue, which leaves the calls of the latest turn"running"as before. Calls assembled fromtoolsevents don't get it. On 1.x bindings, a subagent panel loaded from history now shows an earlier turn's unanswered call as"incomplete". Code that switches over everyToolCallStatusneeds a case for the new value.useStreamacceptsstateKeys, thevalueskeys your UI reads. Opening a thread then sendsselectonGET /threads/{thread_id}/statefor those keys, the messages key, and the top-level fields the hook reads itself, so the server can skip the rest of the state.stream.valuescontains only those keys plus the messages key, after loading and while a run streams, including on a server that ignoresselect. A custom adapter'sgetStatereceives{ select }, andHttpAgentServerAdapterforwards it. WithoutstateKeys, nothing changes.
Minor Changes
CustomStreamOrchestrator(@langchain/langgraph-sdk/ui), the engine for custom transports:A submit stays on the thread the first one created, also one made while that run streams. Every submit after the first started a new thread.
A submit keeps the values shown and shows its input at once, instead of showing
initialValuesuntil the server answered. The messages shown at once go to the transport as dicts with ids, so the server's copy replaces them, and a backend should keep those ids.optimistic: falseshows nothing early and sends the input as passed.initialValuesshow until a run streams, and only on the first thread.A submit made during a run is listed in
queueEntriesuntil its turn.cancelQueueItem(),clearQueue(), a thread switch andstop()drop it before it starts.respond()andrespondAll()send answers through the transport as a resume command, and hide the answered interrupts until that run ends. Without an id,respond()answers the interruptinterruptshows, the first one.respondAll()resolves once its run starts.hydrate(threadId)switches to that thread and reads nothing, since a custom transport has no thread routes.StreamEngineis the interface a framework binding uses, and bothStreamOrchestratorandCustomStreamOrchestratorimplement it.
ToolCallStatushas a fourth value,"incomplete": the call has no result, and no run can still give one, because the run stopped, failed, or waits on an interrupt, or a later message closed the call's turn.seedToolCallsFromMessagesgives it to such calls. Pass{ isLoading: false }when no run streams. It defaults totrue, which leaves the calls of the latest turn"running"as before. Calls assembled fromtoolsevents don't get it. On 1.x bindings, a subagent panel loaded from history now shows an earlier turn's unanswered call as"incomplete". Code that switches over everyToolCallStatusneeds a case for the new value.useStreamacceptsstateKeys, thevalueskeys your UI reads. Opening a thread then sendsselectonGET /threads/{thread_id}/statefor those keys, the messages key, and the top-level fields the hook reads itself, so the server can skip the rest of the state.stream.valuescontains only those keys plus the messages key, after loading and while a run streams, including on a server that ignoresselect. A custom adapter'sgetStatereceives{ select }, andHttpAgentServerAdapterforwards it. WithoutstateKeys, nothing changes.
Patch Changes
When a
CustomStreamOrchestratorrun fails before sendingvalues, the keys other than messages that its submit showed go back to what they were, or away if they were new. Its message stays. A run that sentvaluesshows the transport's, and one that succeeds, pauses or is stopped without them keeps the keys as shown, since a transport needn't sendvalues.StreamOrchestratorno longer takes the frames of a run@langchain/react1.x started for its state. A page that moved to@langchain/react2.0 while such a run went on joined it, by opening its thread, by joining a run 1.x queued, or when its thread watcher saw the run start. On the Agent Server its messages then went away until the run ended. On the JS dev server it stopped loading before the run ended and missed the run's last message until a reload.Now such a run's join reads only its
metadata,errorandendevents. The page keeps what it showed and stays loading until the run ends, then shows the thread's state. A subagent panel open meanwhile reads its history instead of joining the run. These runs are told apart by the run the engine lists or reads before it joins, with no other request.After loading a thread whose last task failed,
StreamOrchestratorand theuseStreamhook from@langchain/langgraph-sdk/reactshow a task error the server returns as an object,{ message, name }, as anErrorwith that message. They showed the plain object, which reads as "[object Object]" as text and isn't anError. A task error returned as a string shows as before.When a
StreamOrchestratorrun ends without sendingvalues, such as one whose assistant doesn't exist, the keys other than messages that its submit showed at once go back to what they were, or away if they were new. Its message stays, markedfailed. A stopped run leaves them to the stop's read of the thread, and a run that sentvaluesshows the server's, as before.StreamOrchestrator.resolveSubagentNamespace()now finds the namespace of a subagent its run hasn't started yet. The engine lists a subagent as soon as the main agent'staskcall streams, before the run starts it and gives it a namespace. A lookup made then found nothing in the thread's history and resolvedundefined, so a@langchain/react2.0 panel opened on that subagent stayed empty, also after the subagent ran, unless the app passed the panel a newer copy of the subagent. Now a lookup that finds nothing while the run streams waits until the run starts the subagent, or until either ends, and looks again. A lookup whose run ends without starting the subagent still resolvesundefined.StreamOrchestratorcreates the runs of submits made during a run one after another, in submit order. It sent each create at once, so the server could queue, and run, them in the order the requests arrived. A create that fails doesn't hold back the next one, andclearQueue()or a thread switch drops the submits still waiting for theirs and cancels the run of one whose create was on its way. A queued run whose create returns after the run before it ended now streams too, instead of waiting for the next run to end.StreamOrchestratorcallsonCreatedfor each run a submit queued on the server, as the run starts streaming and after the run before it calledonRunEnd. A submit made during a run never calledonCreatedbefore. A queued submit cancelled before its run started never does, and runs other clients queued don't, as before.A
stop()right after asubmit(), in the same tick, now stops it inStreamOrchestratorand theuseStreamhook from@langchain/langgraph-sdk/react. The stop came before the submit's stream began and was lost, so the run was created and streamed to the end. Now the stream begins stopped, so neither shows the input or sends anything. AswitchThread()right after a submit drops it the same way, whereStreamOrchestratorsent it to the new thread.StreamOrchestratorcallsonRunEndwithreason: "stopped"and norunIdfor a submit stopped before its run's id came, sorunIdis optional inonRunEnd's type.After
stop(),StreamOrchestratorkeeps the inputs it showed that the server didn't save, after the saved messages, until the next run, a reload or a thread switch. A run stopped before the server saved its input lost that input from the page. A reply the stop cut off still goes.A
StreamOrchestratorpanel on a subgraph shows all of the subgraph's messages again, also those it shares with the main conversation. It left out every message the main conversation showed, so the panel of a subgraph that sharesmessageswith its parent was empty once the subgraph ran. A panel on a subagent, a namespace under atools:segment, still leaves them out, since deep agents' fork-mode subagents start from a copy of the main conversation's messages.StreamOrchestratornow shows a run that ran on its thread while the page was hidden, also when its thread watcher had no event to resume from. The watcher closes while the page is hidden and resumes from its last event when the page shows again. It takes event ids only from the thread's stream, and the page's own runs stream on their run's stream, so a watcher that has seen no run started elsewhere has none. Its stream then started live, and a run another tab, a cron or a trigger ran meanwhile showed only after a reload. Now such a watcher reads the thread's state once as the page shows again, as after agap. A watcher with an event id resumes from it as before.CustomStreamOrchestratorreports each run's lifecycle itself, asStreamOrchestratordoes, so framework bindings don't have to work it out from its state:onCreatedgets the run id from the firstmetadataevent of each run's stream. The option was accepted before and never called.The new
onRunEndoption gets{ runId, reason }when each run's stream ends, before itssubmit()resolves. The reason is"interrupt"when the stream sent an interrupt,"error"when it failed, also by timing out,"stopped"when it was aborted, as bystop()or a thread switch, and"success"otherwise. A run the engine'sdispose()stops isn't reported.An
onCreatedoronRunEndthat throws is logged, and affects neither the run nor the ones after it.Switching to another thread calls
onThreadId, throughswitchThread(),syncThreadId()orhydrate(). Before, only a submit that created a thread called it.A run that fails or is stopped ends the subagents it left open with an error, as on an Agent Server, instead of leaving them running.
A
StreamOrchestratorthat loads threads now needsactivate(), which bindings call from an effect. A thread load before the firstactivate()reads the thread and holds what it finds until then: the running run's join, the head's headless tool calls and the server's queued runs. Bindings create the engine during a render, and an engine from a render that never commits, such as StrictMode's double render or a suspended tree that unmounts, used to join runs, run tools a second time and send their answers again. A running run a load holds counts asisLoading, so the queue waits for it too. A stream the engine starts beforeactivate(), such as a submit from an effect that runs before the binding's, drops what the load held.respond()with no id now answers the first interrupt shown, asCustomStreamOrchestratordoes.StreamController, which the Vue, Svelte and Angular bindings use, still answers the newest. The engine also reads the server's/infoat its firstactivate()instead of when it's built, and warns about a server without subagent lifecycle events only once a subagent's messages are read.StreamOrchestratorshows the interrupts of a thread it loads only after the load has looked for a run still going on that thread, so they show a request or two later than before. When the load found a run in progress, that run's{ when: "breakpoint" }placeholder, or an interrupt it had already answered, showed until the join started. Headless tools waiting in the loaded state run after that lookup too, so a reload during a resumed tool run no longer runs the tool again. The lookup gives up after 10 seconds, and the reload after the thread watcher misses events waits the same way.respond()with no id waits for the lookup, and rejects if the thread closes or changes meanwhile. An interrupt already on screen stays shown whilehydrate()reads the thread again, and a run started during a load shows its interrupts without waiting for the lookup.With
reconnectOnMount, astop()fromuseStreambefore the server has answered the run's request now cancels that run once its id arrives. The hook creates these runs withon_disconnect: "continue", and only the response names the run, so the stop used to close the request and leave the run going on the server. The request now stays open for up to 5 seconds to learn the id, while the UI still stops at once.A subagent rebuilt from a loaded thread's messages takes its namespace from its
tasktool message when the message records it (artifact.checkpoint_ns, which Python deepagents write), with no request. Before, itsnamespacestayed empty until something looked it up in the thread's history.A subagent the main agent called has
depth: 1also before it runs and after a reload, where it had0. Once its events streamed, it already had1.
1.16.0
12 Nov 2026New in
StreamOrchestrator(@langchain/langgraph-sdk/ui): subagent panels that stream only while they are open.StreamOrchestrator(@langchain/langgraph-sdk/ui) reads subagent and tool events:In
StreamOrchestratorand theuseStreamhook from@langchain/langgraph-sdk/react, when the server restarts a run (a worker stops, or a deploy outlasts the run), the main conversation drops what the cut attempt half-streamed and keeps what its finished steps wrote, instead of showing both. A subagent card that only the cut attempt's message started goes too.Add
client.info(), which reads the server's version and the features it supports (flags) fromGET /info.client.runs.stream()andclient.runs.joinStream()take per-call reconnect options:maxReconnectAttempts(with0, a dropped stream throws instead of reconnecting),reconnectDelayMs,onReconnect(called withattempt,cause,lastEventIdanddelayMs) andonConnected.client.threads.joinStream()also sends its modes as one comma-joinedstream_modes, the only form older servers read. TheRuntype haskwargs.
Minor Changes
New in
StreamOrchestrator(@langchain/langgraph-sdk/ui): subagent panels that stream only while they are open.scopes.acquire(namespace)holds the scope of a subgraph, such as a subagent's panel, and returns{ getSnapshot, subscribe, release }. A snapshot has the subgraph's messages, asBaseMessageinstances, and its latest values. All held scopes of a run share one join of it from its start, which the server filters to their namespaces when it can. A subagent no run is streaming is read once from the thread's history.scopedSubagents: truestreams each subagent only to its scopes and keeps its messages out of the main conversation, asfilterSubagentMessagesdoes. Runs then stream subgraphs, queued ones too, and on a server with thestream_namespacesandstream_lifecycleflags in/info, a run's own stream carries only the main conversation and the subagents' lifecycle events. A joined run does the same when it was created that way. It's off by default, sincesubagentsthen has a subagent's status and result but not its messages on such a server: they come from its scope.resolveSubagentNamespace(toolCallId)finds a subagent's namespace after a reload, from its tool message or one small page of the thread's history.Panel joins wait while four of the page's engine streams are open, so
stop()andrespond()keep a free connection on servers that speak only HTTP/1.1, such aslanggraph dev.
StreamOrchestrator(@langchain/langgraph-sdk/ui) reads subagent and tool events:With
filterSubagentMessages, runs ask the server forlifecycleevents, and withonToolEvent, fortoolsevents, when the server sends them on run streams. It reads/infoonce per client to know.onToolEventfires now: runs never asked fortoolsbefore. A server that refuses them with a 422, such as an older one during a rollout, gets the run again without them.Each subagent is tied to the tool call that started it, from its
lifecycleevents or from the tool call id deepagents puts on a subagent's tokens, so subagents with the same task text no longer swap. A subagent whose graph fails shows the error at once. Subagents still open when the server says their run failed or was cancelled, or whenstop()cancels it, end with an error. A run paused at an interrupt, a dropped connection orstop({ cancel: false })leaves them open.onChannelEvent(listener)hands every event of its streams to the listener in@langchain/react1.x's channel shape,{ method, params: { namespace, timestamp, data } }.CustomStreamOrchestratorhas it too.
In
StreamOrchestratorand theuseStreamhook from@langchain/langgraph-sdk/react, when the server restarts a run (a worker stops, or a deploy outlasts the run), the main conversation drops what the cut attempt half-streamed and keeps what its finished steps wrote, instead of showing both. A subagent card that only the cut attempt's message started goes too.Add
client.info(), which reads the server's version and the features it supports (flags) fromGET /info.client.runs.stream()andclient.runs.joinStream()take per-call reconnect options:maxReconnectAttempts(with0, a dropped stream throws instead of reconnecting),reconnectDelayMs,onReconnect(called withattempt,cause,lastEventIdanddelayMs) andonConnected.client.threads.joinStream()also sends its modes as one comma-joinedstream_modes, the only form older servers read. TheRuntype haskwargs.StreamOrchestrator(@langchain/langgraph-sdk/ui) now keeps a run going when its tab closes, and picks it up again:Runs are created with
streamResumableandonDisconnect: "continue", and each thread load joins the thread's running run from the loaded checkpoint.stop()stops the stream at once and cancels the run on the server, also a run it picked up after a load. A run whose id hasn't arrived yet is cancelled once it does. A run the app joins withjoinStream()keeps going, andstop({ cancel: false })anddispose()leave any run going.durableRuns: falsekeeps a run tied to its tab, as before this release.
New options:
onRunEnd({ runId, reason }), with"success","error","interrupt"or"stopped", andmaxReconnectAttempts,reconnectDelayMs,onReconnect,onConnectedandstreamIdleReconnect, passed to every run stream and join. New methods:hydrate(threadId?),hydrationPromiseand a StrictMode-safeactivate().A join of the run being submitted waits for its id, so the run doesn't stream twice, and a server-queued submit waits for that run to exist, so it can't overtake it. Runs it creates send
config.configurable.__event_streaming_v2: false, so a thread a v3 client used streams the shape this engine reads, unless they sendcontext, which the Agent Server doesn't take together withconfigurable.StreamOrchestrator(@langchain/langgraph-sdk/ui) now keeps metadata per message id inmessageMetadataStore:parentCheckpointIdis the checkpoint to fork from to edit the message. BetweentrackMessageMetadata()and its release, the engine reads it from the thread's history whenever it is idle with messages it hasn't placed yet: after a load, and after each run back to the checkpoints it already read. It reads what each step wrote, about 1 KB a step, and the whole messages only for messages no step wrote, such as ones added withupdateState. Messages more than about 500 steps back get none.optimisticStatusispendingfor an optimistic message until avaluesevent of its run holds it, thensent. A run that fails or is stopped before that marks itfailed, and one that succeeds or pauses marks itsent. A reload clears it.
Every message a submit sends now carries an id, also with
optimistic: falseand for a run queued on the server.MessageMetadataMapandOptimisticStatusare exported.New in
StreamOrchestrator(@langchain/langgraph-sdk/ui):respond(value, { interruptId? })answers an interrupt, the newest one when no id is given, andrespondAll({ [interruptId]: value })answers several in one run. Both takeupdate,goto,config,metadataandstrictResume. They ask for strict resume unlessstrictResumeisfalse, so an answer to an interrupt that is no longer waiting fails its run instead of running the step again. During a run, the answer waits in the queue instead of interrupting it. An answered interrupt is hidden until its run ends, and shows again if the answer fails. The promise resolves once the run is created or queued.A submit's input shows at once. Input messages without an id get one, so the run's copies replace them. Passing
optimisticValuesshows those instead, andoptimistic: falseturns this off.queue: "local"keeps a submit made during a run on the client and sends it once the run ends, instead of queueing it on the server.Interrupts carry the
namespacethey were raised in.
A submit with
multitaskStrategy: "interrupt"or"rollback"during a run now replaces that run's stream at once, asuseStreamdoes, instead of waiting for it to end. A submit queued behind a run now sends itsstrictResumetoo.StreamOrchestrator(@langchain/langgraph-sdk/ui) now follows its thread betweenactivate()and dispose:A run started elsewhere, such as in another tab or by a cron, is joined and streams here. A run that ended elsewhere reads the thread again, and an interrupt answered elsewhere is hidden at once.
It keeps one connection to the thread's
lifecyclestream, closed while a run streams here, while the queue holds runs and while the page is hidden, and it resumes from the last event it saw. On a server without a thread stream it stays off after one request.watchThread: falseturns it off.
Each thread load also lists the thread's queued runs, so a run queued before a reload shows in the queue again and streams when its turn comes. Since another client may have queued them, a thread switch leaves them on the server, while
cancelQueueItem()andclearQueue()still cancel them. The queue now also moves on when a joined run ends.@langchain/langgraph-sdk/uinow exports:SubgraphDiscovery, with itsSubgraphDiscoverySnapshot,SubgraphMapandSubgraphByNodeMaptypes. Itspush()takes any event with amethod,params.namespaceandparams.data, such as the onesStreamOrchestrator.onChannelEventgives.seedToolCallsFromMessages, which buildsAssembledToolCalls from messages, and theAssembledToolCallandToolCallStatustypes.AssembledToolCallFromTool, andInferAssembledToolCalls, which@langchain/langgraph-sdk/streamexports asInferToolCalls. TheInferToolCallsthat./uialready exports infers message tool calls and is unchanged.
@langchain/langgraph-sdk/streamexports the same names and types as before.
Patch Changes
After a reload,
useStreamnow requests only checkpoints and tasks from/historyto match subagents to their cards. The Python Agent Server 0.17.0 and later then leaves out the thread's values, so on a 20-turn thread the response drops from 55 MB to 298 KB. Subagent cards also no longer show another subagent's messages, or none, when another tool call in the same AIMessage was answered before the subagents started, for example one a human rejected. JS graphs need@langchain/langgraph1.7.2 or later for that case. On older versions, unfinished subagents from that step show no messages after a reload.StreamOrchestrator(@langchain/langgraph-sdk/ui) handles four cases the way@langchain/react1.x apps expect:A thread switch no longer shows the last thread's messages, error or selected branch while the new thread loads.
valuesfalls back toinitialValues, andisThreadLoadingistrueuntil the read lands.A thread id that doesn't exist yet, such as one minted in the browser for a new chat, loads as an empty thread with no error, and the first submit on it creates it with
POST /threadsand that id before its run, so the app'sthreads.createauth handler runs. A submit made while the thread loads waits for the load. A link to a deleted thread shows it empty, and its first submit creates it again. A thread that exists by the time of that create, such as one another tab created, is used as it is when the user's auth can read it, and refused otherwise.A tool call whose tool message has
status: "error"reads as failed, with the message's text aserror, instead of finished. This applies to@langchain/react1.x too: after a reload, and when a tool returns an error message of its own, which thetoolschannel reports as finished.resolveSubagentNamespace(toolCallId)shares one lookup between callers that ask for the same subagent at the same time, so the hooks of one subagent panel read the thread's history once after a reload.
StreamOrchestrator.joinStream(runId)now does nothing whenrunIdis the run it is already streaming (fromsubmit()or an earlier join, including the onereconnectOnMountstarts) or has queued, and returns that stream's promise. Previously the second join waited for the current stream to end and then replayed the whole run, with a second loading phase and another history read. A run whose streamstop()or a thread switch cut off can still be joined again right away.In
StreamOrchestrator(@langchain/langgraph-sdk/ui), a new thread's first message shows as soon as it is submitted, as in@langchain/react1.x. It showed only oncePOST /threadshad created the thread. A new thread's create that fails no longer leaves an unhandled promise rejection, and a submit made meanwhile creates a thread itself instead of rejecting.StreamOrchestrator.submit()withmultitaskStrategy: "reject"while another run is streaming now sends"reject"to the server instead of queuing the run, so the server's rejection reachesonError. Submits with no strategy are still queued.Runs that
StreamOrchestrator.submit()queues while another run is streaming now request the same stream modes as a direct submit. Previously the queued run was created withoutstreamMode, so the server only producedvaluesevents for it: once the queue drained, replies arrived in one piece instead of token by token, andupdates,custom, tool and message-tuple consumers received nothing.Resumable run streams and joins reconnect when the server sends no readable
Locationheader, as with the JS dev server or a CORS config that doesn't expose it. For a resumable run,client.runs.stream()rebuilds the reconnect path from the run'sContent-Location, threadless runs included, or from its thread and run id, andclient.runs.joinStream()reconnects to its own URL. WhenContent-Locationis hidden too,onRunCreatedfires with the run id from the run'smetadataevent. Aborting a stream during the wait before a reconnect now ends it at once, not after the wait.client.runs.stream()andclient.runs.joinStream()called withstreamNamespacesnow drop the events outside those namespaces themselves, by the same rule as the Agent Server. A server that doesn't support the filter (an older version, or the JS dev server) sent every event before, and now gives the same events as one that does.onToolEventno longer gets tool events of kinds other thanon_tool_start,on_tool_event,on_tool_endandon_tool_error, which older queue workers forward for Python graphs.sdk:
useStreamfrom@langchain/langgraph-sdk/reactnow calls theonErrorpassed tosubmit()when that run fails, after the hook's ownonError. It was typed and documented but never called, on both the LangGraph server and the customtransportpaths.
1.15.0
7 Nov 2026- Deprecated
client.runs.joinStreamtakes acheckpointIdoption, sent as thecheckpoint_idquery parameter: servers that support it send only the run's events after that checkpoint, or the whole run when it is not one of the run's, and other servers ignore it. WithreconnectOnMount, theuseStreamhook now rejoins a running run once the thread state has loaded, from the loaded head's checkpoint, so a reload no longer replays the run from its start over the state it just loaded. A streamed message now updates the message with its id wherever it is in the list, so one the loaded state already holds, or one avaluesevent moved, is not appended again or written over another.MessageTupleManager.get'sdefaultIndexargument and theindexfield of its entries are deprecated:StreamManagerno longer reads them, and they will be removed in 2.0. After
submit(input, { forkFrom }),messagesshows only the new branch. A fork's checkpoints restart at a lower step, so they were treated as an old replay and merged add-only, which kept every message from the abandoned branch until a reload. Also,useMessageMetadata(...).parentCheckpointIdnow keeps the parent of the first checkpoint that carried each message, instead of moving every message to the latest checkpoint's parent, so forking from it edits the right message.sdk: A
hydrate()of the thread already shown no longer leavesisLoadingstuck ontrueafter the run ends: when it reopens the thread's stream after the connection dropped, when the run ends while it reads the state, or when it finds a run on a thread that was idle. When it finds a run going, the messages it loaded stay on screen while the stream replays the run. The stream also picks up interrupts raised inside subagents again after it reconnects.
Minor Changes
- Deprecated
client.runs.joinStreamtakes acheckpointIdoption, sent as thecheckpoint_idquery parameter: servers that support it send only the run's events after that checkpoint, or the whole run when it is not one of the run's, and other servers ignore it. WithreconnectOnMount, theuseStreamhook now rejoins a running run once the thread state has loaded, from the loaded head's checkpoint, so a reload no longer replays the run from its start over the state it just loaded. A streamed message now updates the message with its id wherever it is in the list, so one the loaded state already holds, or one avaluesevent moved, is not appended again or written over another.MessageTupleManager.get'sdefaultIndexargument and theindexfield of its entries are deprecated:StreamManagerno longer reads them, and they will be removed in 2.0.
Patch Changes
After
submit(input, { forkFrom }),messagesshows only the new branch. A fork's checkpoints restart at a lower step, so they were treated as an old replay and merged add-only, which kept every message from the abandoned branch until a reload. Also,useMessageMetadata(...).parentCheckpointIdnow keeps the parent of the first checkpoint that carried each message, instead of moving every message to the latest checkpoint's parent, so forking from it edits the right message.sdk: A
hydrate()of the thread already shown no longer leavesisLoadingstuck ontrueafter the run ends: when it reopens the thread's stream after the connection dropped, when the run ends while it reads the state, or when it finds a run on a thread that was idle. When it finds a run going, the messages it loaded stay on screen while the stream replays the run. The stream also picks up interrupts raised inside subagents again after it reconnects.sdk:
stop()cancels the runrespond()orrespondAll()started, also when it is called before that run starts, and shows again the interrupts the cancel left waiting.sdk:
submit()without amultitaskStrategy, while the thread shows a run in flight, now sendsinterrupt, so the server cancels the run the client stopped following instead of queueing the new one behind it. Otherwise it still sends only a strategy the caller passed.
1.14.0
6 Nov 2026sdk: Hide the interrupts another client answered when the server sends
input.answered, and route that event to theinputchannelsdk: Add
strictResume, so a server with strict resume refuses an answer to an interrupt that is no longer waiting.client.runs.create(),stream()andwait()send it asstrict_resume, anduseStream'ssubmit()passes it on. Withrespond()andrespondAll(), the refusal is anUnknownInterruptErroronerrorwithreason,interruptIdsandpendingIds, whichisUnknownInterruptError(error)recognizes, and the interrupts still waiting show again.useStreamignores atoolsevent of a kind it doesn't know, such as langgraph's owntool-startedpayload, instead of throwingUnexpected tool eventinside a state update, which crashed the app's render.
Minor Changes
sdk: Hide the interrupts another client answered when the server sends
input.answered, and route that event to theinputchannelsdk: Add
strictResume, so a server with strict resume refuses an answer to an interrupt that is no longer waiting.client.runs.create(),stream()andwait()send it asstrict_resume, anduseStream'ssubmit()passes it on. Withrespond()andrespondAll(), the refusal is anUnknownInterruptErroronerrorwithreason,interruptIdsandpendingIds, whichisUnknownInterruptError(error)recognizes, and the interrupts still waiting show again.
Patch Changes
useStreamignores atoolsevent of a kind it doesn't know, such as langgraph's owntool-startedpayload, instead of throwingUnexpected tool eventinside a state update, which crashed the app's render.Run streams take the
lifecyclestream mode, typed asLifecycleStreamEvent: an event when each subgraph starts and ends, with the id of the tool call that started it.sdk:
run.startsends the multitask strategy asmultitask_strategy, like the protocol's other fields, as well asmultitaskStrategy, which older servers read.
1.13.0
5 Nov 2026client.runs.streamandclient.runs.joinStreamtakestreamNamespaces, the namespaces of a run to stream (""is the root graph), each without the subagents it starts. Servers that support it reportstream_namespacesin/info; older servers ignore it and send every event. A reconnect no longer re-sends query params itsLocationalready carries, so the URL stops growing on every reconnect.Add a
reasonoption toclient.runs.cancel. Setreason: "taken"to mark run input absorbed for steering; the server records acancel_reasonstarting withtaken:.Type the
endevent that closes a run stream asEndStreamEvent: its data carries the run'srun_idand finalstatus, or isnullfrom servers that send it without data.
Minor Changes
client.runs.streamandclient.runs.joinStreamtakestreamNamespaces, the namespaces of a run to stream (""is the root graph), each without the subagents it starts. Servers that support it reportstream_namespacesin/info; older servers ignore it and send every event. A reconnect no longer re-sends query params itsLocationalready carries, so the URL stops growing on every reconnect.
Patch Changes
Add a
reasonoption toclient.runs.cancel. Setreason: "taken"to mark run input absorbed for steering; the server records acancel_reasonstarting withtaken:.Type the
endevent that closes a run stream asEndStreamEvent: its data carries the run'srun_idand finalstatus, or isnullfrom servers that send it without data.When the
threadIdoption ofuseStreamchanges while the last run's values still hold a pending headless tool call, the hook no longer runs that tool again. It also no longer resumes the new thread, or a thread it creates after a switch tonull, with the previous thread's interrupt id. Passing back thethreadIdof a threadsubmitcreated no longer runs its pending tool again either.The client no longer sends a
POSTorPATCHrequest again after it may have reached the server, so a retry can no longer create a second run or repeat a protocol command. These requests are now retried only when the connection failed before they were sent (for example, the connection was refused or the host was not found).GET,HEAD,OPTIONS,PUTandDELETErequests are retried as before.Add
cancel_reasonto theRuntype and toRunSelectField. The Agent Server returns why a run was cancelled, but callers had to cast to read it.ThreadsClient.getStateandThreadsClient.getHistoryaccept aselectoption to return only some fields, e.g.select: ["values.messages"]to read a single state key. Exports the newThreadStateSelectFieldtype and the existingThreadSelectFieldtype from the package root.
1.12.10
4 Nov 2026When a headless tool finishes after a switch to another thread,
StreamOrchestratorno longer sends its result to the new thread, keyed by the previous thread's interrupt id, and theuseStreamhook no longer streams the previous thread's resumed run into the new thread's view and no longer aborts a run the new thread is streaming. The call stays pending on its own thread and runs again when that thread is shown.A thread run stream from
client.runs.stream()orclient.runs.joinStream()that ends without an error and without anendorerrorevent now asks the server for the run's status. If the run is still pending or running, for example because a proxy timeout or a server restart ended the response, the stream reconnects from the last event as it does after a dropped connection, instead of ending early with a cut answer. A 429, a 5xx or a network error on that check is handled like a dropped connection too. This adds one request at the end of such a stream.
1.12.9
30 Oct 2026Fix SSE multiline JSON framing, colonless fields, stream-leading BOM handling, and empty event ID resets during reconnection. Match Python streaming behavior: empty payloads yield null, events inherit the reconnect cursor, and ID-only/retry-only blocks update internal state without being yielded to callers. Cleared event IDs are exposed as undefined. Pending unnamed data is flushed at EOF, matching Python's existing tolerant EOF behavior.
A run abandoned by
clear()orstop()no longer runsonSuccess, so a thread switch during a reconnect backoff no longer loads the previous thread's history.A headless tool call still waiting for its result when a thread opens, for example after a page reload, now runs once and resumes the run in the
useStreamhook andStreamOrchestrator; before, nothing ran and the thread stayed paused. Effects replayed by StrictMode, Fast Refresh or<Activity>no longer run a pending headless tool twice in the hook, nor, under Fast Refresh or<Activity>, with a customtransport.
Patch Changes
Fix SSE multiline JSON framing, colonless fields, stream-leading BOM handling, and empty event ID resets during reconnection. Match Python streaming behavior: empty payloads yield null, events inherit the reconnect cursor, and ID-only/retry-only blocks update internal state without being yielded to callers. Cleared event IDs are exposed as undefined. Pending unnamed data is flushed at EOF, matching Python's existing tolerant EOF behavior.
A run abandoned by
clear()orstop()no longer runsonSuccess, so a thread switch during a reconnect backoff no longer loads the previous thread's history.A headless tool call still waiting for its result when a thread opens, for example after a page reload, now runs once and resumes the run in the
useStreamhook andStreamOrchestrator; before, nothing ran and the thread stayed paused. Effects replayed by StrictMode, Fast Refresh or<Activity>no longer run a pending headless tool twice in the hook, nor, under Fast Refresh or<Activity>, with a customtransport.With history enabled,
joinStreamin theuseStreamhook andStreamOrchestratornow shows the thread state read after the joined run ends, assubmitalready does, instead of the joined stream's last values.Joining a run from its first event in a mount that already streamed it no longer doubles each message's text, subagent messages included. A join that resumes from a
lastEventIdstill continues the message where it left off.With history enabled,
submitin theuseStreamhook andStreamOrchestratorno longer pins the run to the cached head of the shown branch when the latest branch is shown, so turns added elsewhere since the history was read (another tab, a cron, an API call, or this tab's own earlier run when a second submit was queued behind it) stay on the shown branch instead of moving to a sibling branch. A shown branch whose head is not the newest loaded checkpoint still forks from that head.Without history, the
useStreamhook andStreamOrchestratornow read the thread again after a run that succeeds when the state shown had an interrupt, a node still to run or a task error, so an answered approval no longer comes back and an old error goes away. A run on a thread that showed none of these makes no extra request, and a failed read reports no error. With history, a failed read after a run no longer fails the run in the hook or skipsonFinishinStreamOrchestrator.A stream that reconnects now gets a fresh set of reconnect attempts each time an event arrives, as the Python SDK does, so a long stream no longer gives up at its sixth drop when every reconnect worked. A frame with only an
id:or aretry:field does not count as an event.stop()in theuseStreamhook andStreamOrchestratorno longer loses the session. Without history and without anonFinishthat takes the thread state, stopping a running stream put back the thread state read when the thread opened, so the turns sent since disappeared andonStopedits were overwritten. A stop now reads the thread and shows what the server kept, with theonStopedits applied on top. With or without history, a stop no longer shows the cancellation as an error, or the node it cut off as a breakpoint.After a reload, a subagent delegated by an older turn is no longer shown with the tool results of a newer turn.
After a reload, a subagent that is still running or waiting on an approval no longer shows the state of a regular tool called before it in the same message.
With
streamSubgraphs, values from a subgraph that is not a subagent no longer replace the root state while the subgraph runs. Its results show once its node returns.A numeric
throttlenotifies at most once per interval while values keep changing, as documented, instead of waiting until they stop.sdk: re-parse streamed tool call args at most every 50ms instead of on every chunk
The
useStreamhook from@langchain/langgraph-sdk/reactre-parsed a streaming tool call's full arguments on everymessageschunk, so the work grew quadratically with the length of the arguments. It now reuses the previous parse and re-parses at most every 50ms, and once more when the stream ends. Subagent messages get the same treatment.The
@langchain/corepeer dependency is raised from^1.1.48to^1.2.18, the first release that parses tool call chunks lazily. Older releases parse them on every chunk regardless, so they would get the delay without the speedup.
1.12.8
26 Oct 2026sdk: Stop retrying cancelled requests, release abort listeners and emit CR-terminated SSE lines at once
1.12.7
22 Oct 2026sdk: Stop resolved interrupts from coming back after a reload
After a reload, the first submit or respond on the Agent Server brought back every interrupt the thread had already resolved, and accepting them failed with
no_such_interrupt. Its HTTP commands reportapplied_through_seq: 0, so the SDK treated the whole replayed history as new. When a command reports 0, the SDK now finds where the command's run starts on the thread stream and treats everything before it as history.
1.12.6
21 Oct 2026Tool-call args streamed as
tool-call-deltaslices are appended to the tool call, souseStream, scopeduseMessages,thread.messages,subgraph.messagesandsubagent.messagesshow live args whether the server sends slices or the olderblock-deltasnapshots.block-deltastill replaces the args.Delta variants the SDK doesn't recognise are now ignored. Before, one froze a scoped
useMessagesview until the run ended, left the in-flightthread.messagesmessage unsettled, and crashed Node with an unhandled rejection fromsubgraph.messagesorsubagent.messages.MessageAssembler.consumereturnsundefinedfor such events.Upgrade the SDK and its bindings before your server emits
tool-call-delta.
1.12.5
16 Oct 2026sdk: A reply cut off mid-stream, for example by
stop(), no longer lingers inuseStreammessages after its run ends: it is dropped as soon as the run ends, stays gone after a page refresh, and is dropped in other tabs watching the thread too. A reply that finished streaming before the run paused for input stays visible while paused and is replaced, not duplicated, when the run resumes. Streaming message handles for a cut-off message now settle with anabortederror instead of never resolving.Opening a thread with recent activity no longer replays it in
useStream. Every new stream subscription receives the thread's recent events again, and the controller applied them on top of the state it had just loaded, somessages,valuesandtoolCallsrewound to earlier turns and rebuilt themselves while old tool calls flashed through running and finished. The controller now skips events produced before the checkpoint it loaded. Scoped views, such asuseMessageson a subagent, still receive the full history.A
submit()sent right after opening a thread also no longer ends early. A replayed completion from an earlier run used to settle it, clearisLoadingand fireonCompletedwhile the new run was still going.messagesProjection(), the root-namespace messages projection acquired throughStreamController.registry, now fills from the root event stream. It threw aReferenceErroron every event and stayed empty. The framework hooks were not affected:useMessagesreturnsstream.messagesfor the root.
Patch Changes
sdk: A reply cut off mid-stream, for example by
stop(), no longer lingers inuseStreammessages after its run ends: it is dropped as soon as the run ends, stays gone after a page refresh, and is dropped in other tabs watching the thread too. A reply that finished streaming before the run paused for input stays visible while paused and is replaced, not duplicated, when the run resumes. Streaming message handles for a cut-off message now settle with anabortederror instead of never resolving.Opening a thread with recent activity no longer replays it in
useStream. Every new stream subscription receives the thread's recent events again, and the controller applied them on top of the state it had just loaded, somessages,valuesandtoolCallsrewound to earlier turns and rebuilt themselves while old tool calls flashed through running and finished. The controller now skips events produced before the checkpoint it loaded. Scoped views, such asuseMessageson a subagent, still receive the full history.A
submit()sent right after opening a thread also no longer ends early. A replayed completion from an earlier run used to settle it, clearisLoadingand fireonCompletedwhile the new run was still going.messagesProjection(), the root-namespace messages projection acquired throughStreamController.registry, now fills from the root event stream. It threw aReferenceErroron every event and stayed empty. The framework hooks were not affected:useMessagesreturnsstream.messagesfor the root.Stop the protocol WebSocket transport from reconnecting when the server closes the socket with 4000 plus a 4xx status (4403, 4404, 4422 and the like; 4408 and 4429 still reconnect): the event stream now ends at once with an error that carries the
status. Other 4xxx closes still reconnect, with thestatuson theonReconnectcause. A WebSocket thread stream that fails for good now reachesThreadStream.onError, souseStreamsetserrorand clearsisLoading, as it already did for SSE. A command whose send fails no longer leaves a response promise behind to be rejected later as an unhandled rejection.
1.12.4
12 Oct 2026Order parallel writes by task path, like langgraph (Python) — one sort key for live execution and every saver, instead of the task-id order #2544 added for DeltaChannel writes
When two or more tasks in one superstep write the same
DeltaChannel, their writes are now applied and replayed in(task_path, task_id, idx)order — the order Python's langgraph#8544 established — instead of task-id order. Task ids are uuid5 hashes that include the checkpoint id, so the old order permuted parallel writers from run to run and disagreed with Python.Upgrade notes:
1.12.3
7 Oct 2026sdk: Copy
defaultHeaderswhen constructing aClientinstead of writingx-api-keyinto the caller's object. Previously, clients created from the samedefaultHeadersobject shared one set of headers, so a later client's API key was sent by earlier clients, and a client created with no API key could send another client's key to its ownapiUrl.
1.12.2
6 Oct 2026sdk: URL-encode caller-supplied identifiers (thread, assistant, run, cron and checkpoint IDs, subgraph namespaces) in request paths so an untrusted ID can't redirect a request to another endpoint. IDs containing reserved characters such as
/,?,#,%or spaces are now sent percent-encoded, so pass raw IDs rather than pre-encoded ones..and..are no longer accepted as IDs: the method rejects with anInvalid path segmenterror instead of sending a request.Export the Agent Server graph factory
ServerRuntimetype from@langchain/langgraph-sdk.
1.12.1
3 Oct 2026Fix
useStream/StreamOrchestratorleaving stale, never-checkpointed messages visible afterstop()cancels a run mid-turn. The buffer is now reconciled against the persisted thread state (refetching it when the caller needs authoritative thread state, otherwise falling back to the cached history) instead of only clearing on a thread switch or remount.Stop the protocol SSE transport from retrying
stream/eventson 4xx responses (except 408 and 429): the stream now ends at once with the error. Protocol request errors now keep the HTTPstatusand response bodytext. The reconnect attempt counter now resets after every successful connect, so idle reconnects no longer use upmaxReconnectAttempts.
1.12.0
25 Sep 2026useStream's"enqueue"multitask strategy can now be backed by real, durable server-side runs instead of an in-memory client-only queue.Pass
queue: "server"to opt in; it defaults to"local", so existing usage is unaffected."server"requires the backend behindapiUrlto implement the Runs REST endpoints (POST/GET /threads/{thread_id}/runs,POST /threads/{thread_id}/runs/{run_id}/cancel), not just streaming/commands. Queued submissions then persist across reloads and are visible to other sessions, andcancelQueued/clearQueuecancel them server-side too.Not supported with a custom
AgentServerAdaptertransport —queueonly applies to the built-in transport.
1.11.2
21 Sep 2026Preserve metadata from v2 message SSE events when constructing frontend message objects, so applications can inspect message provenance and model completion details without parsing raw events.
These fields describe individual messages and model calls: a finish reason does not identify the final response of a graph turn, and callback run IDs are not necessarily server run IDs. This change does not add an
is_finalmarker or persist stream-only metadata into historical checkpoints.
1.11.1
18 Sep 2026langgraph: Add
responseSchemaoption tointerrupt()interrupt(value, { responseSchema })lets a graph declare the shape of the
value it expects on resume. A Zod schema validates the resume value and the
parsed result is whatinterrupt()returns; a raw JSON Schema object is passed
through as-is. The schema is surfaced onInterrupt.response_schemaso clients
such as Studio can render a typed form instead of a free-form JSON editor.
Omitting the option keeps today's behavior.
1.11.0
12 Sep 2026Expose 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.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.:x
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
1.10.2
4 Sep 2026sdk: Apply in-place message metadata updates from values
sdk: Keep stream.interrupts truthful after sequential multi-interrupt resume
1.10.0
26 Aug 2026Add LangSmith replica routing to thread-stream run starts.
sdk: Drop unused svelte and vue peer dependencies
The Svelte and Vue adapters live in
@langchain/svelteand@langchain/vue, but the core SDK still declared both as optional peers.
Scanners like Socket count optional peers as part of the package graph, so
the SDK was being flagged for obfuscated-code alerts inclsxandentities— packages it never loads. React stays a peer because./react
and./react-uistill ship here.
1.9.31
20 Aug 2026sdk: Don't re-show resolved interrupts after reload
After a reload, the next submit used to replay the old
input.requested
event, so the HITL form came back even though the interrupt was already
answered. Keep filtering historical interrupts after the command is
accepted, using the response'sapplied_through_seqas the cutoff.
1.9.30
19 Aug 2026sdk: Clear messages on hydrate(null) with a pending interrupt
Teardown awaited the paused root pump, so threadId went null while
the old conversation stayed on screen. Reset the snapshot first.sdk: Keep isLoading true across interrupt→running hydration
Deferred terminal resets no longer clear isLoading when a newer running lifecycle has already arrived (HITL resume / SSE replay).
sdk: Adopt server metadata on same-id optimistic message echo
When a
valuessnapshot echoes an optimistic human with the same
content plus committedadditional_kwargs(e.g. attachment paths),stream.messagesnow takes the server copy instead of keeping the
plain optimistic message until hydration. Preferring is asymmetric:
lagging or poorer values snapshots do not strip richer current
metadata. In-flight AI token streaming is unchanged: streamed content
still wins when it has moved past the snapshot.
1.9.29
11 Aug 2026Always attach the underlying Response on HTTPError.
sdk: Deliver input channel events on the root-bus fast path
channelProjectionwithreplay: false(theuseChannelEffectdefault) comparedevent.methodto channel names, soinput.requestednever matched"input". Match viainferChannelinstead, same as the slow path.sdk: Defer stream join until lazy thread create commits
Hydrating an externally-minted thread id that 404s still opened
/stream/eventsbeforePOST /commandscreated the row. On langgraph_api's in-mem runtime that join is accepted but dead, so the first run delivered nothing until idle reconnect. Treat missing threads like client-minted ones and start the root pump only after dispatch succeeds.
Patch Changes
Always attach the underlying Response on HTTPError.
sdk: Deliver input channel events on the root-bus fast path
channelProjectionwithreplay: false(theuseChannelEffectdefault) comparedevent.methodto channel names, soinput.requestednever matched"input". Match viainferChannelinstead, same as the slow path.sdk: Defer stream join until lazy thread create commits
Hydrating an externally-minted thread id that 404s still opened
/stream/eventsbeforePOST /commandscreated the row. On langgraph_api's in-mem runtime that join is accepted but dead, so the first run delivered nothing until idle reconnect. Treat missing threads like client-minted ones and start the root pump only after dispatch succeeds.sdk: Surface nested interrupts on stream.interrupts
input.requestedevents from subgraphs/subagents were dropped live by a root-only filter, while hydrate seeded them fromstate.tasks, so HITL UIs saw nested interrupts only after reload. Mirror every namespace ontorootStore.interrupts(withInterrupt.namespace), and resolve that namespace inrespond({ interruptId })when callers omit it.sdk: Resolve respond() namespace from interrupt id
When callers pass
{ interruptId }withoutnamespace, look the
namespace up onthread.interruptsinstead of defaulting to root.
1.9.28
21 Jul 2026sdk: Clear hydrate interrupt allowlist on respond()
submit()already cleared#hydratedActiveInterruptIdsso a new run's liveinput.requestedevents were not dropped as historical.respond()/respondAll()(viadispatchResume) did not, so a follow-on HITL after resume never appeared onstream.interruptand free-text submits could resume with the wrong payload.Fix
useStreamcrash (TypeError: Cannot read properties of null (reading 'fetch')) when a thread is cleared while hydration is in flight. The stale hydrate now bails immediately after thegetState()await — it no longer applies the fetched state to the thread that was left, nor opens a reconnect viathreads.stream(null, …).
1.9.27
15 Jul 2026sdk: Omit carried
sinceon SSE reconnectProtocol
seqis connection-scoped: a newPOST /stream/eventsre-numbers Redis replay from 1, so advancingsincefrom observed seqs and sending it after a successful open filtered out the full history (heartbeats only). An explicit callersinceis still sent until the stream connects (including pre-ready retries); post-connect reconnects omitsinceand rely on durableevent_iddedup.
1.9.26
15 Jul 2026sdk: Keep SSE reconnect enabled with custom fetch
Auth/proxy fetch shims previously forced
maxReconnectAttempts: 0, so HITL waits that lost/stream/events(e.g.ERR_QUIC_PROTOCOL_ERROR) never recovered and leftrespond()/submit()spinning. Fail-fast test mocks should passmaxReconnectAttempts: 0explicitly. Also plumbs reconnect options through frameworkuseStreambindings.sdk: Support clearing a cron's end time via
crons.update(cronId, { endTime: null })CronsClient.updatenow acceptsendTime: nullto clear a previously set cron end time; omittingendTimestill leaves it unchanged. The field was typedstring, so callers could not express "clear" even though the request already forwards an explicitnull.
1.9.25
25 Jun 2026sdk: Bundle pure-ESM deps into CJS build to fix ERR_REQUIRE_ESM
Bundle the pure-ESM dependencies
p-retryandp-queue(and their transitive ESM-only deps) into the build output so the CJS artifact no longer does a top-levelrequire()of an ESM module. This fixesERR_REQUIRE_ESMfor CommonJS consumers on Node versions whererequire(ESM)is not enabled by default (< 20.19 / < 22.12). Closes #2562.
1.9.24
22 Jun 2026sdk: Apply state update and goto alongside interrupt resume
respond(decision, { update, goto })now maps to LangGraph'sCommand(resume, update, goto), so a human-in-the-loop UI can commit a state
update (e.g. push the interrupt card into state) in the same superstep as
the resume — one checkpoint, no separateupdateStatewrite, no flicker.@langchain/langgraph-apiforwardsupdate/gotothroughinput.respond,
and@langchain/coremessage instances inupdateare serialized to dicts
before transport, exactly likesubmit(). Bumps@langchain/protocolto^0.0.18for theGototype.respond/respondAllalso applyupdateoptimistically (mirroringsubmit()): the pushed messages paint immediately, with stable ids minted so
the resumed run's echo reconciles them in place. Without this the interrupt is
cleared the instantrespond()dispatches while the pushed card only reappears
a server round-trip later — so the card would flicker in that gap. The
optimistic state settles on the resumed run's terminal (pending → sent, or
rolled back on a failure before any echo).User-initiated optimistic writes (
submit()/respond()/respondAll()) now
commit to the store synchronously, in the same tick as the triggering event,
instead of being coalesced onto the next macrotask. This lets a framework render
the pushed message in the same commit as any local UI state the caller flips
alongside it (e.g. a HITL form swapping its inputs for the resolved card), so the
card no longer blinks out for the one-macrotask window before the flush lands.
High-frequency streaming writes keep their macrotask coalescing.
1.9.23
17 Jun 2026sdk: Avoid scoped stream resubscribe churn
Defer final projection disposal by one microtask so framework bindings that release and immediately reacquire the same scoped projection during reactive updates keep the existing stream subscription instead of rotating through root-only and scoped SSE filters.
1.9.22
12 Jun 2026sdk: Reconnect SSE streams when heartbeat idle is detected
Detect half-open SSE connections by watching for server keep-alive heartbeats (
: heartbeat) and reconnecting with Last-Event-ID orsincewhen they stop."auto"mode arms only after heartbeats are observed, so long tool calls and HITL pauses do not false-fire on heartbeat-emitting servers.Allow custom
AgentServerAdapters to be late-bound and re-bound to a thread. Adapters can now implement an optionalsetThreadId(threadId), whichclient.threads.stream(threadId, { transport })calls when binding the active thread — including the lazily-minted id from the firstsubmit()on athreadId: nullcontroller. The built-inProtocolSseTransportAdapter,ProtocolWebSocketTransportAdapter, andHttpAgentServerAdapterimplement it:threadIdis now optional at construction, request URLs derive from the currently-bound thread, andpathsentries may be functions of the thread id ((threadId) => string). This lets a single custom transport back a lazy thread-creation flow instead of being pinned to one thread at construction.
Patch Changes
sdk: Reconnect SSE streams when heartbeat idle is detected
Detect half-open SSE connections by watching for server keep-alive heartbeats (
: heartbeat) and reconnecting with Last-Event-ID orsincewhen they stop."auto"mode arms only after heartbeats are observed, so long tool calls and HITL pauses do not false-fire on heartbeat-emitting servers.Allow custom
AgentServerAdapters to be late-bound and re-bound to a thread. Adapters can now implement an optionalsetThreadId(threadId), whichclient.threads.stream(threadId, { transport })calls when binding the active thread — including the lazily-minted id from the firstsubmit()on athreadId: nullcontroller. The built-inProtocolSseTransportAdapter,ProtocolWebSocketTransportAdapter, andHttpAgentServerAdapterimplement it:threadIdis now optional at construction, request URLs derive from the currently-bound thread, andpathsentries may be functions of the thread id ((threadId) => string). This lets a single custom transport back a lazy thread-creation flow instead of being pinned to one thread at construction.
1.9.21
11 Jun 2026stream: Add per-event side-effect selector
Add
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers.sdk: Stop re-streaming seeded messages on idle-thread submit
An idle (finished) thread defers its root SSE pump, so the first
submit()brings it up and the transport replays the finished run fromseq=0. The replayedmessageschannel carries no step (unlikevalues, guarded bymaxStep), so it rebuilt each already-complete message from an emptymessage-startand re-streamed the whole turn token-by-token — a visible "messages replay" of the existing conversation. Seal the message ids seeded from the idlegetState()snapshot so replayed deltas can't downgrade the complete tail; the seal lifts once a newer checkpoint advances the timeline or on thread rebind, and ids from the next run are never sealed.sdk: Reconnect v2 SSE and WebSocket thread streams after disconnect
Add automatic reconnect with resume (
sincefor SSE) for protocol transports,
wireAsyncCallerthroughclient.threads.stream, and expose optional
reconnect tuning onThreadStreamOptions. Includes integration tests against
an in-process mock langgraph-api server.
1.9.20
9 Jun 2026sdk: Hydrate custom HttpAgentServerAdapter via transport getState
StreamController now prefers adapter getState() before client.threads.getState,
HttpAgentServerAdapter implements GET /threads/:id/state, and useStream inherits
apiUrl from the transport so hydration no longer defaults to localhost:8123.
1.9.19
8 Jun 2026Deduplicate the client stream transports: the protocol transport now shares the SSE decoder and
IterableReadableStreamhelpers with the legacy transport instead of carrying its own copies. Removes the redundanttransport/decoder.tsandtransport/stream.tsshims (and a deadStreamPartre-export), importing the shared utilities fromutils/sse.tsdirectly. No public API or behavior change.
1.9.18
6 Jun 2026sdk: Resume useChannel subscriptions across serial runs
Enable
resumeOnPauseon the channel projection souseChannelkeeps
accumulating events across prompts on the same thread. Clarify selector
docs and JSDoc:useChannelfor the full event stream,useExtension
for the latest payload.
1.9.17
5 Jun 2026sdk: Revive automatic optimistic submit echo
Echo
submit()input intovalues/messagesimmediately with client-side
id minting and id-based reconciliation as the server streams back. Expose
per-messageoptimisticStatusvia message metadata (pending→sent/failed), shallow-merge non-message keys with rollback when novalues
arrive, and add anoptimistic: falsehook opt-out. Plumb through React,
Vue, Svelte, and Angular with browser e2e coverage.sdk: Coalesce duplicate thread read requests
Coalesce concurrent identical
threads.getState()andthreads.getHistory()reads within the SDK client so transient remounts do not issue duplicate hydrate requests. Request identity includes the prepared URL, body, method, and headers, and coalescing is skipped for caller-provided abort signals, raw response reads, andonRequesthooks to preserve auth and cancellation isolation.sdk: Reconcile subagents and subgraphs on thread reconnect
Seed deep-agent subagent cards from checkpoint messages and subgraph hosts from a single bounded
getHistoryread duringhydrate(), so parallel fan-out discovery reappears immediately on refresh instead of waiting for SSE replay. Subagent execution namespaces are promoted through the existing guarded discovery state machine (bulk at hydrate, lazily per opened card via the selector layer). The getHistory cost is O(1) in requests regardless of fan-out width.
1.9.16
4 Jun 2026sdk: Surface resumed run failures on stream.error
Route
respond()andrespondAll()through a coordinator dispatch path that
writes the reactiverootStore.errorslot when a resumed run reaches a failed
terminal or wheninput.responddispatch fails, matching submit() behavior so
framework consumers (e.g. API-key retry UIs) observe resume failures viastream.errorinstead of onlyisLoadingtransitions.
1.9.15
3 Jun 2026sdk: Claim in-flight slot before root pump wait for enqueue
Move
#runAbortandisLoadingsetup ahead ofwaitForRootPumpReady()somultitaskStrategy: "enqueue"submits in the same tick land inqueueStore
instead of bypassing the client queue.
1.9.14
3 Jun 2026sdk: Keep subgraph status complete when values arrives late
SubgraphDiscoveryno longer downgrades a terminal subgraph back torunningwhen a host-namespacevaluessnapshot is observed after itscompletedorfailedlifecycle event. The content pump and lifecycle
watcher are independent streams, so this reordering could strand nodes as
perpetually running inuseStreamsubgraph UIs.
1.9.13
2 Jun 2026sdk: Normalize HITL edit decisions for Python servers
StreamController.respond()now mirrors camelCase and snake_case on edit
decisions (editedAction/edited_action) so JS clients can resume
human-in-the-loop interrupts against Python LangGraph servers.
1.9.12
2 Jun 2026sdk: Route headless tool resumes through respond on v1 stream
useStreamwas callingsubmit(null, { command })for headless-tool resumes,
which dispatchesrun.startwithout delivering the tool result. AddapplyHeadlessToolResumeCommandto route payloads throughrespond/respondAll, and tighten headless-tool browser tests to assert end-to-end
resume and graph completion.
1.9.11
1 Jun 2026sdk: Prefer completed task's direct mapping over pending checkpoint's positional guess in fetchSubagentHistory
Patch Changes
sdk: Prefer completed task's direct mapping over pending checkpoint's positional guess in fetchSubagentHistory
1.9.10
29 May 2026protocol-v2: Fold forkFrom client-side and honor per-run multitaskStrategy
The SDK now folds the ergonomic
forkFromoption intoconfig.configurable.checkpoint_idbefore sendingrun.start, so the
agent server only ever accepts the single, legacy-compliant fork field
(forkFromno longer hits the wire). The protocol-v2 reference servers
drop their top-levelforkFromnormalization accordingly.The protocol-v2 servers now honor the caller's
multitaskStrategyper
run (one ofreject|rollback|interrupt|enqueue) instead of
hardcoding it, falling back toenqueuewhen omitted or unrecognized.protocol-v2: Add
respondAll()and run config/metadata on interrupt resumeThe stream controller (and the React/Angular/Svelte/Vue wrappers) gain a
respondAll(responsesById, options)method to resume several interrupts
pending at the same checkpoint in a single command — required for runs that
pause on multiple interrupts at once (e.g. parallel tool-authorization
prompts), which sequentialrespond()calls cannot handle.respond()now takes an options object ({ interruptId?, namespace?, config?, metadata? }) so a resumed run can carry the same run-level config
(model, user context, …) and metadata (trigger source, test flags, …) a
freshsubmit()would. The protocol-v2 reference servers read the newresponsesbatch andconfig/metadatafields leniently and fold them
onto the run that services theinput.respondcommand.
Patch Changes
protocol-v2: Fold forkFrom client-side and honor per-run multitaskStrategy
The SDK now folds the ergonomic
forkFromoption intoconfig.configurable.checkpoint_idbefore sendingrun.start, so the
agent server only ever accepts the single, legacy-compliant fork field
(forkFromno longer hits the wire). The protocol-v2 reference servers
drop their top-levelforkFromnormalization accordingly.The protocol-v2 servers now honor the caller's
multitaskStrategyper
run (one ofreject|rollback|interrupt|enqueue) instead of
hardcoding it, falling back toenqueuewhen omitted or unrecognized.protocol-v2: Add
respondAll()and run config/metadata on interrupt resumeThe stream controller (and the React/Angular/Svelte/Vue wrappers) gain a
respondAll(responsesById, options)method to resume several interrupts
pending at the same checkpoint in a single command — required for runs that
pause on multiple interrupts at once (e.g. parallel tool-authorization
prompts), which sequentialrespond()calls cannot handle.respond()now takes an options object ({ interruptId?, namespace?, config?, metadata? }) so a resumed run can carry the same run-level config
(model, user context, …) and metadata (trigger source, test flags, …) a
freshsubmit()would. The protocol-v2 reference servers read the newresponsesbatch andconfig/metadatafields leniently and fold them
onto the run that services theinput.respondcommand.
1.9.9
27 May 2026sdk: Preserve apiUrl path prefix in stream transport URLs
Use BaseClient-style URL concatenation in
toAbsoluteUrlso SSE and WebSocket
subscriptions work when the SDK is pointed at a proxied apiUrl with a path
prefix (e.g./api/chat-langchain).
1.9.8
27 May 2026sdk: Cancel runs on stop by default and add disconnect()
stream.stop()now callsclient.runs.cancelfor the active run before disconnecting the client (default{ cancel: true }). Join/rejoin UIs can callstream.disconnect()orstop({ cancel: false })to leave the agent running server-side.This fills a missing gap we found when migrating to v1.
1.9.7
26 May 2026sdk: Unwrap Command tool outputs and hide scoped task tools
Filter wrapper
taskdispatch events from subagent-scoped tool-call
projections and parse embedded ToolMessage results from LangGraphCommandpayloads ontool-finished.react: Avoid eager stream getter evaluation during object spread
Mark optional
useStreamaccessors as non-enumerable so object spread/rest destructuring does not accidentally read guarded fields likehistoryor opt into additional stream modes.
1.9.6
25 May 2026sdk: Clear subgraph and subagent discovery on thread swap
Reset discovery stores in
StreamController.#teardownThread()so starting a
new thread does not leave stale subgraph cards or subagent entries from the
previous run.
1.9.5
22 May 2026stream: Align AssembledToolCall typing with pre-v1 expectations
Make
InferToolCallsresolve to genericAssembledToolCallunions, expose
syncstatus/errorfor reactive bindings, and align type tests across
React, Vue, Svelte, and Angular SDK packages.
1.9.4
19 May 2026Move
@langchain/corefrom a runtime dependency back to a required peer dependency so installing the SDK alone no longer pulls in@langchain/core(andjs-tiktoken, etc.). Consumers that use streaming or message coercion must install@langchain/coreexplicitly or via@langchain/langgraph.
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.