Streaming output fails in workflows with multiple conditional branches joining into a single node #15514

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

Originally created by @xuzijie1995 on GitHub (Jul 20, 2025).

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

Cloud or Self Hosted

Self Hosted (Source), Cloud

Steps to reproduce

  1. Create a simple workflow that demonstrates streaming output works correctly. For example:
    Start -> LLM -> Answer

https://github.com/user-attachments/assets/f44ef2ea-aac0-446e-883e-98b022afd831

  1. Create a more complex workflow with a "join point" where multiple, mutually exclusive conditional branches merge into a single node before reaching the LLM. The DSL for this workflow is provided below.
click to see dsl ```yaml app: description: '' icon: bust_in_silhouette icon_background: '#FFEAD5' mode: advanced-chat name: streaming-output use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.20@aff2eaf766b1774519c3ca0e77de0b28c87b71cce6390b22a103518e8a5e4ae7 kind: app version: 0.3.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_size_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: false sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e-1739331783225-target selected: false source: '17478179614980' sourceHandle: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-a8eb533e-47cb-4b08-8fba-79ddf56c9205-1739331783225-target selected: false source: '17478179614980' sourceHandle: a8eb533e-47cb-4b08-8fba-79ddf56c9205 target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-3b488a38-cd79-47de-bc82-891ac26d306d-1739331783225-target selected: false source: '17478179614980' sourceHandle: 3b488a38-cd79-47de-bc82-891ac26d306d target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: if-else id: 1739331819887-source-17478179614980-target selected: false source: '1739331819887' sourceHandle: source target: '17478179614980' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: answer id: 1751260836243-source-1751261031942-target selected: false source: '1751260836243' sourceHandle: source target: '1751261031942' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: start targetType: code id: 1739323876498-source-1752547096842-target selected: false source: '1739323876498' sourceHandle: source target: '1752547096842' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: if-else id: 1752547096842-source-1752141670130-target selected: false source: '1752547096842' sourceHandle: source target: '1752141670130' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: llm id: 1752550692259-source-1751260836243-target selected: false source: '1752550692259' sourceHandle: source target: '1751260836243' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-false-1739331819887-target source: '1752141670130' sourceHandle: 'false' target: '1739331819887' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1739331783225-08f5a650-3b35-4fde-ae74-e3ef7d7b964d-1752550692259-target source: '1739331783225' sourceHandle: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d target: '1752550692259' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-54dd83f8-c236-4c17-8457-f3d1f5e79828-1739331819887-target source: '1752141670130' sourceHandle: 54dd83f8-c236-4c17-8457-f3d1f5e79828 target: '1739331819887' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-true-1752550692259-target source: '1752141670130' sourceHandle: 'true' target: '1752550692259' targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: [] height: 54 id: '1739323876498' position: x: 30 y: 351 positionAbsolute: x: 30 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e conditions: - comparison_operator: is id: 3f7df8dd-a8d3-4c10-b8fd-c384538216ad value: mockScene6 varType: string variable_selector: - '1739331819887' - className id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e logical_operator: and - case_id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 conditions: - comparison_operator: is id: 0198dcf5-3583-4673-943e-917138e1ef8f value: mockScene2 varType: string variable_selector: - '1739331819887' - className id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 logical_operator: and - case_id: a288daea-5452-475a-82ac-106a058543c8 conditions: - comparison_operator: is id: 438f7e5e-98e3-42bc-9b74-786402f4f443 value: mockScene3 varType: string variable_selector: - '1739331819887' - className id: a288daea-5452-475a-82ac-106a058543c8 logical_operator: and - case_id: c86d4bf7-117a-4338-bc53-a70ebde61d35 conditions: - comparison_operator: is id: 581cfc67-8584-4328-ae81-2270ba6234c7 value: mockScene4 varType: string variable_selector: - '1739331819887' - className id: c86d4bf7-117a-4338-bc53-a70ebde61d35 logical_operator: and - case_id: 3e148dde-a4d0-4aec-87c9-b42269d8ca71 conditions: - comparison_operator: is id: d6a6fdef-6f96-4657-bbe2-faa3afd6764f value: mockScene5 varType: string variable_selector: - '1739331819887' - className id: 3e148dde-a4d0-4aec-87c9-b42269d8ca71 logical_operator: and - case_id: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d conditions: - comparison_operator: is id: e98a00bf-da5c-41f8-b89a-a03b3e9eacc4 value: mockScene1 varType: string variable_selector: - '1739331819887' - className id: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d logical_operator: or desc: '' selected: false title: IF/ELSE 3 type: if-else height: 366 id: '1739331783225' position: x: 2019.7142857142858 y: -53.57142857142858 positionAbsolute: x: 2019.7142857142858 y: -53.57142857142858 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "function main() {\n \n return {\n className: \"mockScene1\"\ ,\n query: \"\",\n userLevel: \"\"\n }\n}" code_language: javascript desc: '' outputs: className: children: null type: string query: children: null type: string userLevel: children: null type: string selected: false title: do some thing type: code variables: - value_selector: - sys - query variable: defaultQuery height: 54 id: '1739331819887' position: x: 1123.0784496133235 y: 180.2155669185567 positionAbsolute: x: 1123.0784496133235 y: 180.2155669185567 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e conditions: - comparison_operator: is id: 3f7df8dd-a8d3-4c10-b8fd-c384538216ad value: '1' varType: string variable_selector: - '1739331819887' - userLevel id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e logical_operator: and - case_id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 conditions: - comparison_operator: is not id: 0198dcf5-3583-4673-943e-917138e1ef8f value: '1' varType: string variable_selector: - '1739331819887' - userLevel - comparison_operator: is id: d4a5aab8-4779-496a-96ed-048833de09ff value: mockScene1 varType: string variable_selector: - '1739331819887' - className id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 logical_operator: and - case_id: 3b488a38-cd79-47de-bc82-891ac26d306d conditions: - comparison_operator: is not id: 0e8dca65-24ff-411c-80c3-27733ade50d9 value: '1' varType: string variable_selector: - '1739331819887' - userLevel - comparison_operator: is id: 01a02dca-3c79-4f23-9a13-9e91f6e4c014 value: mockScene2 varType: string variable_selector: - '1739331819887' - className id: 3b488a38-cd79-47de-bc82-891ac26d306d logical_operator: and desc: '' selected: false title: IF/ELSE 2 type: if-else height: 274 id: '17478179614980' position: x: 1474.7142857142858 y: -33.28571428571435 positionAbsolute: x: 1474.7142857142858 y: -33.28571428571435 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: LLM memory: query_prompt_template: '{{#sys.query#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 50 model: completion_params: max_tokens: 4001 mode: chat name: V3 provider: langgenius/volcengine_maas/volcengine_maas prompt_config: jinja2_variables: [] prompt_template: - edition_type: basic id: 63fc7aae-ad06-4a4e-a934-b627402f8982 jinja2_text: '' role: system text: 每次分享一个800字长故事 selected: false title: LLM type: llm variables: [] vision: enabled: false height: 118 id: '1751260836243' position: x: 2735.961956497308 y: 655 positionAbsolute: x: 2735.961956497308 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#1751260836243.text#}}' desc: '' selected: false title: answer type: answer variables: [] height: 105 id: '1751261031942' position: x: 3171.628164003118 y: 655 positionAbsolute: x: 3171.628164003118 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: 'true' conditions: - comparison_operator: is id: 75e34625-e1fa-4f7a-a420-fdc0ce70dec4 value: '3' varType: string variable_selector: - '1752547096842' - scene id: 'true' logical_operator: and - case_id: 54dd83f8-c236-4c17-8457-f3d1f5e79828 conditions: - comparison_operator: is id: bd20918c-5814-4bf8-84dd-836185e07e98 value: '2' varType: string variable_selector: - '1752547096842' - scene id: 54dd83f8-c236-4c17-8457-f3d1f5e79828 logical_operator: or desc: '' selected: false title: IF/ELSE 1 type: if-else height: 174 id: '1752141670130' position: x: 698 y: 351 positionAbsolute: x: 698 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "\ndef main() -> dict:\n return {\n \"scene\": \"1\",\n \ \ }\n" code_language: python3 desc: '' outputs: scene: children: null type: string selected: false title: input type: code variables: [] height: 54 id: '1752547096842' position: x: 364 y: 351 positionAbsolute: x: 364 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "\ndef main() -> dict:\n return {\n \n }\n" code_language: python3 desc: '' outputs: {} selected: false title: code type: code variables: [] height: 54 id: '1752550692259' position: x: 2398 y: 655 positionAbsolute: x: 2398 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: -116.4813884982866 y: 90.27057728423529 zoom: 0.49080432495057275 ```
  1. Run the complex workflow. Ensure the execution path passes through the join point.

