Out-of-order streaming events and incorrect content sequencing during parallel workflow execution #21496

Open
opened 2026-02-21 20:12:50 -05:00 by yindo · 7 comments
Owner

Originally created by @xuzijie1995 on GitHub (Jan 7, 2026).

Originally assigned to: @laipz8200 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.11.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Create a workflow with at least two LLM nodes (e.g., LLM_Think and LLM_Answer).
  2. Configure both nodes to enable Stream output.
  3. Add an Answer node that references these nodes in a specific order within its template: {{#LLM_Think.text#}} \n\n {{#LLM_Answer.text#}}.
  4. Ensure the environment is running with parallel execution enabled (GRAPH_ENGINE_MIN_WORKERS set to 2 or higher, GRAPH_ENGINE_SCALE_UP_THRESHOLD set to 1 can be helpful).
  5. Post
curl --location --request POST 'https://api.dify.ai/v1/chat-messages' \
--header 'Authorization: Bearer xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "inputs": {},
  "query": "go",
  "response_mode": "streaming",
  "conversation_id": "",
  "user": "tester"
}'

The issue occurs intermittently on Dify.ai Cloud.

Post Timeline

Click to expand
data: {"event":"workflow_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","inputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.dialogue_count":1},"created_at":1767769589}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ea0fb890-cb94-4501-ac48-fb3f89645a61","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ea0fb890-cb94-4501-ac48-fb3f89645a61","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","sys.dialogue_count":1},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","sys.dialogue_count":1},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.739761,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"cd75ce26-393a-40ba-b7d4-534b91d8a428","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"cd75ce26-393a-40ba-b7d4-534b91d8a428","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.710216,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"8827eb8c-83fc-45d8-8482-61450b5f97f9","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"c8edb184-e8eb-4b14-8fef-01e86b6a5989","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"c8edb184-e8eb-4b14-8fef-01e86b6a5989","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.3602,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"d9e44107-071d-40d7-b1c4-82087eec9c4f","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769589,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"8827eb8c-83fc-45d8-8482-61450b5f97f9","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“think content”","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":0.996,"time_to_first_token":0.939,"time_to_generate":0.057},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"think content","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":0.996,"time_to_first_token":0.939,"time_to_generate":0.057},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":1.776367,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769588,"finished_at":1767769590,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"58aae965-fb7d-4563-9481-560cb098d467","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769590,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"58aae965-fb7d-4563-9481-560cb098d467","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"think content","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.12665,"execution_metadata":null,"created_at":1767769590,"finished_at":1767769590,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"d9e44107-071d-40d7-b1c4-82087eec9c4f","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“next plan“","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":2.094,"time_to_first_token":2.037,"time_to_generate":0.057},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"next plan","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":2.094,"time_to_first_token":2.037,"time_to_generate":0.057},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":2.747746,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769589,"finished_at":1767769591,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"0a22f26d-65e7-4cde-8c78-aed388528480","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769591,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"0a22f26d-65e7-4cde-8c78-aed388528480","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":{"text":"think content"},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"think":"think content"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.140134,"execution_metadata":null,"created_at":1767769591,"finished_at":1767769592,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"31c905ca-f190-493f-b996-9d84f7e1f5ca","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769592,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"Mock","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":" answer","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"think","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":" content","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"31c905ca-f190-493f-b996-9d84f7e1f5ca","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“Mock answer”","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":1.039,"time_to_first_token":0.989,"time_to_generate":0.05},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"Mock answer","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":1.039,"time_to_first_token":0.989,"time_to_generate":0.05},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":1.443685,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769592,"finished_at":1767769593,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"eabdacaa-a4f3-4542-a68a-1a643d13c761","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769593,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"eabdacaa-a4f3-4542-a68a-1a643d13c761","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"Mock answer","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.045939,"execution_metadata":null,"created_at":1767769593,"finished_at":1767769593,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"workflow_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","status":"succeeded","outputs":{"answer":"think contentMock answer","files":[]},"error":null,"elapsed_time":4.461886,"total_tokens":69,"total_steps":9,"created_by":{"id":"288cae25-90ff-42a6-aa11-45809011f1e8","user":"tester"},"created_at":1767769589,"finished_at":1767769593,"exceptions_count":0,"files":[]}}

data: {"event":"message_end","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","metadata":{"annotation_reply":null,"retriever_resources":[],"usage":{"prompt_tokens":63,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":6,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":69,"total_price":"0","currency":"USD","latency":4.129,"time_to_first_token":5.365,"time_to_generate":0.052}},"files":[]}

DSL File

Click to expand DSL Content
app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: thinktrack
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.20@aff2eaf766b1774519c3ca0e77de0b28c87b71cce6390b22a103518e8a5e4ae7
    version: null
