DIFY conditional branch bug #13272

Closed
opened 2026-02-21 19:11:22 -05:00 by yindo · 3 comments
Owner

Originally created by @xiewentu on GitHub (Apr 23, 2025).

Originally assigned to: @Nov1c444 on GitHub.

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In the DIFY conditional branch node, when multiple conditions (three or more branches) are added and different conditions lead to different paths, if there are multiple paths, only two of them will be executed, and the others will not be executed, resulting in the failure of the process execution.
As shown in the figure below, different branches will execute different next steps. The content marked in red was not executed.

Image

✔️ Expected Behavior

No response

Actual Behavior

different branches will execute different next steps. The content marked in red was not executed.

Originally created by @xiewentu on GitHub (Apr 23, 2025). Originally assigned to: @Nov1c444 on GitHub. ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version v1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce In the DIFY conditional branch node, when multiple conditions (three or more branches) are added and different conditions lead to different paths, if there are multiple paths, only two of them will be executed, and the others will not be executed, resulting in the failure of the process execution. As shown in the figure below, different branches will execute different next steps. The content marked in red was not executed. <img width="266" alt="Image" src="https://github.com/user-attachments/assets/90388eec-bf68-47ad-b98d-63e6504f71ae" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior different branches will execute different next steps. The content marked in red was not executed.
yindo added the 🐞 bug label 2026-02-21 19:11:22 -05:00
yindo closed this issue 2026-02-21 19:11:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 23, 2025):

I found a similar issue that might be relevant to your situation. In Dify version 0.15.3, there was a known problem where only one judgment node would trigger parallel operations in conditional branches, causing other nodes not to execute their parallel operations. This issue was fixed in Dify version 1.0, which resolved problems with parallel nodes not executing properly in multiple if/elif conditions [1].

In Dify version 1.2.0, parallel execution of nodes in conditional branches is managed using a thread pool, ensuring that all parallel branches are completed before proceeding. This should handle multiple conditions effectively [2].

If you're experiencing issues with only two paths executing, it might be worth checking the configuration of your conditional branches and ensuring that all conditions are correctly set up to trigger the intended paths. Additionally, verify that there are no limitations or errors in the workflow configuration that might prevent certain branches from executing.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 23, 2025): <!-- Answer --> I found a similar issue that might be relevant to your situation. In Dify version 0.15.3, there was a known problem where only one judgment node would trigger parallel operations in conditional branches, causing other nodes not to execute their parallel operations. This issue was fixed in Dify version 1.0, which resolved problems with parallel nodes not executing properly in multiple if/elif conditions <sup>[[1]](https://github.com/langgenius/dify/issues/11542)</sup>. In Dify version 1.2.0, parallel execution of nodes in conditional branches is managed using a thread pool, ensuring that all parallel branches are completed before proceeding. This should handle multiple conditions effectively <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/workflow/graph_engine/graph_engine.py)</sup>. If you're experiencing issues with only two paths executing, it might be worth checking the configuration of your conditional branches and ensuring that all conditions are correctly set up to trigger the intended paths. Additionally, verify that there are no limitations or errors in the workflow configuration that might prevent certain branches from executing. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6a57f951-c470-4395-b778-f6ac6f825a84?feedback_type=other)</sup>
Author
Owner

@ACAne0320 commented on GitHub (Apr 23, 2025):

same #18233 #15012

@ACAne0320 commented on GitHub (Apr 23, 2025): same #18233 #15012
Author
Owner

@dosubot[bot] commented on GitHub (Aug 23, 2025):

Hi, @xiewentu. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a bug in DIFY v1.2.0 where conditional branch nodes with three or more conditions only execute two branches, skipping some paths.
  • A contributor referenced a similar issue fixed in version 1.0 related to parallel execution in conditional branches and suggested checking branch configurations and workflow setup.
  • Another user pointed out this might be related to or the same as previously reported issues #18233 and #15012.
  • No resolution or fix has been posted yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 23, 2025): Hi, @xiewentu. 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 a bug in DIFY v1.2.0 where conditional branch nodes with three or more conditions only execute two branches, skipping some paths. - A contributor referenced a similar issue fixed in version 1.0 related to parallel execution in conditional branches and suggested checking branch configurations and workflow setup. - Another user pointed out this might be related to or the same as previously reported issues #18233 and #15012. - No resolution or fix has been posted yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - 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#13272