Skip to content

fix(langgraph): avoid rewriting unchanged parent keys#7099

Open
Alexxigang wants to merge 4 commits intolangchain-ai:mainfrom
Alexxigang:fix/parallel-subgraph-parent-keys
Open

fix(langgraph): avoid rewriting unchanged parent keys#7099
Alexxigang wants to merge 4 commits intolangchain-ai:mainfrom
Alexxigang:fix/parallel-subgraph-parent-keys

Conversation

@Alexxigang
Copy link

Description

  • Fixes a parallel execution bug where a compiled subgraph node can return its entire final state back to the parent graph.
  • When that final state includes unchanged parent-owned keys, those keys can collide with sibling parent-node updates in the same superstep and raise InvalidUpdateError.
  • Wrap subgraph-as-node execution so the parent only receives keys whose values actually changed relative to the subgraph input.
  • Adds sync and async regression tests covering the parent/subgraph parallel update case.
  • Closes GitHub Issue Title: InvalidUpdateError when using parallel subgraphs with shared state keys in LangGraph #6446

Issue

Dependencies

  • None

Twitter handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Issue Title: InvalidUpdateError when using parallel subgraphs with shared state keys in LangGraph

1 participant