kind: app
version: 0.5.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_batch_limit: 10
        image_file_size_limit: 10
        single_chunk_attachment_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: true
    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:
        sourceType: llm
        targetType: answer
      id: llm-answer
      source: llm
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: code
      id: 1767663059744-source-1767663118401-target
      source: '1767663059744'
      sourceHandle: source
      target: '1767663118401'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: llm
      id: 1767663118401-source-llm-target
      source: '1767663118401'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: code
      id: 1767663118401-source-17676631639570-target
      source: '1767663118401'
      sourceHandle: source
      target: '17676631639570'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: llm
      id: 1767663118401-source-17676632864980-target
      source: '1767663118401'
      sourceHandle: source
      target: '17676632864980'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: answer
      id: 17676632797600-source-1767663359797-target
      source: '17676632797600'
      sourceHandle: source
      target: '1767663359797'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: llm
      id: 17676646910030-source-17676632797600-target
      source: '17676646910030'
      sourceHandle: source
      target: '17676632797600'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: code
      id: llm-source-17676646910030-target
      source: llm
      sourceHandle: source
      target: '17676646910030'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: code
      id: 17676632864980-source-17676646910030-target
      source: '17676632864980'
      sourceHandle: source
      target: '17676646910030'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: code
      id: 17676631639570-source-17676646910030-target
      source: '17676631639570'
      sourceHandle: source
      target: '17676646910030'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: User Input
        type: start
        variables: []
      height: 73
      id: '1767663059744'
      position:
        x: 0
        y: 180
      positionAbsolute:
        x: 0
        y: 180
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: 748a52e0-c9b6-4a84-8642-a6ca46893612
          role: system
          text: 你是一个复读机,无论提问是什么,你都只能回答“think content”
        selected: false
        title: 思考
        type: llm
        vision:
          enabled: false
      height: 88
      id: llm
      position:
        x: 704
        y: 15.714285714285708
      positionAbsolute:
        x: 704
        y: 15.714285714285708
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        answer: '{{#llm.text#}}'
        selected: false
        title: Answer
        type: answer
        variables: []
      height: 103
      id: answer
      position:
        x: 1168.857142857143
        y: 15.714285714285708
      positionAbsolute:
        x: 1168.857142857143
        y: 15.714285714285708
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "\nfunction main() {\n    return {\n       \n    }\n}\n"
        code_language: javascript
        outputs: {}
        selected: false
        title: Code
        type: code
        variables: []
      height: 52
      id: '1767663118401'
      position:
        x: 342
        y: 191
      positionAbsolute:
        x: 342
        y: 191
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "\nfunction main() {\n    return {\n       \n    }\n}\n"
        code_language: javascript
        outputs: {}
        selected: false
        title: Code (1)
        type: code
        variables: []
      height: 52
      id: '17676631639570'
      position:
        x: 704
        y: 335.28571428571433
      positionAbsolute:
        x: 704
        y: 335.28571428571433
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0
          mode: chat
          name: V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: 748a52e0-c9b6-4a84-8642-a6ca46893612
          role: system
          text: 你是一个复读机,无论提问是什么,你都只能回答“Mock answer”
        selected: false
        title: 回答
        type: llm
        vision:
          enabled: false
      height: 88
      id: '17676632797600'
      position:
        x: 1560.2857142857142
        y: 183
      positionAbsolute:
        x: 1560.2857142857142
        y: 183
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: 748a52e0-c9b6-4a84-8642-a6ca46893612
          role: system
          text: 你是一个复读机,无论提问是什么,你都只能回答“next plan“
        selected: false
        title: 下一步计划
        type: llm
        vision:
          enabled: false
      height: 88
      id: '17676632864980'
      position:
        x: 704
        y: 183
      positionAbsolute:
        x: 704
        y: 183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        answer: '{{#17676632797600.text#}}'
        selected: false
        title: Answer 2
        type: answer
        variables: []
      height: 103
      id: '1767663359797'
      position:
        x: 1865.142857142857
        y: 183
      positionAbsolute:
        x: 1865.142857142857
        y: 183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "\nfunction main({text}) {\n    return {\n       \"think\":text\n  \
          \  }\n}\n"
        code_language: javascript
        outputs:
          think:
            children: null
            type: string
        selected: false
        title: Code (2)
        type: code
        variables:
        - value_selector:
          - llm
          - text
          value_type: string
          variable: text
      height: 52
      id: '17676646910030'
      position:
        x: 1173.2857142857142
        y: 191
      positionAbsolute:
        x: 1173.2857142857142
        y: 191
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: -559.3
      y: 240.85000000000002
      zoom: 0.7
  rag_pipeline_variables: []

✔️ Expected Behavior

  • Strict Event Order: For every node, the events must follow: node_started -> message (chunks) -> node_finished.
  • Strict Template Order: The output content must follow the sequence defined in the Answer template (Think content first, followed by Answer content).
LLM A node_started
LLM A message chunks
LLM A node_finished
LLM B node_started
LLM B message chunks
LLM B node_finished

Actual Behavior

  • node_finished events "jump the queue" and appear before the streaming chunks are finished.
  • Content from LLM_Answer occasionally appears before LLM_Think, even though LLM_Think started first and is placed first in the template.
