npm / @langchain/langgraph
@langchain/langgraph
What changed in @langchain/langgraph 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
13 breaking4 security34 new APIs and options2 performance4 behavior and defaults31 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@langchain/langgraph 188 changes
Breaking changes 13
A branch no longer reads DeltaChannel writes from another branch; new-branch snapshots and checkpoint updates/replays avoid storing writes on an advanced base checkpoint.
Forking before a DeltaChannel's first write no longer starts subscribers that never ran on the original path.
Task metadata paths change for Send tasks and node error handlers to match Python's task-path shapes.
Sav ers must return pendingWrites in writesSortKey order so replay reproduces the run's DeltaChannel value.
Run setup once from one process after upgrading and before serving traffic, or reads and writes fail until the task_path migration is applied.
Plain objects shaped like Command are treated as ordinary state input; construct commands with new Command(...) to pass them as input. Command instances from another installed copy remain recognized.
Requires @langchain/langgraph-sdk 1.12.3 or later.
Hydrating a written DeltaChannel without a checkpointer or config now throws instead of returning an empty value.
State methods resolve the checkpointer as a run does; a checkpointer: false graph no longer writes state using a checkpointer supplied through config and has no task state in getState.
A checkpointer: true graph used as a root now rejects state methods with the same error as a run.
The vestigial peer dependency was removed, eliminating the last source of install-time peer conflicts with Zod v4.
User-initiated writes from submit, respond, and respondAll now commit synchronously in the triggering tick; high-frequency streaming writes keep macrotask coalescing.
Node return values and Command updates are validated against Zod state schema constraints before being applied to graph state.
Security 4
Context values are kept out of tracer-derived metadata.
Root-level invokes with an invoke-time thread_id no longer inherit ambient configurable values, preventing cross-invocation leakage on shared compiled graphs.
Provides a guard for validating subscription requests against recognized channels.
LangGraph has NoSQL parameter injection in MongoDBSaver, allowing cross-tenant state access
New APIs and options 34
Adds a helper to distinguish invalid-resume errors from other errors.
The method accepts an optional serialized task path; custom savers must persist it and return pending writes in the new sort order.
A new checkpoint-package export provides comparison for pending-write sort keys.
SQLite and Postgres add a task_path column, migrated automatically by setup(); Redis and MongoDB documents also store the path.
A new checkpoint-package export provides the sort key used to order pending writes.
Adds typed handleInterrupt and handleResume lifecycle events through normal callback configuration; callbacks are awaited before terminal chain callbacks and work independently of stream mode.
Surfaces the response schema on Interrupt so clients such as Studio can render a typed form instead of a free-form JSON editor.
Adds a schema option that validates the resume value; a Zod schema's parsed result is returned by interrupt(), while a raw JSON Schema object is passed through as-is.
Omitting outputs can suppress messages returned directly by nodes, while omitting inputs can affect message deduplication.
Per-node input/output processors transform payloads recorded on a node’s trace while retaining its span and timing; if a processor throws, the original payload is used.
respond accepts goto alongside an interrupt resume, mapping it to LangGraph's Command so the resume can include a navigation instruction.
ToolNode forwards its input to tools as runtime.state, allowing tools to access current graph state across runtimes without relying on getCurrentTaskInput().
Adds a control option to invoke, stream, streamEvents, and the functional API for requesting or inspecting cooperative graph draining.
Adds counters_since_delta_snapshot to CheckpointMetadata for tracking delta snapshot cadence.
Adds a reducer channel that stores a sentinel in checkpoint blobs and reconstructs state by replaying ancestor writes, avoiding repeated serialization of accumulated values.
Adds node-level error handlers that run after retryPolicy is exhausted, receive typed node and error context, and can return state updates or route to recovery branches.
Adds a beta checkpoint saver API that walks the parent chain and returns per-channel writes and optional seeds.
When a drain is requested and tasks remain, the graph saves a checkpoint and throws GraphDrained so the run can be resumed later from the same config.
Adds an environment variable for the system bound on supersteps since a delta snapshot; the default bound is 5000.
Adds a batching-invariant messages reducer that coerces raw object and string writes for use with DeltaChannel.
Adds the typed NodeError context passed to node-level error handlers.
Timeouts raise NodeTimeoutError, drop the attempt's buffered writes, and abort the node's AbortSignal; the error is retryable under the default retry policy.
Adds v3 streamEvents support to RemoteGraph by adapting remote SDK thread streams to the local GraphRunStream shape.
Adds cooperative between-superstep draining through requestDrain(reason) and read-only drainRequested and drainReason; control is available to nodes and propagates into subgraphs.
Adds an explicit heartbeat call that refreshes idleTimeout.
Allows a graph-wide default error handler for regular nodes without their own handler; per-node handlers take precedence and defaults are not inherited by subgraphs.
Adds graph-wide retryPolicy and cachePolicy defaults resolved at compile time; per-node addNode values take precedence and defaults are not inherited by subgraphs.
Adds per-node, functional task and entrypoint, and Send timeouts, accepting milliseconds or a TimeoutPolicy with run and idle limits.
Adds a policy type for configuring run and idle timeouts and idle refresh behavior.
Maps an event to its subscription Channel, including named custom channels.
Provides namespace prefix matching.
Adds a transport-agnostic backend toolkit for building custom servers on top of the v2 streaming protocol.
Determines whether a buffered event should be delivered for a SubscribeParams filter, honoring channel, namespace prefix/depth, and an optional since replay cursor.
Exposes the recognized channel set for validating subscription requests.
Performance 2
For checkpoints marked with
delta_writes_versioned, the checkpointer is no longer asked for the history of a DeltaChannel that was never written, avoiding a walk through every ancestor.Avoids building full-state debug checkpoint payloads on every tick when no consumer subscribes to checkpoints or debug stream modes.
Behavior and default changes 4
Parallel writes are applied and replayed in (task_path, task_id, idx) order instead of task-id order, keeping live execution and saver replay consistent.
respond accepts update alongside an interrupt resume, applying the state update in the same superstep; @langchain/core messages are serialized to dicts before transport.
respondAll applies update optimistically, painting pushed messages immediately with stable ids that reconcile with the resumed run's echo.
Exposes state, input, and context JSON schemas through getJsonSchema() and getInputJsonSchema() for LangGraph Studio introspection.
Fixes and other changes 31
When a field changes from a DeltaChannel to a plain reducer, reads rebuild its value from stored writes and the next run adds to it rather than replacing it.
With exit durability, resuming parallel interrupts no longer applies a finished task's output twice because the save keeps only writes made during that run.
Stores message chunks as their non-chunk class so streamed graph runs checkpoint the same AIMessage as invoke, without duplicate tool-call chunks or reverted in-place tool_calls edits after reload.
Stores message chunks as their non-chunk class so streamed graph runs checkpoint the same AIMessage as invoke, without duplicate tool-call chunks or reverted in-place tool_calls edits after reload.
Resuming after some parallel interrupts are answered no longer reruns already-finished nodes and task() calls, including in subgraphs or when resuming at the latest checkpoint.
When one answer in a multi-answer resume fails its interrupt response schema, other tasks in the step finish before the ZodError is thrown, avoiding aborted tasks rerunning after side effects.
Channels written in one step share a version again, preventing updateState without asNode from selecting one parallel node instead of reporting an ambiguous update.
An exit-durability run addressed to an older checkpoint snapshots the channels it wrote instead of storing DeltaChannel writes on a checkpoint shared with a later branch.
updateState saves the snapshot counters on each checkpoint it creates, preserving the schedule for later DeltaChannel snapshots.
Checkpoint saves wait for preceding DeltaChannel writes and are skipped if a write fails, preventing state from reading back without that write.
A drain requested immediately before an interruptBefore breakpoint now stops at the breakpoint rather than draining past it on resume.
Messages written to a DeltaChannel using this reducer now receive ids across updateState, raw inputs, Overwrite, and Command paths, allowing RemoveMessage to target them.
A cached node's writes are now saved as if the node ran, so DeltaChannel state remains available after loading state again.
Exit-mode DeltaChannel writes are no longer stored under the null task id, so first-checkpoint reads and replays apply updates to plain channels too.
An Overwrite through updateState snapshots the reset DeltaChannel on the saved checkpoint, so subsequent reads do not walk back past the reset.
Raw Pregel DeltaChannel input is stored on the starting checkpoint or snapshotted on a new thread or addressed checkpoint, preventing input loss or leakage across runs and branches.
Checkpointer write failures no longer surface as process-level unhandled rejections before the run boundary reports them.
Each update in a multi-update super-step gets its own task id, so a DeltaChannel keeps every update instead of only the first.
No longer saves a checkpoint as its own parent when a run ends without running anything, preventing crashes when reading such a thread with a DeltaChannel.
Versions writes taken from the head, preventing PostgresSaver from dropping them and preserving DeltaChannel writes on a new thread.
Subgraphs now read a DeltaChannel using the checkpointer resolved by the parent, instead of hydrating it empty.
getState, getStateHistory, and updateState use a checkpointer: true subgraph's run-stored namespace, so reads find state and updates are not lost.
Resuming from a subgraph checkpoint returned by getState with subgraphs enabled now applies the resume value instead of re-firing the interrupt.
pushMessage now emits on the streamEvents v3 messages channel.
Deduplicates merged callback handlers by identity, preventing handlers inherited by both ambient and explicit config from being registered repeatedly and delivering streamed tokens twice.
Topic checkpoints are now stored as a flat values list to match Python; legacy [seen, values] checkpoints remain readable for restore compatibility.
Waits for completed-superstep persistence when using sync durability.
Exit-mode DeltaChannel writes now emit valid UUID task IDs accepted by Postgres for checkpoint_writes.task_id.
Overwrite now recognizes the JSON discriminator form emitted when typed values from another runtime are serialized and their type is erased, preserving Overwrite and DeltaChannel semantics across runtimes.
Fixes replay and fork behavior for graphs with interrupts and subgraphs, including stale resume writes and checkpoint loading.
Normalizes dynamic namespace suffixes for prefix matching.