Skip to content

fix: preserve non-plain Send args - #2409

Merged
Christian Bromann (christian-bromann) merged 6 commits into
langchain-ai:mainfrom
pragnyanramtha:pragnyan/fix-send-non-plain-objects
Jun 1, 2026
Merged

Christian Bromann (christian-bromann) merged 6 commits into
langchain-ai:mainfrom
pragnyanramtha:pragnyan/fix-send-non-plain-objects

Conversation

@pragnyanramtha

Copy link
Copy Markdown
Contributor

Summary

  • preserve non-plain object instances while deserializing Send/Command argument trees
  • keep recursive reconstruction for arrays, plain object records, serialized Command, and serialized Send payloads
  • add a regression test covering Set, Map, Date, and a custom class instance passed through Send

Fixes part of #1142.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm --filter @langchain/langgraph exec vitest run src/tests/constants.test.ts --testNamePattern "preserves non-plain objects"
  • pnpm --filter @langchain/langgraph exec vitest run src/tests/constants.test.ts
  • pnpm exec oxfmt --check libs/langgraph-core/src/constants.ts libs/langgraph-core/src/tests/constants.test.ts
  • pnpm exec oxlint libs/langgraph-core/src/constants.ts libs/langgraph-core/src/tests/constants.test.ts
  • git diff --check
  • pnpm --filter @langchain/langgraph build

Copilot AI review requested due to automatic review settings May 17, 2026 03:43
@changeset-bot

changeset-bot Bot commented May 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d406518

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@langchain/langgraph Patch
@example/ai-elements Patch
@examples/assistant-ui-claude Patch
@examples/ui-angular Patch
@examples/ui-multimodal Patch
@examples/ui-react Patch
langgraph Patch

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pkg-pr-new

pkg-pr-new Bot commented May 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@langchain/langgraph-checkpoint

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint@2409

@langchain/langgraph-checkpoint-mongodb

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint-mongodb@2409

@langchain/langgraph-checkpoint-postgres

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint-postgres@2409

@langchain/langgraph-checkpoint-redis

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint-redis@2409

@langchain/langgraph-checkpoint-sqlite

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint-sqlite@2409

@langchain/langgraph-checkpoint-validation

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-checkpoint-validation@2409

create-langgraph

npm i https://pkg.pr.new/langchain-ai/langgraphjs/create-langgraph@2409

@langchain/langgraph-api

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-api@2409

@langchain/langgraph-cli

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-cli@2409

@langchain/langgraph

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph@2409

@langchain/langgraph-cua

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-cua@2409

@langchain/langgraph-supervisor

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-supervisor@2409

@langchain/langgraph-swarm

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-swarm@2409

@langchain/langgraph-ui

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-ui@2409

@langchain/langgraph-sdk

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/langgraph-sdk@2409

@langchain/angular

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/angular@2409

@langchain/react

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/react@2409

@langchain/svelte

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/svelte@2409

@langchain/vue

npm i https://pkg.pr.new/langchain-ai/langgraphjs/@langchain/vue@2409

commit: d406518

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@christian-bromann
Christian Bromann (christian-bromann) merged commit 101b70a into langchain-ai:main Jun 1, 2026
24 checks passed
Christian Bromann (christian-bromann) pushed a commit that referenced this pull request Jun 1, 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/[email protected]

### Patch Changes

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

## @langchain/[email protected]

### Patch Changes

- [#2186](#2186)
[`26c2e32`](26c2e32)
Thanks [@jackjin1997](https://github.com/jackjin1997)! - fix: metadata
filter in list() now works by querying a plain JSON shadow copy instead
of the serialized binary blob

## @langchain/[email protected]

### Patch Changes

- [#2255](#2255)
[`e82a50b`](e82a50b)
Thanks [@leesta24](https://github.com/leesta24)! -
fix(checkpoint-postgres): move serialization outside transaction in
put()

## @langchain/[email protected]

### Patch Changes

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

## @langchain/[email protected]

### Patch Changes

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

-   Updated dependencies \[]:
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- [#1925](#1925)
[`6503319`](6503319)
Thanks [@jbrody-nexxa](https://github.com/jbrody-nexxa)! - fix(cli): add
--no-reload flag to dev command

- Updated dependencies
\[[`0125920`](0125920)]:
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- [#2037](#2037)
[`9eb478f`](9eb478f)
Thanks [@pawel-twardziak](https://github.com/pawel-twardziak)! -
Decouple `ContextType` generic from `configurable` in `PregelOptions` so
that providing a custom context type no longer incorrectly narrows the
configurable parameter.

- [#2457](#2457)
[`91a5494`](91a5494)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(langgraph): pass context with stateful RemoteGraph runs

Pop `thread_id` from run `config.configurable` and forward `context` to
the SDK so checkpointed remote runs accept user context without a 400
from ambiguous parameters. Closes
[#1922](#1922).

- [#1988](#1988)
[`6d4bf92`](6d4bf92)
Thanks [@Axadali](https://github.com/Axadali)! - Fix race condition in
IterableReadableWritableStream.push() that caused ERR_INVALID_STATE
errors when streaming with multiple parallel nodes and aborting the
stream.

- [#2409](#2409)
[`101b70a`](101b70a)
Thanks [@pragnyanramtha](https://github.com/pragnyanramtha)! - Preserve
non-plain objects passed through `Send` and `Command` argument
deserialization.

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

- Updated dependencies
\[[`863b555`](863b555),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

## @langchain/[email protected]

### Patch Changes

- [#2455](#2455)
[`863b555`](863b555)
Thanks [@JHSeo-git](https://github.com/JHSeo-git)! - fix(sdk): prefer
completed task's direct mapping over pending checkpoint's positional
guess in fetchSubagentHistory

- [#2344](#2344)
[`0125920`](0125920)
Thanks [@dependabot](https://github.com/apps/dependabot)! - chore(deps):
bump uuid to 14.0.0 and keep checkpoint ID ordering stable

Bump `uuid` from 10.x/13.x to 14.0.0 across packages. Starting with uuid
11, `v6({ clockseq })` no longer advances the sub-millisecond time
counter when an explicit `clockseq` is passed, so checkpoint IDs created
within the same millisecond were ordered only by `clockseq`. Since
checkpoint IDs are sorted lexicographically, this broke ordering — most
visibly for the negative `clockseq` used by the first ("input")
checkpoint, which sorted as the newest.

`uuid6()` now maintains its own monotonic `(msecs, nsecs)` clock
(mirroring uuid 10's internal v1 behavior) so the time component is
always strictly increasing and checkpoint ordering no longer depends on
the `clockseq` value. `emptyCheckpoint()` also uses a non-negative
`clockseq`.

## @langchain/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`0125920`](0125920)]:
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`0125920`](0125920)]:
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`0125920`](0125920)]:
    -   @langchain/[email protected]

## @langchain/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`0125920`](0125920)]:
    -   @langchain/[email protected]

## @langchain/[email protected]



## @example/[email protected]

### Patch Changes

- Updated dependencies
\[[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## @examples/[email protected]

### Patch Changes

- Updated dependencies
\[[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## @examples/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## @examples/[email protected]

### Patch Changes

- Updated dependencies
\[[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## @examples/[email protected]

### Patch Changes

- Updated dependencies
\[[`863b555`](863b555),
[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]
    -   @langchain/[email protected]
    -   @langchain/[email protected]

## [email protected]

### Patch Changes

- Updated dependencies
\[[`9eb478f`](9eb478f),
[`91a5494`](91a5494),
[`6d4bf92`](6d4bf92),
[`101b70a`](101b70a),
[`0125920`](0125920)]:
    -   @langchain/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants