[GH-ISSUE #65] InvalidUpdateError when running research example - "LastValue can only receive one value per step #19

Closed
opened 2026-02-16 06:16:50 -05:00 by yindo · 8 comments
Owner

Originally created by @crazyyanchao on GitHub (Nov 22, 2025).
Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/65

Description:
I encountered an InvalidUpdateError when trying to run the research example at:
https://github.com/crazyyanchao/deepagentsjs/tree/main/examples/research

Error Details:

InvalidUpdateError: Invalid update for channel "todos" with values [[{"content":"保存用户原始问题到 question.txt","status":"completed"},{"content":"使用 research-agent 深入研究 '上下文工程' 的定义、历史、关键概念、应用和最佳实践。用中文研究并总结关键点,确保信息全面。","status":"completed"},{"content":"基于研究结果,撰写 final_report.md 的初稿,用中文写成结构化的 Markdown 报告,包括标题、部分、引用等。","status":"in_progress"},{"content":"使用 critique-agent 审阅 final_report.md,提供改进建议。","status":"pending"},{"content":"根据批判反馈,编辑 final_report.md 直到满意。","status":"pending"}],[{"content":"保存用户原始问题到 question.txt","status":"completed"},{"content":"使用 research-agent 深入研究 '上下文工程' 的定义、历史、关键概念、应用和最佳实践。用中文研究并总结关键点,确保信息全面。","status":"completed"},{"content":"基于研究结果,撰写 final_report.md 的初稿,用中文写成结构化的 Markdown 报告,包括标题、部分、引用等。","status":"completed"},{"content":"使用 critique-agent 审阅 final_report.md,提供改进建议。","status":"in_progress"},{"content":"根据批判反馈,编辑 final_report.md 直到满意。","status":"pending"}]]: LastValue can only receive one value per step.

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

    at StreamManager.value [as start] (http://localhost:5410/_next/static/chunks/node_modules_%40langchain_langgraph-sdk_ab843275._.js:2349:43)
    at async Object.submit (http://localhost:5410/_next/static/chunks/node_modules_%40langchain_langgraph-sdk_ab843275._.js:2870:9)

Steps to Reproduce:

  1. Navigate to the research example directory
  2. Run the example as instructed
  3. The error occurs during execution

Expected Behavior:
The research example should run successfully without InvalidUpdateError.

Actual Behavior:
The application throws an InvalidUpdateError related to the "todos" channel with multiple values being passed to a LastValue channel that only accepts one value per step.

Environment:

Additional Context:
The error suggests a concurrent graph update issue where the "todos" channel is receiving multiple values when it should only receive one value per step, violating the LastValue channel constraints.

After I modified this line of prompt, it could work normally.
Image

Originally created by @crazyyanchao on GitHub (Nov 22, 2025). Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/65 **Description:** I encountered an `InvalidUpdateError` when trying to run the research example at: https://github.com/crazyyanchao/deepagentsjs/tree/main/examples/research **Error Details:** ``` InvalidUpdateError: Invalid update for channel "todos" with values [[{"content":"保存用户原始问题到 question.txt","status":"completed"},{"content":"使用 research-agent 深入研究 '上下文工程' 的定义、历史、关键概念、应用和最佳实践。用中文研究并总结关键点,确保信息全面。","status":"completed"},{"content":"基于研究结果,撰写 final_report.md 的初稿,用中文写成结构化的 Markdown 报告,包括标题、部分、引用等。","status":"in_progress"},{"content":"使用 critique-agent 审阅 final_report.md,提供改进建议。","status":"pending"},{"content":"根据批判反馈,编辑 final_report.md 直到满意。","status":"pending"}],[{"content":"保存用户原始问题到 question.txt","status":"completed"},{"content":"使用 research-agent 深入研究 '上下文工程' 的定义、历史、关键概念、应用和最佳实践。用中文研究并总结关键点,确保信息全面。","status":"completed"},{"content":"基于研究结果,撰写 final_report.md 的初稿,用中文写成结构化的 Markdown 报告,包括标题、部分、引用等。","status":"completed"},{"content":"使用 critique-agent 审阅 final_report.md,提供改进建议。","status":"in_progress"},{"content":"根据批判反馈,编辑 final_report.md 直到满意。","status":"pending"}]]: LastValue can only receive one value per step. Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE/ at StreamManager.value [as start] (http://localhost:5410/_next/static/chunks/node_modules_%40langchain_langgraph-sdk_ab843275._.js:2349:43) at async Object.submit (http://localhost:5410/_next/static/chunks/node_modules_%40langchain_langgraph-sdk_ab843275._.js:2870:9) ``` **Steps to Reproduce:** 1. Navigate to the research example directory 2. Run the example as instructed 3. The error occurs during execution **Expected Behavior:** The research example should run successfully without InvalidUpdateError. **Actual Behavior:** The application throws an InvalidUpdateError related to the "todos" channel with multiple values being passed to a LastValue channel that only accepts one value per step. **Environment:** - Running on: localhost:5410,https://github.com/langchain-ai/deep-agents-ui - LangGraph SDK version: deepagents@^1.1.1 **Additional Context:** The error suggests a concurrent graph update issue where the "todos" channel is receiving multiple values when it should only receive one value per step, violating the LastValue channel constraints. **After I modified this line of prompt, it could work normally.** <img width="1951" height="152" alt="Image" src="https://github.com/user-attachments/assets/426c06bc-7cc8-49d0-9fc7-7d039690ee81" />
yindo added the bug label 2026-02-16 06:16:50 -05:00
yindo closed this issue 2026-02-16 06:16:50 -05:00
Author
Owner

@crazyyanchao commented on GitHub (Nov 23, 2025):

Additionally, after I started the demo program, I was unable to see the temporary subagents launched in Langsmith: general-purpose, critique-agent, research-agent. What is the reason for this?
Image

@crazyyanchao commented on GitHub (Nov 23, 2025): Additionally, after I started the demo program, I was unable to see the temporary subagents launched in Langsmith: general-purpose, critique-agent, research-agent. What is the reason for this? <img width="683" height="702" alt="Image" src="https://github.com/user-attachments/assets/a3dbb345-6c28-4543-b554-abefe6c8141a" />
Author
Owner

@janpawellek commented on GitHub (Dec 3, 2025):

I also have this issue with files. When claude-sonnet-4-20250514 calls edit_file and write_file (for different files) in one turn, this issue occurs:

Invalid update for channel "files" with values [...]: LastValue can only receive one value per step.

Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE/
] {
  lc_error_code: 'INVALID_CONCURRENT_GRAPH_UPDATE'
}
@janpawellek commented on GitHub (Dec 3, 2025): I also have this issue with `files`. When `claude-sonnet-4-20250514` calls `edit_file` and `write_file` (for different files) in one turn, this issue occurs: ``` Invalid update for channel "files" with values [...]: LastValue can only receive one value per step. Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/INVALID_CONCURRENT_GRAPH_UPDATE/ ] { lc_error_code: 'INVALID_CONCURRENT_GRAPH_UPDATE' } ```
Author
Owner

@johnsonfamily1234 commented on GitHub (Jan 1, 2026):

We're getting this today. Looks like a fix was merged in that related issue? Has that not made its way into deepagentsjs yet? We're on the most recent version but keep getting this error. It's a blocker. Anyone have any updates or workarounds?

@johnsonfamily1234 commented on GitHub (Jan 1, 2026): We're getting this today. Looks like a fix was merged in that related issue? Has that not made its way into deepagentsjs yet? We're on the most recent version but keep getting this error. It's a blocker. Anyone have any updates or workarounds?
Author
Owner

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

@johnsonfamily1234 thanks for flagging, yes this fix should have been released. Mind providing an example GitHub project that reproduces this issue? Happy to take a look.

@christian-bromann commented on GitHub (Jan 3, 2026): @johnsonfamily1234 thanks for flagging, yes this fix should have been released. Mind providing an example GitHub project that reproduces this issue? Happy to take a look.
Author
Owner

@daniel-watts-ai commented on GitHub (Jan 21, 2026):

@christian-bromann I'm able to reproduce this error with the deepagentjs research example: https://github.com/langchain-ai/deepagentsjs/tree/main/examples/research

This is a blocking issue for my team. Please let me know if there is a workaround.

@daniel-watts-ai commented on GitHub (Jan 21, 2026): @christian-bromann I'm able to reproduce this error with the `deepagentjs` research example: https://github.com/langchain-ai/deepagentsjs/tree/main/examples/research This is a blocking issue for my team. Please let me know if there is a workaround.
Author
Owner

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

We are working on updating the schema definition for all middleware in deepagents which will resolve this bug. I assume we will have a fix for this by end of week. Thanks all for your patience!

@christian-bromann commented on GitHub (Jan 26, 2026): We are working on updating the schema definition for all middleware in deepagents which will resolve this bug. I assume we will have a fix for this by end of week. Thanks all for your patience!
Author
Owner

@christian-bromann commented on GitHub (Feb 2, 2026):

@daniel-watts-ai we published a new version, can you confirm that it resolved the bug?

@christian-bromann commented on GitHub (Feb 2, 2026): @daniel-watts-ai we published a new version, can you confirm that it resolved the bug?
Author
Owner

@christian-bromann commented on GitHub (Feb 5, 2026):

I will go ahead and close this. Happy to re-open if anyone still experiences this issue. Thanks for all your input!

@christian-bromann commented on GitHub (Feb 5, 2026): I will go ahead and close this. Happy to re-open if anyone still experiences this issue. Thanks for all your input!
yindo changed title from InvalidUpdateError when running research example - "LastValue can only receive one value per step to [GH-ISSUE #65] InvalidUpdateError when running research example - "LastValue can only receive one value per step 2026-06-05 17:21:00 -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#19