LLM A node_started
LLM A node_finished
LLM B node_started
LLM B message chunks
LLM A message chunks
LLM B node_finished
Originally created by @xuzijie1995 on GitHub (Jan 7, 2026). Originally assigned to: @laipz8200 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.11.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Create a workflow with at least two LLM nodes (e.g., `LLM_Think` and `LLM_Answer`). 2. Configure both nodes to enable **Stream** output. 3. Add an **Answer** node that references these nodes in a specific order within its template: `{{#LLM_Think.text#}} \n\n {{#LLM_Answer.text#}}`. 4. Ensure the environment is running with parallel execution enabled (`GRAPH_ENGINE_MIN_WORKERS` set to 2 or higher, `GRAPH_ENGINE_SCALE_UP_THRESHOLD` set to 1 can be helpful). 5. Post ```curl curl --location --request POST 'https://api.dify.ai/v1/chat-messages' \ --header 'Authorization: Bearer xxx' \ --header 'Content-Type: application/json' \ --data-raw '{ "inputs": {}, "query": "go", "response_mode": "streaming", "conversation_id": "", "user": "tester" }' ``` The issue occurs intermittently on Dify.ai Cloud. ### Post Timeline <details> <summary>Click to expand </summary> ```post time line data: {"event":"workflow_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","inputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.dialogue_count":1},"created_at":1767769589}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ea0fb890-cb94-4501-ac48-fb3f89645a61","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ea0fb890-cb94-4501-ac48-fb3f89645a61","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","sys.dialogue_count":1},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"sys.files":[],"sys.user_id":"tester","sys.app_id":"8912d0f1-c73c-4c2d-931e-c74bb834b745","sys.workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","sys.workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","sys.query":"go","sys.conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","sys.dialogue_count":1},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.739761,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"cd75ce26-393a-40ba-b7d4-534b91d8a428","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"cd75ce26-393a-40ba-b7d4-534b91d8a428","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.710216,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"8827eb8c-83fc-45d8-8482-61450b5f97f9","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"c8edb184-e8eb-4b14-8fef-01e86b6a5989","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769588,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"c8edb184-e8eb-4b14-8fef-01e86b6a5989","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.3602,"execution_metadata":null,"created_at":1767769588,"finished_at":1767769589,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"d9e44107-071d-40d7-b1c4-82087eec9c4f","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769589,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"8827eb8c-83fc-45d8-8482-61450b5f97f9","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“think content”","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":0.996,"time_to_first_token":0.939,"time_to_generate":0.057},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"think content","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":0.996,"time_to_first_token":0.939,"time_to_generate":0.057},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":1.776367,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769588,"finished_at":1767769590,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"58aae965-fb7d-4563-9481-560cb098d467","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769590,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"58aae965-fb7d-4563-9481-560cb098d467","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"think content","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.12665,"execution_metadata":null,"created_at":1767769590,"finished_at":1767769590,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"d9e44107-071d-40d7-b1c4-82087eec9c4f","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“next plan“","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":2.094,"time_to_first_token":2.037,"time_to_generate":0.057},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"next plan","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":2.094,"time_to_first_token":2.037,"time_to_generate":0.057},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":2.747746,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769589,"finished_at":1767769591,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"0a22f26d-65e7-4cde-8c78-aed388528480","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769591,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"0a22f26d-65e7-4cde-8c78-aed388528480","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":{"text":"think content"},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"think":"think content"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.140134,"execution_metadata":null,"created_at":1767769591,"finished_at":1767769592,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"31c905ca-f190-493f-b996-9d84f7e1f5ca","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769592,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"Mock","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":" answer","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"think","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":" content","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","answer":"","from_variable_selector":["llm","text"]} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"31c905ca-f190-493f-b996-9d84f7e1f5ca","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“Mock answer”","files":[]},{"role":"user","text":"go","files":[]}],"usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":1.039,"time_to_first_token":0.989,"time_to_generate":0.05},"finish_reason":"stop","model_provider":"langgenius/volcengine_maas/volcengine_maas","model_name":"V3"},"process_data_truncated":false,"outputs":{"text":"Mock answer","reasoning_content":"","usage":{"prompt_tokens":21,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":2,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":23,"total_price":"0","currency":"USD","latency":1.039,"time_to_first_token":0.989,"time_to_generate":0.05},"finish_reason":"stop"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":1.443685,"execution_metadata":{"total_tokens":23,"total_price":"0","currency":"USD"},"created_at":1767769592,"finished_at":1767769593,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"eabdacaa-a4f3-4542-a68a-1a643d13c761","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767769593,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"eabdacaa-a4f3-4542-a68a-1a643d13c761","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"Mock answer","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.045939,"execution_metadata":null,"created_at":1767769593,"finished_at":1767769593,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"workflow_finished","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","workflow_run_id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","data":{"id":"ab0ee6c1-01e8-4799-ac15-449363b2ab0e","workflow_id":"4bc840c3-fc1b-4abe-9f99-36ee44001f43","status":"succeeded","outputs":{"answer":"think contentMock answer","files":[]},"error":null,"elapsed_time":4.461886,"total_tokens":69,"total_steps":9,"created_by":{"id":"288cae25-90ff-42a6-aa11-45809011f1e8","user":"tester"},"created_at":1767769589,"finished_at":1767769593,"exceptions_count":0,"files":[]}} data: {"event":"message_end","conversation_id":"c957843b-b21a-4cd1-b586-16a06fc2b396","message_id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","created_at":1767769588,"task_id":"646e53a5-bba0-414f-9d9d-b376277d0b8c","id":"dcb77f3d-0f11-4c97-bee2-cc1bcdd9bf07","metadata":{"annotation_reply":null,"retriever_resources":[],"usage":{"prompt_tokens":63,"prompt_unit_price":"0","prompt_price_unit":"0","prompt_price":"0","completion_tokens":6,"completion_unit_price":"0","completion_price_unit":"0","completion_price":"0","total_tokens":69,"total_price":"0","currency":"USD","latency":4.129,"time_to_first_token":5.365,"time_to_generate":0.052}},"files":[]} ``` </details> ### DSL File <details> <summary>Click to expand DSL Content</summary> ```yaml app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: thinktrack use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.20@aff2eaf766b1774519c3ca0e77de0b28c87b71cce6390b22a103518e8a5e4ae7 version: null kind: app version: 0.5.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_batch_limit: 10 image_file_size_limit: 10 single_chunk_attachment_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: true 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: sourceType: llm targetType: answer id: llm-answer source: llm sourceHandle: source target: answer targetHandle: target type: custom - data: isInIteration: false isInLoop: false sourceType: start targetType: code id: 1767663059744-source-1767663118401-target source: '1767663059744' sourceHandle: source target: '1767663118401' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: llm id: 1767663118401-source-llm-target source: '1767663118401' sourceHandle: source target: llm targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: code id: 1767663118401-source-17676631639570-target source: '1767663118401' sourceHandle: source target: '17676631639570' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: llm id: 1767663118401-source-17676632864980-target source: '1767663118401' sourceHandle: source target: '17676632864980' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: llm targetType: answer id: 17676632797600-source-1767663359797-target source: '17676632797600' sourceHandle: source target: '1767663359797' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: llm id: 17676646910030-source-17676632797600-target source: '17676646910030' sourceHandle: source target: '17676632797600' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: llm targetType: code id: llm-source-17676646910030-target source: llm sourceHandle: source target: '17676646910030' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: llm targetType: code id: 17676632864980-source-17676646910030-target source: '17676632864980' sourceHandle: source target: '17676646910030' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: code id: 17676631639570-source-17676646910030-target source: '17676631639570' sourceHandle: source target: '17676646910030' targetHandle: target type: custom zIndex: 0 nodes: - data: selected: false title: User Input type: start variables: [] height: 73 id: '1767663059744' position: x: 0 y: 180 positionAbsolute: x: 0 y: 180 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] memory: query_prompt_template: '{{#sys.query#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: temperature: 0.7 mode: chat name: V3 provider: langgenius/volcengine_maas/volcengine_maas prompt_template: - id: 748a52e0-c9b6-4a84-8642-a6ca46893612 role: system text: 你是一个复读机,无论提问是什么,你都只能回答“think content” selected: false title: 思考 type: llm vision: enabled: false height: 88 id: llm position: x: 704 y: 15.714285714285708 positionAbsolute: x: 704 y: 15.714285714285708 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: answer: '{{#llm.text#}}' selected: false title: Answer type: answer variables: [] height: 103 id: answer position: x: 1168.857142857143 y: 15.714285714285708 positionAbsolute: x: 1168.857142857143 y: 15.714285714285708 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\nfunction main() {\n return {\n \n }\n}\n" code_language: javascript outputs: {} selected: false title: Code type: code variables: [] height: 52 id: '1767663118401' position: x: 342 y: 191 positionAbsolute: x: 342 y: 191 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\nfunction main() {\n return {\n \n }\n}\n" code_language: javascript outputs: {} selected: false title: Code (1) type: code variables: [] height: 52 id: '17676631639570' position: x: 704 y: 335.28571428571433 positionAbsolute: x: 704 y: 335.28571428571433 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] memory: query_prompt_template: '{{#sys.query#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: temperature: 0 mode: chat name: V3 provider: langgenius/volcengine_maas/volcengine_maas prompt_template: - id: 748a52e0-c9b6-4a84-8642-a6ca46893612 role: system text: 你是一个复读机,无论提问是什么,你都只能回答“Mock answer” selected: false title: 回答 type: llm vision: enabled: false height: 88 id: '17676632797600' position: x: 1560.2857142857142 y: 183 positionAbsolute: x: 1560.2857142857142 y: 183 selected: true sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: false variable_selector: [] memory: query_prompt_template: '{{#sys.query#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: temperature: 0.7 mode: chat name: V3 provider: langgenius/volcengine_maas/volcengine_maas prompt_template: - id: 748a52e0-c9b6-4a84-8642-a6ca46893612 role: system text: 你是一个复读机,无论提问是什么,你都只能回答“next plan“ selected: false title: 下一步计划 type: llm vision: enabled: false height: 88 id: '17676632864980' position: x: 704 y: 183 positionAbsolute: x: 704 y: 183 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: answer: '{{#17676632797600.text#}}' selected: false title: Answer 2 type: answer variables: [] height: 103 id: '1767663359797' position: x: 1865.142857142857 y: 183 positionAbsolute: x: 1865.142857142857 y: 183 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\nfunction main({text}) {\n return {\n \"think\":text\n \ \ }\n}\n" code_language: javascript outputs: think: children: null type: string selected: false title: Code (2) type: code variables: - value_selector: - llm - text value_type: string variable: text height: 52 id: '17676646910030' position: x: 1173.2857142857142 y: 191 positionAbsolute: x: 1173.2857142857142 y: 191 selected: false sourcePosition: right targetPosition: left type: custom width: 242 viewport: x: -559.3 y: 240.85000000000002 zoom: 0.7 rag_pipeline_variables: [] ``` </details> ### ✔️ Expected Behavior - **Strict Event Order**: For every node, the events must follow: `node_started` -> `message` (chunks) -> `node_finished`. - **Strict Template Order**: The output content must follow the sequence defined in the Answer template (Think content first, followed by Answer content). ``` LLM A node_started LLM A message chunks LLM A node_finished LLM B node_started LLM B message chunks LLM B node_finished ``` ### ❌ Actual Behavior - `node_finished` events "jump the queue" and appear before the streaming chunks are finished. - Content from `LLM_Answer` occasionally appears before `LLM_Think`, even though `LLM_Think` started first and is placed first in the template. ``` LLM A node_started LLM A node_finished LLM B node_started LLM B message chunks LLM A message chunks LLM B node_finished ```
yindo added the 🐞 bugstale labels 2026-02-21 20:12:50 -05:00
Author
Owner

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

