npm / @langchain/langgraph
@langchain/langgraph
What changed in @langchain/langgraph 0.1 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
25 breaking4 security3 deprecations77 new APIs and options12 performance13 behavior and defaults66 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@langchain/langgraph 1188 changes
Breaking changes 25
LangGraph's own writers and branch runners inside each node no longer enter an async context; node functions, edge functions and tools keep their context.
getSubgraphs and getSubgraphsAsync now match whole namespace segments and yield a namespace’s subgraph only once when a node declares several subgraphs.
Breaking out of a for-await loop or cancelling the stream reader now stops the run, including for graph.streamEvents, instead of leaving remaining nodes running in the background.
A node retried by its retry policy reuses its task's answers instead of asking again.
Messages and tools stream events now use the namespace of the graph that ran them; subgraph events are not streamed without subgraphs: true, with the documented exceptions.
Apps that show subagent messages as they stream now need streamSubgraphs: true when they submit.
A tool that calls interrupt() or whose run is drained no longer emits on_tool_error on the tools stream mode; it is paused and can run again on resume.
The default snapshot frequency changes from 1000 to 100 updates, reducing replay latency at the cost of increased storage. Set snapshotFrequency to 1000 to retain the previous cadence.
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.
Moved from a runtime dependency to a required peer dependency; consumers using streaming or message coercion must install it explicitly or via @langchain/langgraph.
writer, interrupt, and signal are no longer optional properties of Runtime.
The low-level helper has been removed; streaming responses are handled natively by the SDK.
Zod is now a peer dependency of @langchain/langgraph, so applications must provide it.
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
Deprecations 3
The stateSchema property is deprecated in favor of state.
The LangGraph prebuilt is deprecated in favor of LangChain's createAgent, which offers a simpler interface and greater customization through middleware.
The createReactAgent API is deprecated.
New APIs and options 65
Adds an error matcher that matches by name, recognizing an UnknownInterruptError thrown by another copy of @langchain/langgraph.
Setting this private configurable key enables strict resume, which rejects stale, empty, or ambiguous resume answers with UnknownInterruptError.
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.
The runtime is enhanced with executionInfo, adding runtime information for developers to use.
The runtime is enhanced with serverInfo, adding server information for developers to use.
The SDK now supports headless tools.
Adds an exported class for bypassing channel reducers so nodes can replace accumulated state directly.
Adds a type included in Annotation, StateSchema, and zod schema update type mappings for reducer-bypassing updates.
Adds a tools stream mode for tool lifecycle events.
Node definitions can specify a per-node input schema through addNode options.
Supports the new type bag pattern alongside the backward-compatible single-schema pattern.
Adds a type bag interface for ConditionalEdgeRouter.
Supports a type bag pattern that infers node state and runtime context types and validates return values against the output schema.
Adds a return type helper for node functions.
Adds a type bag interface for GraphNode.
The constructor supports mixing AnnotationRoot, Zod schemas, and StateSchema for state, input, and output definitions.
Adds an
{ input, output }-only pattern, with state inferred from the input schema.Types conditional edge routing functions passed to addConditionalEdges.
Extracts the State type from any supported schema, including StateSchema, AnnotationRoot, and Zod objects.
Extracts the Update type, representing partial state for node returns, from any supported schema.
Provides a strongly typed utility for defining graph node functions with inference for state, runtime context, and optional type-safe routing via Command.
Provides a pre-built message list channel with add/remove semantics.
Defines state fields with custom reducer functions for accumulating state.
Defines graph state using any Standard Schema-compliant validation library, including Zod, Valibot, and ArkType.
Defines transient fields that are not persisted to checkpoints.
Pass an encoding format to select the wire format, making it straightforward to switch between SSE and normal JSON responses without changing UI logic.
Allows defining types for interrupts and custom events upfront.
Adds a method for manually publishing to the messages stream channel.
Supports defining multiple interrupts in the constructor, selectable from Runtime with type safety across interrupts.
Adds an option to emit LangGraph API events as Server-Sent Events, including piping the stream to a Response object.
Adds a method to stream events in an LGP-compatible format.
The React hook supports pluggable transports, providing more control over the network layer without changing UI code.
Performance 12
The reducer does less work per update on long histories, including skipping the removal pass when nothing is removed.
The loop finds DeltaChannel and UntrackedValue channels once per run rather than scanning every channel on each task and step.
The runner keeps a step's running tasks in a Map, avoiding quadratic task listing for wide fan-outs.
Node updates and run input use a cached partial schema for validation instead of creating a new Zod schema per update, improving run speed.
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.
Resolved checkpointer promises are cleaned up to reduce memory retention.
Graph execution avoids unnecessary checkpoint cloning after every tick.
Fixes a performance regression due to deferred nodes.
Interrupts are detected faster within a tick.
The method is called only once to improve tick performance.
Scheduling tasks with large graphs is faster.
Behavior and default changes 13
Maps input.answered to the input channel, so input subscribers receive it as well as input.requested; check event.method before reading data.interrupt_id.
Each interrupt raised after a task has received answers gets its own id, based on the namespace hash and answer count; older saved ids remain usable.
getGraph() and getGraphAsync() now list a ToolNode's tool names under the __tools node metadata key, allowing graph viewers to show which tools it runs.
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.
Public stream chunks remain three-element tuples; checkpoint envelopes are emitted separately before paired values chunks.
Runtime serverInfo now reads assistant_id and graph_id from config.configurable first, falling back to config.metadata for compatibility.
Tracer metadata defaults are now propagated from configurable.
Adds a browser condition to the package root export so browser bundlers resolve to web.js instead of pulling in node:async_hooks; web.ts also exports interrupt, writer, pushMessage, getStore, getWriter, getConfig, getPreviousState, and getCurrentTaskInput.
The default recursion limit is 10,007 steps starting in version 1.1.4.
Channels become part of the public API, allowing users to customize checkpointing behavior per channel.
Fixes and other changes 66
Reports the result of tasks interrupted and then resumed, and preserves output as the result when a task fails after writing output; tasks still paused at an interrupt keep result: undefined.
Reports the result of tasks interrupted and then resumed, and preserves output as the result when a task fails after writing output; tasks still paused at an interrupt keep result: undefined.
Task results in tasks and debug stream modes now include the task's error, null on success, so failed tasks no longer look completed.
False and other falsy resume values now reach interrupt() instead of throwing EmptyInputError.
A task that raises several interrupts at once now keeps all of them instead of saving only the last one.
Per-node tracePolicy is restored using @langchain/core's TracePolicy; it changes only what LangChainTracer sends to LangSmith, while execution, streaming, and other callbacks see raw values.
In messages stream mode, each id-less message returned by a node gets its own id, and messages returned through Command updates are emitted in the stream.
RemoteGraph subgraph events are routed like local graph events when streamed inside a node, including propagation to the parent at every depth.
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.
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.
Remote StreamChannel emissions are forwarded as custom:<name> protocol events and normalized to custom-channel payloads, so matching subscriptions receive extension channel data consistently.
Zod schema defaults no longer overwrite checkpoint state in Command.update.
Preserves non-plain objects passed through Send and Command during argument deserialization.
Checkpoint IDs created within the same millisecond retain stable lexicographic ordering instead of depending on clockseq.
Fixes a race condition that could cause ERR_INVALID_STATE when streaming with multiple parallel nodes and aborting the stream.
Decouples the ContextType generic from configurable so a custom context type no longer incorrectly narrows the configurable parameter.
Stateful remote runs now forward context to the SDK and remove thread_id from config.configurable, allowing checkpointed runs to accept user context without an ambiguous-parameters error.
Structured response parse failures are now surfaced by createReactAgent.
Tool results are kept out of v3 message streams.
Missing types are exported to support TypeScript 6.0 declaration file compatibility.
Reverts the abort signal change that was causing problematic errors.
Returns
trueinstead offalsewhen values are received, aligning its behavior with other channel implementations.Prevents an AbortSignal listener leak by using AbortSignal.any() on Node 20+ and disposing manually managed listeners on Node 18 when the stream completes or is cancelled.
Fixes fetching subagent history in the SDK.
Fixes input JSON schema generation to merge jsonSchemaExtra.
Explicit symbol type annotations make declarations compatible when multiple versions of the package are present in a dependency tree, without changing runtime behavior.
Channel reads and writes are no longer traced.
The metadata registry now preserves and retrieves langgraph_type metadata when using Zod v4’s .register() method with MessagesZodMeta, enabling LangSmith Studio tab detection.
getJsonSchema() now includes jsonSchemaExtra, such as langgraph_type: "messages", even when the underlying schema does not produce a JSON schema.
Fixes type rejection for ConditionalEdgeRouter.
Fixed type inference for StateSchema and ReducedValue, improving inferred types when using these APIs.
Checks reducer reference equality before throwing the “Channel already exists with a different type” error.
Zod interop was improved, which may affect how developers use Zod with LangGraph.
Zod interop was improved, which may affect how developers use Zod with LangGraph.
Exports the previously missing CommandInstance symbol.
Exports the previously missing CommandParams symbol.
Fixes stateKey being ignored when RunnableConfig is automatically inherited.
Fixes the type issue when defining interrupt and writer in a StateGraph constructor with Annotation.Root.
@langchain/langgraph 0.112 changes
New APIs and options 12
Adds an endpoint to retrieve a model price entry used by the workspace, including custom, organization, and LangSmith default entries.
Adds a POST endpoint to attach an existing organization access policy to a team, optionally limiting an organization-wide team's policy to a workspace.
Adds an endpoint to grant an organization-wide team a workspace role, requiring role_id and workspace_id and organization:teams:manage-grants permission.
Adds an endpoint to attach an existing access policy to a user group. The request requires access_policy_id and optionally accepts workspace_id to limit an organization-wide group’s policy to one workspace.
Adds an endpoint to list a user group's access policies, with cursor-based pagination and organization- or workspace-scoped read permissions.
Adds a POST endpoint to grant an organization-wide user group a workspace role, using role_id and workspace_id; requires organization:user-groups:manage-grants.
Adds a PATCH endpoint to change an organization-wide user group's role in a workspace. It requires organization:user-groups:manage-grants and a role_id in the request body.
Adds a GET endpoint that returns the organization's default monthly trace limit for workspaces.
Adds a query parameter to include run statistics in the tracing-project response; it defaults to false.
Gets an organization-wide team's grant in one workspace. Requires organization:teams:read or workspaces:teams:read in the workspace and returns the grant's role and workspace identifiers with timestamps.
Adds an endpoint to retrieve one user group in an organization; access requires organization- or workspace-scoped read permission.
Gets an organization-wide user group's grant in one workspace, returning its role and workspace details. Requires organization:user-groups:read or workspaces:user-groups:read in the workspace.