Conditional branch node execution error #15462

Closed
opened 2026-02-21 19:21:51 -05:00 by yindo · 14 comments
Owner

Originally created by @pepsile on GitHub (Jul 17, 2025).

Originally assigned to: @laipz8200, @Nov1c444 on GitHub.

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.5.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The conditional branch should execute the LLM node, but it doesn't actually run.

✔️ Expected Behavior

It seems that the LLM request classification node should be executed, and I have observed that the processing of the conditional node has been successful, but it has not been executed further.

Actual Behavior

It seems that the LLM request classification node should be executed, and I have observed that the processing of the conditional node has been successful, but it has not been executed further.
Image

Originally created by @pepsile on GitHub (Jul 17, 2025). Originally assigned to: @laipz8200, @Nov1c444 on GitHub. ### 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.5.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The conditional branch should execute the LLM node, but it doesn't actually run. ### ✔️ Expected Behavior It seems that the LLM request classification node should be executed, and I have observed that the processing of the conditional node has been successful, but it has not been executed further. ### ❌ Actual Behavior It seems that the LLM request classification node should be executed, and I have observed that the processing of the conditional node has been successful, but it has not been executed further. <img width="1885" height="815" alt="Image" src="https://github.com/user-attachments/assets/7a738e7d-569e-453c-acfd-640650fcc3e4" />
yindo closed this issue 2026-02-21 19:21:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 17, 2025):

This issue often happens if the conditional branch node's selected case ID doesn't match the outgoing edge handle to the LLM node, or if required variables for the LLM node are missing or misconfigured. In Dify, after a conditional node runs, the workflow engine uses the selected case ID to determine which edge (and thus which next node) to execute. If the edge handle doesn't match, or if the LLM node can't find its required inputs, execution will silently stop without an obvious error message (source).

To troubleshoot:

  1. Double-check that the outgoing edge from your conditional node uses the exact case ID produced by the condition as its handle.
  2. Make sure all variables referenced in your LLM node's prompt template are available and correctly mapped from previous nodes.
  3. Review your workflow's node IDs and edge mappings for typos or mismatches.
  4. Check your Docker logs for any silent errors or stack traces that might give more clues.