This is a known architectural limitation in Dify: when you run parallel LLM nodes with streaming enabled, the workflow engine does not guarantee strict event or content order. Events like node_finished can be emitted before all message chunks are streamed, and content from later nodes may appear before earlier ones, even if your template specifies a particular order. This happens because the event manager emits events as soon as they are collected from parallel threads, without sequencing logic to ensure all message chunks (with is_final=True) are sent before the node is marked finished. True ordered streaming from multiple parallel branches would require significant changes to the workflow engine and is not currently supported [source][source][source].

Workarounds are limited: you can restructure your workflow to avoid parallel streaming, rely on the final output (which will be correctly ordered), or wrap each LLM/reply node pair in a Loop node set to iterate once (restores streaming per branch, but not cross-branch order) [source]. If strict ordering is critical, you’ll need to aggregate results into a single reply node (losing streaming), or monitor ongoing development for future improvements. A recent PR about unified event management may impact event sequencing, but details on its effect are unclear [source].

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 7, 2026): <!-- Answer --> This is a known architectural limitation in Dify: when you run parallel LLM nodes with streaming enabled, the workflow engine does not guarantee strict event or content order. Events like `node_finished` can be emitted before all message chunks are streamed, and content from later nodes may appear before earlier ones, even if your template specifies a particular order. This happens because the event manager emits events as soon as they are collected from parallel threads, without sequencing logic to ensure all message chunks (with `is_final=True`) are sent before the node is marked finished. True ordered streaming from multiple parallel branches would require significant changes to the workflow engine and is not currently supported [[source](https://github.com/langgenius/dify/discussions/21917)][[source](https://github.com/langgenius/dify/issues/22295)][[source](https://github.com/langgenius/dify/blob/187bfafe8b001cf8afad95e257374f2b2e7e5983/api/core/workflow/graph_engine/event_management/event_manager.py#L78-L187)]. Workarounds are limited: you can restructure your workflow to avoid parallel streaming, rely on the final output (which will be correctly ordered), or wrap each LLM/reply node pair in a Loop node set to iterate once (restores streaming per branch, but not cross-branch order) [[source](https://github.com/langgenius/dify/issues/22295)]. If strict ordering is critical, you’ll need to aggregate results into a single reply node (losing streaming), or monitor ongoing development for future improvements. A recent PR about unified event management may impact event sequencing, but details on its effect are unclear [[source](https://github.com/langgenius/dify/pull/30479)]. <!-- 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/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/24a84ed8-8ac5-4e58-b25f-97423f0b3999?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=This%20is%20a%20known%20architectural%20limitation%20in%20Dify%3A%20when%20you%20run%20parallel%20LLM%20nodes%20with%20streaming%20enabled%2C%20the%20workflow%20engine%20does%20not%20guarantee%20strict%20event%20or%20content%20order.%20Events%20like%20%60node_finished%60%20can%20be%20emitted%20before%20all%20message%20chunks%20are%20streamed%2C%20and%20content%20from%20later%20nodes%20may%20appear%20before%20earlier%20ones%2C%20even%20if%20your%20template%20specifies%20a%20particular%20order.%20This%20happens%20because%20the%20event%20manager%20emits%20events%20as%20soon%20as%20they%20are%20collected%20from%20parallel%20threads%2C%20without%20sequencing%20logic%20to%20ensure%20all%20message%20chunks%20%28with%20%60is_final%3DTrue%60%29%20are%20sent%20before%20the%20node%20is%20marked%20finished.%20True%20ordered%20streaming%20from%20multiple%20parallel%20branches%20would%20require%20significant%20changes%20to%20the%20workflow%20engine%20and%20is%20not%20currently%20supported%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/discussions/21917%29%5D%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/22295%29%5D%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/blob/187bfafe8b001cf8afad95e257374f2b2e7e5983/api/core/workflow/graph_engine/event_management/event_manager.py%23L78-L187%29%5D.%0A%0AWorkarounds%20are%20limited%3A%20you%20can%20restructure%20your%20workflow%20to%20avoid%20parallel%20streaming%2C%20rely%20on%20the%20final%20output%20%28which%20will%20be%20correctly%20ordered%29%2C%20or%20wrap%20each%20LLM/reply%20node%20pair%20in%20a%20Loop%20node%20set%20to%20iterate%20once%20%28restores%20streaming%20per%20branch%2C%20but%20not%20cross-branch%20order%29%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/22295%29%5D.%20If%20strict%20ordering%20is%20critical%2C%20you%E2%80%99ll%20need%20to%20aggregate%20results%20into%20a%20single%20reply%20node%20%28losing%20streaming%29%2C%20or%20monitor%20ongoing%20development%20for%20future%20improvements.%20A%20recent%20PR%20about%20unified%20event%20management%20may%20impact%20event%20sequencing%2C%20but%20details%20on%20its%20effect%20are%20unclear%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/pull/30479%29%5D.)&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/30679)
Author
Owner

@xuzijie1995 commented on GitHub (Jan 7, 2026):

The workflow's node structure looks strange, but some people do organize it this way in practice. This leads to differences in the returned message chunks compared to expectations. Opening this issue for tracking. 😄

@xuzijie1995 commented on GitHub (Jan 7, 2026): The workflow's node structure looks strange, but some people do organize it this way in practice. This leads to differences in the returned message chunks compared to expectations. Opening this issue for tracking. 😄
Author
Owner

@fatelei commented on GitHub (Jan 7, 2026):

use dsl in this issue, output is

Image

llm only output Mock answer and think content, it seem work well

@fatelei commented on GitHub (Jan 7, 2026): use dsl in this issue, output is ![Image](https://github.com/user-attachments/assets/73329ed0-7c9a-47ec-bb7f-61ace34d09b8) llm only output Mock answer and think content, it seem work well
Author
Owner

@fatelei commented on GitHub (Jan 7, 2026):

the sse event seem right

data: {"event":"workflow_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","inputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.dialogue_count":1},"created_at":1767786311}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"12219054-0690-4333-a538-e9996cbbe473","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786311,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"12219054-0690-4333-a538-e9996cbbe473","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","sys.dialogue_count":1},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","sys.dialogue_count":1},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.031121,"execution_metadata":null,"created_at":1767786311,"finished_at":1767786311,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"3a505693-690a-472b-8ee0-867ada671388","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786311,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"3a505693-690a-472b-8ee0-867ada671388","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.867951,"execution_metadata":null,"created_at":1767786311,"finished_at":1767786312,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0ceb6dc9-e563-447c-8d60-6127886f1315","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786312,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0ceb6dc9-e563-447c-8d60-6127886f1315","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“think content”"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.002076","completion_price_unit":"0.000001","completion_tokens":173,"completion_unit_price":"12","currency":"USD","latency":4.901,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.898,"time_to_generate":0.003,"total_price":"0.002124","total_tokens":197},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"think content","reasoning_content":"","usage":{"completion_price":"0.002076","completion_price_unit":"0.000001","completion_tokens":173,"completion_unit_price":"12","currency":"USD","latency":4.901,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.898,"time_to_generate":0.003,"total_price":"0.002124","total_tokens":197},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":5.149944,"execution_metadata":{"total_tokens":197,"total_price":"0.002124","currency":"USD"},"created_at":1767786312,"finished_at":1767786317,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"b1c98572-b69e-4025-86e6-0152464b093a","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786317,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"b1c98572-b69e-4025-86e6-0152464b093a","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.28492,"execution_metadata":null,"created_at":1767786317,"finished_at":1767786318,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"1fd1e237-7007-492c-b5d3-547b66ac5520","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786318,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

