[GH-ISSUE #144] InvalidUpdateError: LastValue can only receive one value per step when writing multiple files in parallel #38

Closed
opened 2026-02-16 06:16:56 -05:00 by yindo · 2 comments
Owner

Originally created by @Amedzro-Elikplim on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/144

Originally assigned to: @christian-bromann on GitHub.

When the agent attempts to write multiple files in a single step (e.g., saving both user_prompt.txt and context.txt simultaneously), the graph throws an InvalidUpdateError because the files channel is configured with a LastValue reducer.|

InvalidUpdateError: Invalid update for channel "files" with values [
{"/user_prompt.txt": {...}},
{"/context.txt": {...}}
]: LastValue can only receive one value per step.

Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE/

at Object._applyWrites (.../node_modules/@langchain/langgraph/src/pregel/algo.ts:336:32)
at PregelLoop.tick (.../node_modules/@langchain/langgraph/src/pregel/loop.ts:747:30)
at CompiledStateGraph._runLoop (.../node_modules/@langchain/langgraph/src/pregel/index.ts:2257:20)

The agent should be able to write multiple files in a single step without errors. This is a common use case when the agent needs to save related context files together for efficiency

Originally created by @Amedzro-Elikplim on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/144 Originally assigned to: @christian-bromann on GitHub. When the agent attempts to write multiple files in a single step (e.g., saving both user_prompt.txt and context.txt simultaneously), the graph throws an InvalidUpdateError because the files channel is configured with a LastValue reducer.| InvalidUpdateError: Invalid update for channel "files" with values [ {"/user_prompt.txt": {...}}, {"/context.txt": {...}} ]: LastValue can only receive one value per step. Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE/ at Object._applyWrites (.../node_modules/@langchain/langgraph/src/pregel/algo.ts:336:32) at PregelLoop.tick (.../node_modules/@langchain/langgraph/src/pregel/loop.ts:747:30) at CompiledStateGraph._runLoop (.../node_modules/@langchain/langgraph/src/pregel/index.ts:2257:20) The agent should be able to write multiple files in a single step without errors. This is a common use case when the agent needs to save related context files together for efficiency
yindo closed this issue 2026-02-16 06:16:56 -05:00
Author
Owner

@christian-bromann commented on GitHub (Jan 26, 2026):

@Amedzro-Elikplim thanks for raising the issue. We are working on updating the state definition to resolve this bug. Expected release for this bug by end of week.

@christian-bromann commented on GitHub (Jan 26, 2026): @Amedzro-Elikplim thanks for raising the issue. We are working on updating the state definition to resolve this bug. Expected release for this bug by end of week.
Author
Owner

@christian-bromann commented on GitHub (Jan 26, 2026):

Duplicate of #65

@christian-bromann commented on GitHub (Jan 26, 2026): Duplicate of #65
yindo changed title from InvalidUpdateError: LastValue can only receive one value per step when writing multiple files in parallel to [GH-ISSUE #144] InvalidUpdateError: LastValue can only receive one value per step when writing multiple files in parallel 2026-06-05 17:21:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#38