The next node can't be run continuously #21576

Open
opened 2026-02-21 20:13:16 -05:00 by yindo · 3 comments
Owner

Originally created by @FyhSky on GitHub (Jan 11, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

This is a highly complex workflow with three parallel-running branches. The outputs of the three branches are fed into a code node, yet the workflow halts at this node and fails to continue execution.

✔️ Expected Behavior

workflow run continuously

Actual Behavior

No response

Originally created by @FyhSky on GitHub (Jan 11, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.7.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce This is a highly complex workflow with three parallel-running branches. The outputs of the three branches are fed into a code node, yet the workflow halts at this node and fails to continue execution. ### ✔️ Expected Behavior workflow run continuously ### ❌ Actual Behavior _No response_
yindo added the 🐞 bugstaleoutdated labels 2026-02-21 20:13:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 11, 2026):

The workflow engine only enqueues a node (like your code node) for execution when all its incoming edges are resolved—meaning each parallel branch must either complete (edge is TAKEN) or be explicitly skipped. If any upstream branch remains unresolved (edge state is UNKNOWN), the code node will not run and the workflow will halt at that point. This can happen if a branch node doesn't select an edge or if an upstream node fails to complete, causing the downstream node to wait indefinitely. The code node itself just reads its inputs from the variable pool when it becomes ready; it doesn't merge branch outputs or handle synchronization logic directly. If the code node fails during execution (for example, due to a code or output validation error), it will return a FAILED status, which also stops workflow execution unless retry is enabled. Reviewing your workflow for any stuck or failed upstream branches and checking logs for errors at the code node should help pinpoint the cause.
GraphStateManager and EdgeProcessor logic
CodeNode execution and error handling

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 11, 2026): <!-- Answer --> The workflow engine only enqueues a node (like your code node) for execution when all its incoming edges are resolved—meaning each parallel branch must either complete (edge is TAKEN) or be explicitly skipped. If any upstream branch remains unresolved (edge state is UNKNOWN), the code node will not run and the workflow will halt at that point. This can happen if a branch node doesn't select an edge or if an upstream node fails to complete, causing the downstream node to wait indefinitely. The code node itself just reads its inputs from the variable pool when it becomes ready; it doesn't merge branch outputs or handle synchronization logic directly. If the code node fails during execution (for example, due to a code or output validation error), it will return a FAILED status, which also stops workflow execution unless retry is enabled. Reviewing your workflow for any stuck or failed upstream branches and checking logs for errors at the code node should help pinpoint the cause. [GraphStateManager and EdgeProcessor logic](https://github.com/langgenius/dify/blob/9fad97ec9bc45daf2ac45a514470aa08a7362aaa/api/core/workflow/graph_engine/graph_state_manager.py#L24-L259) [CodeNode execution and error handling](https://github.com/langgenius/dify/blob/9fad97ec9bc45daf2ac45a514470aa08a7362aaa/api/core/workflow/nodes/code/code_node.py#L28-L451) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a92c686e-1a04-497c-9859-6ee64744ef96?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20workflow%20engine%20only%20enqueues%20a%20node%20%28like%20your%20code%20node%29%20for%20execution%20when%20all%20its%20incoming%20edges%20are%20resolved%E2%80%94meaning%20each%20parallel%20branch%20must%20either%20complete%20%28edge%20is%20TAKEN%29%20or%20be%20explicitly%20skipped.%20If%20any%20upstream%20branch%20remains%20unresolved%20%28edge%20state%20is%20UNKNOWN%29%2C%20the%20code%20node%20will%20not%20run%20and%20the%20workflow%20will%20halt%20at%20that%20point.%20This%20can%20happen%20if%20a%20branch%20node%20doesn%27t%20select%20an%20edge%20or%20if%20an%20upstream%20node%20fails%20to%20complete%2C%20causing%20the%20downstream%20node%20to%20wait%20indefinitely.%20The%20code%20node%20itself%20just%20reads%20its%20inputs%20from%20the%20variable%20pool%20when%20it%20becomes%20ready%3B%20it%20doesn%27t%20merge%20branch%20outputs%20or%20handle%20synchronization%20logic%20directly.%20If%20the%20code%20node%20fails%20during%20execution%20%28for%20example%2C%20due%20to%20a%20code%20or%20output%20validation%20error%29%2C%20it%20will%20return%20a%20FAILED%20status%2C%20which%20also%20stops%20workflow%20execution%20unless%20retry%20is%20enabled.%20Reviewing%20your%20workflow%20for%20any%20stuck%20or%20failed%20upstream%20branches%20and%20checking%20logs%20for%20errors%20at%20the%20code%20node%20should%20help%20pinpoint%20the%20cause.%20%20%0A%5BGraphStateManager%20and%20EdgeProcessor%20logic%5D%28https%3A//github.com/langgenius/dify/blob/9fad97ec9bc45daf2ac45a514470aa08a7362aaa/api/core/workflow/graph_engine/graph_state_manager.py%23L24-L259%29%20%20%0A%5BCodeNode%20execution%20and%20error%20handling%5D%28https%3A//github.com/langgenius/dify/blob/9fad97ec9bc45daf2ac45a514470aa08a7362aaa/api/core/workflow/nodes/code/code_node.py%23L28-L451%29)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30838)
Author
Owner

@crazywoola commented on GitHub (Jan 11, 2026):

The version seems to be outdated, I don't think we will fix this for the older version since we have already done a lot in refactoring the graph engine.

@crazywoola commented on GitHub (Jan 11, 2026): The version seems to be outdated, I don't think we will fix this for the older version since we have already done a lot in refactoring the graph engine.
Author
Owner

@dosubot[bot] commented on GitHub (Feb 12, 2026):

Hi, @FyhSky. I'm Dosu (https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Dify version 1.7.0 (Docker), a complex workflow with three parallel branches feeding into a code node halts and does not proceed.
  • The workflow engine waits for all incoming edges to resolve before executing the code node, so unresolved or failed upstream branches cause the halt.
  • It was noted that version 1.7.0 is outdated and the issue is unlikely to be fixed there due to major refactoring of the graph engine in newer versions.
  • The recommended resolution is to check for stuck branches and upgrade to a newer version where the graph engine has been improved.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of Dify, and if so, feel free to keep the discussion open by commenting here.
  • Otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 12, 2026): Hi, @FyhSky. I'm Dosu (https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify version 1.7.0 (Docker), a complex workflow with three parallel branches feeding into a code node halts and does not proceed. - The workflow engine waits for all incoming edges to resolve before executing the code node, so unresolved or failed upstream branches cause the halt. - It was noted that version 1.7.0 is outdated and the issue is unlikely to be fixed there due to major refactoring of the graph engine in newer versions. - The recommended resolution is to check for stuck branches and upgrade to a newer version where the graph engine has been improved. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of Dify, and if so, feel free to keep the discussion open by commenting here. - Otherwise, I will automatically close this issue in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21576