event: ping

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"1fd1e237-7007-492c-b5d3-547b66ac5520","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“next plan“"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.001836","completion_price_unit":"0.000001","completion_tokens":153,"completion_unit_price":"12","currency":"USD","latency":4.05,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.023,"time_to_generate":0.027,"total_price":"0.001884","total_tokens":177},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"next plan","reasoning_content":"","usage":{"completion_price":"0.001836","completion_price_unit":"0.000001","completion_tokens":153,"completion_unit_price":"12","currency":"USD","latency":4.05,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.023,"time_to_generate":0.027,"total_price":"0.001884","total_tokens":177},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":4.105869,"execution_metadata":{"total_tokens":177,"total_price":"0.001884","currency":"USD"},"created_at":1767786318,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"9f368044-4578-477a-bdb8-1bcb33635557","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"9f368044-4578-477a-bdb8-1bcb33635557","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"think content","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.05085,"execution_metadata":null,"created_at":1767786322,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a66e0ab4-9ce2-44fe-a5ed-2fc8222cff20","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a66e0ab4-9ce2-44fe-a5ed-2fc8222cff20","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":{"text":"think content"},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"think":"think content"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.241705,"execution_metadata":null,"created_at":1767786322,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"2c68e5f7-5573-41cc-bb12-4e5d5338688f","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"Mock answer","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"","from_variable_selector":["17676632797600","text"]}

