@langchain/langgraph-sdk
1.17.0 · 17 Nov 2026MIT5.6M / weekRepositoryHomepagenpmAtom feed
Upgrading @langchain/langgraph-sdk From 1.14.0 to 1.17.0
3 releases in betweenevery note read
Reading releases, release notes and advisories…
- 1
- change to make
- 0
- advisories fixed
- 8
- new
- 27
- fixes
Before you upgrade
Tick each one off as you go- Deprecated1.15.0
Release by release
- New
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. - New
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. - Fixed
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. - Fixed
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.
- New
- New
New in
StreamOrchestrator(@langchain/langgraph-sdk/ui): subagent panels that stream only while they are open. - New
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. - New
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. - New
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.
- New
- 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. - Fixed
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. - Fixed
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. - Fixed
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. - Fixed
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.
- Deprecated
29 other lines we could not sort, mostly version bumps
- 1.17.0
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.
- 1.17.0
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. - 1.17.0
A submit made during a run is listed in
queueEntriesuntil its turn.cancelQueueItem(),clearQueue(), a thread switch andstop()drop it before it starts. - 1.17.0
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. - 1.17.0
hydrate(threadId)switches to that thread and reads nothing, since a custom transport has no thread routes. - 1.17.0
StreamEngineis the interface a framework binding uses, and bothStreamOrchestratorandCustomStreamOrchestratorimplement it. - 1.17.0
onCreatedgets the run id from the firstmetadataevent of each run's stream. The option was accepted before and never called. - 1.17.0
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. - 1.17.0
An
onCreatedoronRunEndthat throws is logged, and affects neither the run nor the ones after it. - 1.17.0
Switching to another thread calls
onThreadId, throughswitchThread(),syncThreadId()orhydrate(). Before, only a submit that created a thread called it.
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.