Recent Dify versions include fixes for similar node execution and chaining bugs, so if possible, consider upgrading. If the problem persists, sharing your workflow JSON and any relevant logs would help pinpoint the issue.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 17, 2025): <!-- Answer --> This issue often happens if the conditional branch node's selected case ID doesn't match the outgoing edge handle to the LLM node, or if required variables for the LLM node are missing or misconfigured. In Dify, after a conditional node runs, the workflow engine uses the selected case ID to determine which edge (and thus which next node) to execute. If the edge handle doesn't match, or if the LLM node can't find its required inputs, execution will silently stop without an obvious error message ([source](https://github.com/langgenius/dify/blob/a4ef9009167ed7cf22b0b8bd3a903e8ba0a74567/api/core/workflow/graph_engine/graph_engine.py)). To troubleshoot: 1. Double-check that the outgoing edge from your conditional node uses the exact case ID produced by the condition as its handle. 2. Make sure all variables referenced in your LLM node's prompt template are available and correctly mapped from previous nodes. 3. Review your workflow's node IDs and edge mappings for typos or mismatches. 4. Check your Docker logs for any silent errors or stack traces that might give more clues. Recent Dify versions include fixes for similar node execution and chaining bugs, so if possible, consider upgrading. If the problem persists, sharing your workflow JSON and any relevant logs would help pinpoint the issue. <!-- 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/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=other)</sup>&nbsp;&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/22569)
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

I am certain that all the variables in my LLM node are accessible.

Image
@pepsile commented on GitHub (Jul 17, 2025): I am certain that all the variables in my LLM node are accessible. <img width="2300" height="412" alt="Image" src="https://github.com/user-attachments/assets/cb640293-ccf4-48b9-a5eb-e647638bd8ef" />
Author
Owner

@crazywoola commented on GitHub (Jul 17, 2025):

Please upgrade to v1.6.0 to see if this persists.

https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20assignee%3ANov1c444

Related issues.

@crazywoola commented on GitHub (Jul 17, 2025): Please upgrade to v1.6.0 to see if this persists. https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20assignee%3ANov1c444 Related issues.
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

请升级到 v1.6.0 以查看此问题是否仍然存在。

https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20assignee%3ANov1c444

相关问题。
已经升级了,还是有问题

Image
@pepsile commented on GitHub (Jul 17, 2025): > 请升级到 v1.6.0 以查看此问题是否仍然存在。 > > https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20assignee%3ANov1c444 > > 相关问题。 已经升级了,还是有问题 <img width="2101" height="1012" alt="Image" src="https://github.com/user-attachments/assets/62479f51-15cf-484a-9bd0-19108f64e2cd" />
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

This issue often happens if the conditional branch node's selected case ID doesn't match the outgoing edge handle to the LLM node, or if required variables for the LLM node are missing or misconfigured. In Dify, after a conditional node runs, the workflow engine uses the selected case ID to determine which edge (and thus which next node) to execute. If the edge handle doesn't match, or if the LLM node can't find its required inputs, execution will silently stop without an obvious error message (source).

To troubleshoot:

  1. Double-check that the outgoing edge from your conditional node uses the exact case ID produced by the condition as its handle.
  2. Make sure all variables referenced in your LLM node's prompt template are available and correctly mapped from previous nodes.
  3. Review your workflow's node IDs and edge mappings for typos or mismatches.
  4. Check your Docker logs for any silent errors or stack traces that might give more clues.

Recent Dify versions include fixes for similar node execution and chaining bugs, so if possible, consider upgrading. If the problem persists, sharing your workflow JSON and any relevant logs would help pinpoint the issue.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

I am certain that all the variables in my LLM node are accessible.

@pepsile commented on GitHub (Jul 17, 2025): > This issue often happens if the conditional branch node's selected case ID doesn't match the outgoing edge handle to the LLM node, or if required variables for the LLM node are missing or misconfigured. In Dify, after a conditional node runs, the workflow engine uses the selected case ID to determine which edge (and thus which next node) to execute. If the edge handle doesn't match, or if the LLM node can't find its required inputs, execution will silently stop without an obvious error message ([source](https://github.com/langgenius/dify/blob/a4ef9009167ed7cf22b0b8bd3a903e8ba0a74567/api/core/workflow/graph_engine/graph_engine.py)). > > To troubleshoot: > > 1. Double-check that the outgoing edge from your conditional node uses the exact case ID produced by the condition as its handle. > 2. Make sure all variables referenced in your LLM node's prompt template are available and correctly mapped from previous nodes. > 3. Review your workflow's node IDs and edge mappings for typos or mismatches. > 4. Check your Docker logs for any silent errors or stack traces that might give more clues. > > Recent Dify versions include fixes for similar node execution and chaining bugs, so if possible, consider upgrading. If the problem persists, sharing your workflow JSON and any relevant logs would help pinpoint the issue. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c69e87dd-3183-4c36-ab1d-12a1f93c828c?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22569) I am certain that all the variables in my LLM node are accessible.
Author
Owner

@Nov1c444 commented on GitHub (Jul 17, 2025):

Could you please share the relevant DSL file?

@Nov1c444 commented on GitHub (Jul 17, 2025): Could you please share the relevant DSL file?
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

您能否分享相关的 DSL 文件?

I added a template node after the conditional branch, and it will execute the template node but not the LLM node; in other words, it can proceed further but will not execute the LLM node.
Image

@pepsile commented on GitHub (Jul 17, 2025): > 您能否分享相关的 DSL 文件? I added a template node after the conditional branch, and it will execute the template node but not the LLM node; in other words, it can proceed further but will not execute the LLM node. <img width="1191" height="682" alt="Image" src="https://github.com/user-attachments/assets/478dc9ac-e9c2-4640-b896-5686d3185ba2" />
Author
Owner

@Nov1c444 commented on GitHub (Jul 17, 2025):

Got it. I'll try to reproduce the issue.

@Nov1c444 commented on GitHub (Jul 17, 2025): Got it. I'll try to reproduce the issue.
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

明白了。我将尝试重现这个问题。
I have created a simplified version of the chatflow that reproduces the issue; how can I share the DSL file with you?
Image

@pepsile commented on GitHub (Jul 17, 2025): > 明白了。我将尝试重现这个问题。 I have created a simplified version of the chatflow that reproduces the issue; how can I share the DSL file with you? <img width="2189" height="1105" alt="Image" src="https://github.com/user-attachments/assets/781db34d-37a2-417c-8b8b-7161eac56744" />
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

明白了。我将尝试重现这个问题。我已经创建了一个简化版的聊天流来重现这个问题;如何与您共享 DSL 文件?

图像

This issue emerged after I added a conditional branch 4 to this workflow.
Image

Image
@pepsile commented on GitHub (Jul 17, 2025): > > 明白了。我将尝试重现这个问题。我已经创建了一个简化版的聊天流来重现这个问题;如何与您共享 DSL 文件? > > <img alt="图像" width="2000" height="1105" src="https://private-user-images.githubusercontent.com/120768686/467833322-781db34d-37a2-417c-8b8b-7161eac56744.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTI4MDY4NTEsIm5iZiI6MTc1MjgwNjU1MSwicGF0aCI6Ii8xMjA3Njg2ODYvNDY3ODMzMzIyLTc4MWRiMzRkLTM3YTItNDE3Yy04YjhiLTcxNjFlYWM1Njc0NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNzE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDcxOFQwMjQyMzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03OWQ4YTE3MTc0ZWYxYWUzODYyMWQ3OGU1YWZkMDIyZjhiMGVmZjkwZDE0YjJmMTJiOWYyNWViMzkxNTgyN2IyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CF5cZ_Kp_FhqcnVrAGfi6IiJZJBnr5yh2Yjoff_pZX0"> This issue emerged after I added a conditional branch 4 to this workflow. <img width="2223" height="737" alt="Image" src="https://github.com/user-attachments/assets/0dcc2a0f-5d23-40be-82b7-7d812ef78bfe" /> <img width="2065" height="874" alt="Image" src="https://github.com/user-attachments/assets/54e48459-40ab-44c3-af11-de8d478f5173" />
Author
Owner

@pepsile commented on GitHub (Jul 17, 2025):

明白了。我将尝试重现这个问题。
Similarly, if I add a code node after the conditional branch, it will execute the code node but not the LLM node.
Image

@pepsile commented on GitHub (Jul 17, 2025): > 明白了。我将尝试重现这个问题。 Similarly, if I add a code node after the conditional branch, it will execute the code node but not the LLM node. <img width="2185" height="879" alt="Image" src="https://github.com/user-attachments/assets/a06ae717-dc17-4b36-9cd0-73269be72f61" />
Author
Owner

@Nov1c444 commented on GitHub (Jul 22, 2025):

The reason for this error is that there is an LLM2 node on the executable path of the IF condition in the first conditional branch. So when the IF judgment is completed, the graph determines that LLM2 is an unreachable node and will no longer execute it. This issue is currently very difficult to fix through patching, so we are conducting a Workflow refactoring to thoroughly resolve this problem. For current usage, I recommend temporarily avoiding this issue by modifying the execution order of the Workflow.

Image Image

if_else.yml.txt

@Nov1c444 commented on GitHub (Jul 22, 2025): The reason for this error is that there is an LLM2 node on the executable path of the IF condition in the first conditional branch. So when the IF judgment is completed, the graph determines that LLM2 is an unreachable node and will no longer execute it. This issue is currently very difficult to fix through patching, so we are conducting a Workflow refactoring to thoroughly resolve this problem. For current usage, I recommend temporarily avoiding this issue by modifying the execution order of the Workflow. <img width="1112" height="632" alt="Image" src="https://github.com/user-attachments/assets/7f6e047f-bc36-4d3c-bbac-2a5968ed068c" /> <img width="1459" height="688" alt="Image" src="https://github.com/user-attachments/assets/6282fca2-0d6d-42c1-ae7a-3eb487564afe" /> [if_else.yml.txt](https://github.com/user-attachments/files/21377917/if_else.yml.txt)
Author
Owner

@dosubot[bot] commented on GitHub (Sep 1, 2025):

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

Issue Summary:

  • You reported that in Dify v1.5.0 (self-hosted via Docker), a conditional branch node executes correctly but the following LLM node does not run.
  • The workflow engine marks some LLM nodes as unreachable after conditional evaluation, causing them not to execute.
  • A full fix requires workflow refactoring, which is not yet implemented.
  • The suggested workaround is to adjust the workflow execution order.
  • Upgrading to v1.6.0 was recommended but did not resolve the issue for you.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I do not hear back within 15 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Sep 1, 2025): Hi, @pepsile. 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 v1.5.0 (self-hosted via Docker), a conditional branch node executes correctly but the following LLM node does not run. - The workflow engine marks some LLM nodes as unreachable after conditional evaluation, causing them not to execute. - A full fix requires workflow refactoring, which is not yet implemented. - The suggested workaround is to adjust the workflow execution order. - Upgrading to v1.6.0 was recommended but did not resolve the issue for you. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I do not hear back within 15 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@laipz8200 commented on GitHub (Sep 4, 2025):

You can try #24068 now, I hope it can resolve your problem.

@laipz8200 commented on GitHub (Sep 4, 2025): You can try #24068 now, I hope it can resolve your problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15462