fix(langgraph): recognize JSON-erased Overwrite values across runtimes#2553
Merged
Christian Bromann (christian-bromann) merged 1 commit intoJun 17, 2026
Merged
Conversation
_getOverwriteValue now also accepts the { type: "__overwrite__", value }
discriminator form produced when a typed Overwrite from another runtime
(e.g. a Python dataclass routed through the LangGraph API server) is
serialized and its type is erased, keeping Overwrite/DeltaChannel
semantics intact across cross-runtime JSON boundaries.
🦋 Changeset detectedLatest commit: cdc582d The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@langchain/langgraph-checkpoint
@langchain/langgraph-checkpoint-mongodb
@langchain/langgraph-checkpoint-postgres
@langchain/langgraph-checkpoint-redis
@langchain/langgraph-checkpoint-sqlite
@langchain/langgraph-checkpoint-validation
create-langgraph
@langchain/langgraph-api
@langchain/langgraph-cli
@langchain/langgraph
@langchain/langgraph-cua
@langchain/langgraph-supervisor
@langchain/langgraph-swarm
@langchain/langgraph-ui
@langchain/langgraph-sdk
@langchain/angular
@langchain/react
@langchain/svelte
@langchain/vue
commit: |
Christian Bromann (christian-bromann)
pushed a commit
that referenced
this pull request
Jun 17, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @langchain/langgraph@1.4.4 ### Patch Changes - [#2552](#2552) [`d662cbb`](d662cbb) Thanks [@christian-bromann](https://github.com/christian-bromann)! - fix(langgraph): isolate concurrent singleton-agent invocations by thread `ensureLangGraphConfig` ignores the ambient `AsyncLocalStorage` `configurable` on root-level invokes that supply an invoke-time `thread_id` and have no nesting keys (ignoring graph-bound `.withConfig()` defaults). On a fresh top-level run the ambient `configurable` can belong to another concurrent invocation, so its keys — internal scratchpad/task-input as well as user keys like `tenant_id`/`user_id` — must not leak in; values the caller wants arrive through the explicit (bound + invoke-time) configs. Ambient nesting (`__pregel_read__`) and bound child graphs invoked from parent tasks are unaffected. This prevents cross-invocation leakage between concurrent `invoke()` calls on a shared compiled graph (e.g. BullMQ workers with `concurrency > 1`). Complements the config-merge fix that stopped shared graph-bound `metadata`/`configurable` objects from being mutated across invocations ([#2040](#2040)). - [#2553](#2553) [`1c2aa5b`](1c2aa5b) Thanks [@christian-bromann](https://github.com/christian-bromann)! - fix(langgraph): recognize JSON-erased `Overwrite` values across runtimes `Overwrite` already survives JSON serialization in JS because `Overwrite.toJSON()` emits the canonical `{ "__overwrite__": value }` sentinel. `_getOverwriteValue` now additionally recognizes the discriminator form `{ "type": "__overwrite__", value }` produced when a typed `Overwrite` from another runtime (e.g. a Python dataclass routed through the LangGraph API server) is serialized and its type is erased. This keeps `Overwrite` (and `DeltaChannel`) semantics intact across cross-runtime JSON boundaries. These delta-channel APIs remain Beta. ## @example/ai-elements@0.1.40 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 ## @examples/assistant-ui-claude@0.1.40 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 ## @examples/ui-angular@0.0.50 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 ## @examples/ui-multimodal@0.0.26 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 ## @examples/ui-react@0.0.26 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 ## langgraph@1.0.44 ### Patch Changes - Updated dependencies \[[`d662cbb`](d662cbb), [`1c2aa5b`](1c2aa5b)]: - @langchain/langgraph@1.4.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overwritealready survives JSON serialization becauseOverwrite.toJSON()emits the canonical{ "__overwrite__": value }sentinel, which_getOverwriteValuerecognizes.{ "type": "__overwrite__", value }that results when a typedOverwritefrom another runtime (notably a Python dataclass, post fix(langgraph): MakeOverwritesurvive JSON roundtrips langgraph#8127) is serialized through a JSON boundary and its type is erased._get_overwrite(instance, sentinel dict, discriminator dict), soOverwriteround-trips both directions across the JS↔Python API boundary. Delta-channel APIs remain Beta.