https://github.com/user-attachments/assets/8251fca8-f4c9-46d6-9ff3-ee35fd84a64c

✔️ Expected Behavior

The Answer node should stream the response from the LLM in real-time with a typewriter effect, just as it does in the simple workflow. The complexity of the upstream graph topology should not affect the streaming capability of the final nodes.

Actual Behavior

The streaming output is completely blocked. The Answer node's output only appears all at once after the entire LLM node has finished its generation, defeating the purpose of streaming. This creates a poor user experience and limits the ability to build complex, reusable workflows.

Originally created by @xuzijie1995 on GitHub (Jul 20, 2025). ### 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.6.0 ### Cloud or Self Hosted Self Hosted (Source), Cloud ### Steps to reproduce 1. **Create a simple workflow** that demonstrates streaming output works correctly. For example: `Start` -> `LLM` -> `Answer` https://github.com/user-attachments/assets/f44ef2ea-aac0-446e-883e-98b022afd831 2. **Create a more complex workflow** with a "join point" where multiple, mutually exclusive conditional branches merge into a single node before reaching the LLM. The DSL for this workflow is provided below. <details> <summary>click to see dsl</summary> ```yaml app: description: '' icon: bust_in_silhouette icon_background: '#FFEAD5' mode: advanced-chat name: streaming-output use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.20@aff2eaf766b1774519c3ca0e77de0b28c87b71cce6390b22a103518e8a5e4ae7 kind: app version: 0.3.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_size_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: false sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e-1739331783225-target selected: false source: '17478179614980' sourceHandle: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-a8eb533e-47cb-4b08-8fba-79ddf56c9205-1739331783225-target selected: false source: '17478179614980' sourceHandle: a8eb533e-47cb-4b08-8fba-79ddf56c9205 target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: if-else targetType: if-else id: 17478179614980-3b488a38-cd79-47de-bc82-891ac26d306d-1739331783225-target selected: false source: '17478179614980' sourceHandle: 3b488a38-cd79-47de-bc82-891ac26d306d target: '1739331783225' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: if-else id: 1739331819887-source-17478179614980-target selected: false source: '1739331819887' sourceHandle: source target: '17478179614980' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: answer id: 1751260836243-source-1751261031942-target selected: false source: '1751260836243' sourceHandle: source target: '1751261031942' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: start targetType: code id: 1739323876498-source-1752547096842-target selected: false source: '1739323876498' sourceHandle: source target: '1752547096842' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: if-else id: 1752547096842-source-1752141670130-target selected: false source: '1752547096842' sourceHandle: source target: '1752141670130' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: llm id: 1752550692259-source-1751260836243-target selected: false source: '1752550692259' sourceHandle: source target: '1751260836243' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-false-1739331819887-target source: '1752141670130' sourceHandle: 'false' target: '1739331819887' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1739331783225-08f5a650-3b35-4fde-ae74-e3ef7d7b964d-1752550692259-target source: '1739331783225' sourceHandle: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d target: '1752550692259' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-54dd83f8-c236-4c17-8457-f3d1f5e79828-1739331819887-target source: '1752141670130' sourceHandle: 54dd83f8-c236-4c17-8457-f3d1f5e79828 target: '1739331819887' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: code id: 1752141670130-true-1752550692259-target source: '1752141670130' sourceHandle: 'true' target: '1752550692259' targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: [] height: 54 id: '1739323876498' position: x: 30 y: 351 positionAbsolute: x: 30 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e conditions: - comparison_operator: is id: 3f7df8dd-a8d3-4c10-b8fd-c384538216ad value: mockScene6 varType: string variable_selector: - '1739331819887' - className id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e logical_operator: and - case_id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 conditions: - comparison_operator: is id: 0198dcf5-3583-4673-943e-917138e1ef8f value: mockScene2 varType: string variable_selector: - '1739331819887' - className id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 logical_operator: and - case_id: a288daea-5452-475a-82ac-106a058543c8 conditions: - comparison_operator: is id: 438f7e5e-98e3-42bc-9b74-786402f4f443 value: mockScene3 varType: string variable_selector: - '1739331819887' - className id: a288daea-5452-475a-82ac-106a058543c8 logical_operator: and - case_id: c86d4bf7-117a-4338-bc53-a70ebde61d35 conditions: - comparison_operator: is id: 581cfc67-8584-4328-ae81-2270ba6234c7 value: mockScene4 varType: string variable_selector: - '1739331819887' - className id: c86d4bf7-117a-4338-bc53-a70ebde61d35 logical_operator: and - case_id: 3e148dde-a4d0-4aec-87c9-b42269d8ca71 conditions: - comparison_operator: is id: d6a6fdef-6f96-4657-bbe2-faa3afd6764f value: mockScene5 varType: string variable_selector: - '1739331819887' - className id: 3e148dde-a4d0-4aec-87c9-b42269d8ca71 logical_operator: and - case_id: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d conditions: - comparison_operator: is id: e98a00bf-da5c-41f8-b89a-a03b3e9eacc4 value: mockScene1 varType: string variable_selector: - '1739331819887' - className id: 08f5a650-3b35-4fde-ae74-e3ef7d7b964d logical_operator: or desc: '' selected: false title: IF/ELSE 3 type: if-else height: 366 id: '1739331783225' position: x: 2019.7142857142858 y: -53.57142857142858 positionAbsolute: x: 2019.7142857142858 y: -53.57142857142858 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "function main() {\n \n return {\n className: \"mockScene1\"\ ,\n query: \"\",\n userLevel: \"\"\n }\n}" code_language: javascript desc: '' outputs: className: children: null type: string query: children: null type: string userLevel: children: null type: string selected: false title: do some thing type: code variables: - value_selector: - sys - query variable: defaultQuery height: 54 id: '1739331819887' position: x: 1123.0784496133235 y: 180.2155669185567 positionAbsolute: x: 1123.0784496133235 y: 180.2155669185567 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e conditions: - comparison_operator: is id: 3f7df8dd-a8d3-4c10-b8fd-c384538216ad value: '1' varType: string variable_selector: - '1739331819887' - userLevel id: ad676c61-8ad7-4ebd-ba9e-ccebe3d47d2e logical_operator: and - case_id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 conditions: - comparison_operator: is not id: 0198dcf5-3583-4673-943e-917138e1ef8f value: '1' varType: string variable_selector: - '1739331819887' - userLevel - comparison_operator: is id: d4a5aab8-4779-496a-96ed-048833de09ff value: mockScene1 varType: string variable_selector: - '1739331819887' - className id: a8eb533e-47cb-4b08-8fba-79ddf56c9205 logical_operator: and - case_id: 3b488a38-cd79-47de-bc82-891ac26d306d conditions: - comparison_operator: is not id: 0e8dca65-24ff-411c-80c3-27733ade50d9 value: '1' varType: string variable_selector: - '1739331819887' - userLevel - comparison_operator: is id: 01a02dca-3c79-4f23-9a13-9e91f6e4c014 value: mockScene2 varType: string variable_selector: - '1739331819887' - className id: 3b488a38-cd79-47de-bc82-891ac26d306d logical_operator: and desc: '' selected: false title: IF/ELSE 2 type: if-else height: 274 id: '17478179614980' position: x: 1474.7142857142858 y: -33.28571428571435 positionAbsolute: x: 1474.7142857142858 y: -33.28571428571435 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: LLM memory: query_prompt_template: '{{#sys.query#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 50 model: completion_params: max_tokens: 4001 mode: chat name: V3 provider: langgenius/volcengine_maas/volcengine_maas prompt_config: jinja2_variables: [] prompt_template: - edition_type: basic id: 63fc7aae-ad06-4a4e-a934-b627402f8982 jinja2_text: '' role: system text: 每次分享一个800字长故事 selected: false title: LLM type: llm variables: [] vision: enabled: false height: 118 id: '1751260836243' position: x: 2735.961956497308 y: 655 positionAbsolute: x: 2735.961956497308 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#1751260836243.text#}}' desc: '' selected: false title: answer type: answer variables: [] height: 105 id: '1751261031942' position: x: 3171.628164003118 y: 655 positionAbsolute: x: 3171.628164003118 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: cases: - case_id: 'true' conditions: - comparison_operator: is id: 75e34625-e1fa-4f7a-a420-fdc0ce70dec4 value: '3' varType: string variable_selector: - '1752547096842' - scene id: 'true' logical_operator: and - case_id: 54dd83f8-c236-4c17-8457-f3d1f5e79828 conditions: - comparison_operator: is id: bd20918c-5814-4bf8-84dd-836185e07e98 value: '2' varType: string variable_selector: - '1752547096842' - scene id: 54dd83f8-c236-4c17-8457-f3d1f5e79828 logical_operator: or desc: '' selected: false title: IF/ELSE 1 type: if-else height: 174 id: '1752141670130' position: x: 698 y: 351 positionAbsolute: x: 698 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "\ndef main() -> dict:\n return {\n \"scene\": \"1\",\n \ \ }\n" code_language: python3 desc: '' outputs: scene: children: null type: string selected: false title: input type: code variables: [] height: 54 id: '1752547096842' position: x: 364 y: 351 positionAbsolute: x: 364 y: 351 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: code: "\ndef main() -> dict:\n return {\n \n }\n" code_language: python3 desc: '' outputs: {} selected: false title: code type: code variables: [] height: 54 id: '1752550692259' position: x: 2398 y: 655 positionAbsolute: x: 2398 y: 655 selected: false sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: -116.4813884982866 y: 90.27057728423529 zoom: 0.49080432495057275 ``` </details> 3. **Run the complex workflow**. Ensure the execution path passes through the join point. https://github.com/user-attachments/assets/8251fca8-f4c9-46d6-9ff3-ee35fd84a64c ### ✔️ Expected Behavior The Answer node should stream the response from the LLM in real-time with a typewriter effect, just as it does in the simple workflow. The complexity of the upstream graph topology should not affect the streaming capability of the final nodes. ### ❌ Actual Behavior The streaming output is completely blocked. The Answer node's output only appears all at once after the entire LLM node has finished its generation, defeating the purpose of streaming. This creates a poor user experience and limits the ability to build complex, reusable workflows.
yindo added the 🌊 feat:workflow label 2026-02-21 19:22:05 -05:00
yindo closed this issue 2026-02-21 19:22:05 -05:00
Author
Owner

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

