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 the agent calls the tool for workflow conversion, the tool returns the result twice, and the agent's final result is empty. #22972
I think this should be a bug. I have tried several times, and after calling the tool converted by the workflow, the agent stops working and does not produce a final result.
This is a known issue with workflow-converted tools in Dify. The root cause is that the workflow tool yields both a text and a JSON message for each invocation, which can result in duplicate outputs if both are processed or displayed without filtering. If the agent or downstream logic expects only one result or a specific format, this can also lead to empty outputs if the wrong message is selected or if the concatenated result isn't valid for further parsing. There isn't currently a mechanism to mark or select a canonical result from a tool call, which creates ambiguity when both formats are emitted for the same data [code reference].
Recent fixes (like PR #22462, merged 2025-07-21) address related workflow tool issues, so upgrading to the latest Dify version may help if that's an option for you [issue reference]. If you can't upgrade, double-check that all required tool parameters are explicitly set in your workflow tool node configuration—missing or malformed parameters can also cause the agent to hang or return empty results.
As a temporary workaround, you can filter or post-process the agent output to select only the desired result (either text or JSON). If the issue persists after these steps, sharing more details or logs could help further isolate the problem.
I think the issue is that the tool returns the result twice, and the format is not standardized, which causes the agent to be unable to continue execution. Please fix this bug.
what is your LLM?
some LLM will return empty if answer already responsed, in your case, answered by last tool call
有些LLM 之前的回答已经解答的情况下会返回空,你的例子里就是最后一个工具调用的结果已经是答案了
Hi, @Moiyu1998. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary:
You reported a bug in version 1.7.0 where a workflow-converted tool returns duplicate results, causing the agent to hang and produce an empty final output.
The issue is known to be caused by the tool emitting both text and JSON messages per call, leading to ambiguity and duplicate outputs.
Workarounds I suggested include upgrading to the latest version or filtering outputs manually.
You confirmed the problem persists with screenshots and urged for a fix.
Other users noted the issue continues in version 1.7.1 and discussed related behavior with certain LLMs.
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.
If I don’t hear back within 15 days, I will automatically close this issue to help us focus on active concerns.
Thank you for your understanding and contribution!
Activity
Moiyu1998 commentedon Jul 25, 2025
I think this should be a bug. I have tried several times, and after calling the tool converted by the workflow, the agent stops working and does not produce a final result.
dosubot commentedon Jul 25, 2025
This is a known issue with workflow-converted tools in Dify. The root cause is that the workflow tool yields both a text and a JSON message for each invocation, which can result in duplicate outputs if both are processed or displayed without filtering. If the agent or downstream logic expects only one result or a specific format, this can also lead to empty outputs if the wrong message is selected or if the concatenated result isn't valid for further parsing. There isn't currently a mechanism to mark or select a canonical result from a tool call, which creates ambiguity when both formats are emitted for the same data [code reference].
Recent fixes (like PR #22462, merged 2025-07-21) address related workflow tool issues, so upgrading to the latest Dify version may help if that's an option for you [issue reference]. If you can't upgrade, double-check that all required tool parameters are explicitly set in your workflow tool node configuration—missing or malformed parameters can also cause the agent to hang or return empty results.
As a temporary workaround, you can filter or post-process the agent output to select only the desired result (either text or JSON). If the issue persists after these steps, sharing more details or logs could help further isolate the problem.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Moiyu1998 commentedon Jul 25, 2025
It is obvious during the execution that this tool returns the result twice, and the results are identical.
Each time after calling this tool, the process gets stuck. After waiting for a while, the agent stops running, but the final returned result is empty.
Moiyu1998 commentedon Jul 25, 2025
I think the issue is that the tool returns the result twice, and the format is not standardized, which causes the agent to be unable to continue execution. Please fix this bug.
EcoleKeine commentedon Jul 31, 2025
what is your LLM?
some LLM will return empty if answer already responsed, in your case, answered by last tool call
有些LLM 之前的回答已经解答的情况下会返回空,你的例子里就是最后一个工具调用的结果已经是答案了
aslo check
#18731
haofengW commentedon Aug 2, 2025
The version I'm using is 1.7.1, but this problem still persists.
#19463 (comment)
dosubot commentedon Sep 2, 2025
Hi, @Moiyu1998. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!