data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"/","from_variable_selector":["1767663359797","answer"]}

data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"think content","from_variable_selector":["llm","text"]}

data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"","from_variable_selector":["llm","text"]}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"2c68e5f7-5573-41cc-bb12-4e5d5338688f","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“Mock answer”"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.00138","completion_price_unit":"0.000001","completion_tokens":115,"completion_unit_price":"12","currency":"USD","latency":3.78,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":3.778,"time_to_generate":0.002,"total_price":"0.001428","total_tokens":139},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"Mock answer","reasoning_content":"","usage":{"completion_price":"0.00138","completion_price_unit":"0.000001","completion_tokens":115,"completion_unit_price":"12","currency":"USD","latency":3.78,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":3.778,"time_to_generate":0.002,"total_price":"0.001428","total_tokens":139},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":3.868849,"execution_metadata":{"total_tokens":139,"total_price":"0.001428","currency":"USD"},"created_at":1767786322,"finished_at":1767786326,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a4bb1a76-134e-4383-8eba-b68db9e71648","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786326,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}}

data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a4bb1a76-134e-4383-8eba-b68db9e71648","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"Mock answer/","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.036582,"execution_metadata":null,"created_at":1767786326,"finished_at":1767786326,"files":[],"iteration_id":null,"loop_id":null}}

data: {"event":"workflow_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","status":"succeeded","outputs":{"answer":"think contentMock answer/","files":[]},"error":null,"elapsed_time":14.494134,"total_tokens":513,"total_steps":9,"created_by":{"id":"01435653-a011-4117-aeaa-37f6819d0c99","name":"fatelei","email":"fatelei@gmail.com"},"created_at":1767786311,"finished_at":1767786326,"exceptions_count":0,"files":[]}}

data: {"event":"message_end","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","metadata":{"annotation_reply":null,"retriever_resources":[],"usage":{"prompt_tokens":72,"prompt_unit_price":"2","prompt_price_unit":"0.000001","prompt_price":"0.000144","completion_tokens":441,"completion_unit_price":"12","completion_price_unit":"0.000001","completion_price":"0.005292","total_tokens":513,"total_price":"0.005436","currency":"USD","latency":12.731,"time_to_first_token":14.492,"time_to_generate":0.001}},"files":[]}

Dify does NOT guarantee that node_started → message → node_finished events arrive in strict node-by-node order.