This is a known architectural limitation in Dify 1.6.0. When multiple mutually-exclusive conditional branches join into a single node, the streaming output is blocked because the workflow engine waits for all possible dependencies of the answer node to be resolved—even if only one branch is actually active. This conservative dependency tracking means streaming is held back at join points, so the output appears all at once after upstream computation finishes.

There are ongoing efforts to address this. For example, PR #19552 targets a related bug where nodes required for streaming are removed after a common prerequisite branch node is executed, which affects LLM stream output. The codebase also contains comments and FIXME notes referencing this limitation and related issues (#11542, #9560, #10638, #10564), indicating that a more robust solution is needed for handling join points in streaming workflows.

These fixes are not included in 1.6.0. To track progress or benefit from improvements, keep an eye on the referenced PRs and consider upgrading when a release includes these changes. There is no simple configuration workaround at this time, but restructuring your workflow to avoid join points (where possible) may help as a temporary measure.

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 20, 2025): <!-- Answer --> This is a known architectural limitation in Dify 1.6.0. When multiple mutually-exclusive conditional branches join into a single node, the streaming output is blocked because the workflow engine waits for all possible dependencies of the answer node to be resolved—even if only one branch is actually active. This conservative dependency tracking means streaming is held back at join points, so the output appears all at once after upstream computation finishes. There are ongoing efforts to address this. For example, [PR #19552](https://github.com/langgenius/dify/pull/19552) targets a related bug where nodes required for streaming are removed after a common prerequisite branch node is executed, which affects LLM stream output. The codebase also contains comments and FIXME notes referencing this limitation and related issues (#11542, #9560, #10638, #10564), indicating that a more robust solution is needed for handling join points in streaming workflows. These fixes are not included in 1.6.0. To track progress or benefit from improvements, keep an eye on the referenced PRs and consider upgrading when a release includes these changes. There is no simple configuration workaround at this time, but restructuring your workflow to avoid join points (where possible) may help as a temporary measure. <!-- 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/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/33fbb57c-ae61-4151-99bd-67d8d2538ec9?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/22686)
Author
Owner

@xuzijie1995 commented on GitHub (Sep 9, 2025):

This issue was opened at version 1.6.1 and was put on hold as I couldn't balance passing all test cases at that time. After going through iterations to 1.8.1, I found that many key processes have been improved, and subsequent PRs have been made for the still-existing streaming problems.

@xuzijie1995 commented on GitHub (Sep 9, 2025): This issue was opened at version 1.6.1 and was put on hold as I couldn't balance passing all test cases at that time. After going through iterations to 1.8.1, I found that many key processes have been improved, and subsequent PRs have been made for the still-existing streaming problems.
Author
Owner

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

@crazywoola The user has provided an update that since version 1.6.1, improvements have been made up to 1.8.1 with several PRs addressing streaming issues. Could you please assist them further with this ongoing streaming problem?

@dosubot[bot] commented on GitHub (Sep 9, 2025): @crazywoola The user has provided an update that since version 1.6.1, improvements have been made up to 1.8.1 with several PRs addressing streaming issues. Could you please assist them further with this ongoing streaming problem?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15514