You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When using the tool released by the workflow, the output will be generated twice #27566
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
2.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When using the tool released by the workflow, the output will be generated twice. For large token outputs, double the tokens will increase the burden on the model. I raised this issue a long time ago, but it hasn't been fixed yet.
✔️ Expected Behavior
no error
❌ Actual Behavior
When using the tool released by the workflow, the output will be generated twice. For large token outputs, double the tokens will increase the burden on the model. I raised this issue a long time ago, but it hasn't been fixed yet.
The workflow generates output once, but when the tool is called, the output is generated twice. I really hope this can be fixed as soon as possible; otherwise, the token consumption will be extremely high, and the large model will fail to remember the content or even easily get confused.
This is a known bug in Dify that affects multiple versions, including 2.0. When a workflow tool is called from the Agent module or as a tool, both a text and a JSON message are returned and concatenated, which doubles the output and token usage. There isn't a built-in way to filter out the duplicate in current releases, and recent fixes have not fully resolved the issue—users continue to report it in the latest versions. The recommended workaround is to post-process the agent output and select only the desired result (either the text or the JSON) to avoid duplicates. There is no official confirmation or timeline for a permanent fix yet. For more details and ongoing discussion, see issue #23695 and related threads.
Activity
xiaotang-12-ops commentedon Oct 28, 2025
The workflow generates output once, but when the tool is called, the output is generated twice. I really hope this can be fixed as soon as possible; otherwise, the token consumption will be extremely high, and the large model will fail to remember the content or even easily get confused.
dosubot commentedon Oct 28, 2025
This is a known bug in Dify that affects multiple versions, including 2.0. When a workflow tool is called from the Agent module or as a tool, both a text and a JSON message are returned and concatenated, which doubles the output and token usage. There isn't a built-in way to filter out the duplicate in current releases, and recent fixes have not fully resolved the issue—users continue to report it in the latest versions. The recommended workaround is to post-process the agent output and select only the desired result (either the text or the JSON) to avoid duplicates. There is no official confirmation or timeline for a permanent fix yet. For more details and ongoing discussion, see issue #23695 and related threads.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