For answer nodes, messages from the next queued answer node may be sent before that node's node_started event, because:

  1. The coordinator auto-starts the next session when the current one ends
  2. Static text segments are flushed immediately without waiting for node execution
@fatelei commented on GitHub (Jan 7, 2026): the sse event seem right ``` data: {"event":"workflow_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","inputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.dialogue_count":1},"created_at":1767786311}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"12219054-0690-4333-a538-e9996cbbe473","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786311,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"12219054-0690-4333-a538-e9996cbbe473","node_id":"1767663059744","node_type":"start","title":"User Input","index":1,"predecessor_node_id":null,"inputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","sys.dialogue_count":1},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"sys.files":[],"sys.user_id":"01435653-a011-4117-aeaa-37f6819d0c99","sys.app_id":"3ea0fc39-a7e1-4fda-880e-4a2c54dd8a78","sys.workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","sys.workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","sys.query":"123","sys.conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","sys.dialogue_count":1},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.031121,"execution_metadata":null,"created_at":1767786311,"finished_at":1767786311,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"3a505693-690a-472b-8ee0-867ada671388","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786311,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"3a505693-690a-472b-8ee0-867ada671388","node_id":"1767663118401","node_type":"code","title":"Code","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.867951,"execution_metadata":null,"created_at":1767786311,"finished_at":1767786312,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0ceb6dc9-e563-447c-8d60-6127886f1315","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786312,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0ceb6dc9-e563-447c-8d60-6127886f1315","node_id":"llm","node_type":"llm","title":"思考","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“think content”"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.002076","completion_price_unit":"0.000001","completion_tokens":173,"completion_unit_price":"12","currency":"USD","latency":4.901,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.898,"time_to_generate":0.003,"total_price":"0.002124","total_tokens":197},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"think content","reasoning_content":"","usage":{"completion_price":"0.002076","completion_price_unit":"0.000001","completion_tokens":173,"completion_unit_price":"12","currency":"USD","latency":4.901,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.898,"time_to_generate":0.003,"total_price":"0.002124","total_tokens":197},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":5.149944,"execution_metadata":{"total_tokens":197,"total_price":"0.002124","currency":"USD"},"created_at":1767786312,"finished_at":1767786317,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"b1c98572-b69e-4025-86e6-0152464b093a","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786317,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"b1c98572-b69e-4025-86e6-0152464b093a","node_id":"17676631639570","node_type":"code","title":"Code (1)","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.28492,"execution_metadata":null,"created_at":1767786317,"finished_at":1767786318,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"1fd1e237-7007-492c-b5d3-547b66ac5520","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786318,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} event: ping data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"1fd1e237-7007-492c-b5d3-547b66ac5520","node_id":"17676632864980","node_type":"llm","title":"下一步计划","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“next plan“"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.001836","completion_price_unit":"0.000001","completion_tokens":153,"completion_unit_price":"12","currency":"USD","latency":4.05,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.023,"time_to_generate":0.027,"total_price":"0.001884","total_tokens":177},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"next plan","reasoning_content":"","usage":{"completion_price":"0.001836","completion_price_unit":"0.000001","completion_tokens":153,"completion_unit_price":"12","currency":"USD","latency":4.05,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":4.023,"time_to_generate":0.027,"total_price":"0.001884","total_tokens":177},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":4.105869,"execution_metadata":{"total_tokens":177,"total_price":"0.001884","currency":"USD"},"created_at":1767786318,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"9f368044-4578-477a-bdb8-1bcb33635557","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"9f368044-4578-477a-bdb8-1bcb33635557","node_id":"answer","node_type":"answer","title":"Answer","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"think content","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.05085,"execution_metadata":null,"created_at":1767786322,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a66e0ab4-9ce2-44fe-a5ed-2fc8222cff20","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a66e0ab4-9ce2-44fe-a5ed-2fc8222cff20","node_id":"17676646910030","node_type":"code","title":"Code (2)","index":1,"predecessor_node_id":null,"inputs":{"text":"think content"},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"think":"think content"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.241705,"execution_metadata":null,"created_at":1767786322,"finished_at":1767786322,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"2c68e5f7-5573-41cc-bb12-4e5d5338688f","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786322,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"Mock answer","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"","from_variable_selector":["17676632797600","text"]} data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"/","from_variable_selector":["1767663359797","answer"]} data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"think content","from_variable_selector":["llm","text"]} data: {"event":"message","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","answer":"","from_variable_selector":["llm","text"]} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"2c68e5f7-5573-41cc-bb12-4e5d5338688f","node_id":"17676632797600","node_type":"llm","title":"回答","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{"model_mode":"chat","prompts":[{"files":[],"role":"system","text":"你是一个复读机,无论提问是什么,你都只能回答“Mock answer”"},{"files":[],"role":"user","text":"123"}],"usage":{"completion_price":"0.00138","completion_price_unit":"0.000001","completion_tokens":115,"completion_unit_price":"12","currency":"USD","latency":3.78,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":3.778,"time_to_generate":0.002,"total_price":"0.001428","total_tokens":139},"finish_reason":"STOP","model_provider":"langgenius/gemini/google","model_name":"gemini-3-pro-preview"},"process_data_truncated":false,"outputs":{"text":"Mock answer","reasoning_content":"","usage":{"completion_price":"0.00138","completion_price_unit":"0.000001","completion_tokens":115,"completion_unit_price":"12","currency":"USD","latency":3.78,"prompt_price":"0.000048","prompt_price_unit":"0.000001","prompt_tokens":24,"prompt_unit_price":"2","time_to_first_token":3.778,"time_to_generate":0.002,"total_price":"0.001428","total_tokens":139},"finish_reason":"STOP"},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":3.868849,"execution_metadata":{"total_tokens":139,"total_price":"0.001428","currency":"USD"},"created_at":1767786322,"finished_at":1767786326,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"node_started","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a4bb1a76-134e-4383-8eba-b68db9e71648","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":null,"inputs_truncated":false,"created_at":1767786326,"extras":{},"iteration_id":null,"loop_id":null,"agent_strategy":null}} data: {"event":"node_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"a4bb1a76-134e-4383-8eba-b68db9e71648","node_id":"1767663359797","node_type":"answer","title":"Answer 2","index":1,"predecessor_node_id":null,"inputs":{},"inputs_truncated":false,"process_data":{},"process_data_truncated":false,"outputs":{"answer":"Mock answer/","files":[]},"outputs_truncated":false,"status":"succeeded","error":null,"elapsed_time":0.036582,"execution_metadata":null,"created_at":1767786326,"finished_at":1767786326,"files":[],"iteration_id":null,"loop_id":null}} data: {"event":"workflow_finished","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","workflow_run_id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","data":{"id":"0d6c50e7-c16c-4d77-8241-c4ec06f60d5e","workflow_id":"51b750c0-dbb5-4e07-8fac-dda2c975d2db","status":"succeeded","outputs":{"answer":"think contentMock answer/","files":[]},"error":null,"elapsed_time":14.494134,"total_tokens":513,"total_steps":9,"created_by":{"id":"01435653-a011-4117-aeaa-37f6819d0c99","name":"fatelei","email":"fatelei@gmail.com"},"created_at":1767786311,"finished_at":1767786326,"exceptions_count":0,"files":[]}} data: {"event":"message_end","conversation_id":"24dad8cc-125b-40d0-8dce-18d55149a232","message_id":"22727176-f0f3-4387-9c49-c668b914fcad","created_at":1767786312,"task_id":"5c5624ce-ec42-46cd-82b3-fcb3b2ef3e12","id":"22727176-f0f3-4387-9c49-c668b914fcad","metadata":{"annotation_reply":null,"retriever_resources":[],"usage":{"prompt_tokens":72,"prompt_unit_price":"2","prompt_price_unit":"0.000001","prompt_price":"0.000144","completion_tokens":441,"completion_unit_price":"12","completion_price_unit":"0.000001","completion_price":"0.005292","total_tokens":513,"total_price":"0.005436","currency":"USD","latency":12.731,"time_to_first_token":14.492,"time_to_generate":0.001}},"files":[]} ``` Dify does NOT guarantee that node_started → message → node_finished events arrive in strict node-by-node order. For answer nodes, messages from the next queued answer node may be sent before that node's node_started event, because: 1. The coordinator auto-starts the next session when the current one ends 2. Static text segments are flushed immediately without waiting for node execution
Author
Owner

@xuzijie1995 commented on GitHub (Jan 8, 2026):

The SSE output is quite confusing and makes me suspect it's a bug. Coming from v1.4.0, I'm used to the strict node_started → message → node_finished order.
The interleaving breaks that expectation and complicates streaming handling.
I get the reasons, but it feels less predictable than before.

I'm doing my best to understand and adapt the code, but it's not as straightforward as I'd hoped. :(

@xuzijie1995 commented on GitHub (Jan 8, 2026): The SSE output is quite confusing and makes me suspect it's a bug. Coming from v1.4.0, I'm used to the strict node_started → message → node_finished order. The interleaving breaks that expectation and complicates streaming handling. I get the reasons, but it feels less predictable than before. I'm doing my best to understand and adapt the code, but it's not as straightforward as I'd hoped. :(
Author
Owner

@openxgj commented on GitHub (Jan 16, 2026):

I have a question: why is the predecessor_node_id in the returned data structure null? We have performed secondary parsing and display of the returned message. When predecessor_node_id is empty, it becomes impossible to determine the sequence between nodes.
Version: 1.11.1. The old version was 1.7.2, and this issue did not occur in the old version.

@openxgj commented on GitHub (Jan 16, 2026): I have a question: why is the predecessor_node_id in the returned data structure null? We have performed secondary parsing and display of the returned message. When predecessor_node_id is empty, it becomes impossible to determine the sequence between nodes. Version: 1.11.1. The old version was 1.7.2, and this issue did not occur in the old version.
Author
Owner

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

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

Issue Summary:

  • You reported an intermittent bug in Dify v1.11.2 Cloud where streaming events from parallel LLM nodes arrive out of order.
  • This breaks the expected strict sequence of node_started → message → node_finished, causing content sequencing issues.
  • The issue stems from an architectural limitation: the event manager emits events from parallel threads without sequencing logic.
  • Workarounds suggested include avoiding parallel streaming or aggregating results into a single node.
  • Additional users confirmed the event order is not strictly guaranteed and noted complications with null predecessor_node_id affecting node sequence determination.

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 (Feb 16, 2026): Hi, @xuzijie1995. 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 an intermittent bug in Dify v1.11.2 Cloud where streaming events from parallel LLM nodes arrive out of order. - This breaks the expected strict sequence of node_started → message → node_finished, causing content sequencing issues. - The issue stems from an architectural limitation: the event manager emits events from parallel threads without sequencing logic. - Workarounds suggested include avoiding parallel streaming or aggregating results into a single node. - Additional users confirmed the event order is not strictly guaranteed and noted complications with null predecessor_node_id affecting node sequence determination. **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#21496