The custom tool keeps running and never returns any results. #21228

Open
opened 2026-02-21 20:11:31 -05:00 by yindo · 4 comments
Owner

Originally created by @Jiixiang on GitHub (Dec 23, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.1-fix

Cloud or Self Hosted

Cloud

Steps to reproduce

ImageThe custom tool stays in the 'running' state and does not return any output, causing the workflow to stall.

✔️ Expected Behavior

I hope this issue can be resolved.

Actual Behavior

The custom tool is running but returns empty results.

Originally created by @Jiixiang on GitHub (Dec 23, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.1-fix ### Cloud or Self Hosted Cloud ### Steps to reproduce <img width="930" height="228" alt="Image" src="https://github.com/user-attachments/assets/31afce7a-aac0-49c3-a93b-df40c1c7c5e3" />The custom tool stays in the 'running' state and does not return any output, causing the workflow to stall. ### ✔️ Expected Behavior I hope this issue can be resolved. ### ❌ Actual Behavior The custom tool is running but returns empty results.
yindo added the 🐞 bugcloud labels 2026-02-21 20:11:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 23, 2025):

This issue is often caused by how Dify handles file outputs from custom tools in workflows. If your tool emits a file (or blob) result, Dify's message transformation logic may convert file objects into LINK messages, but the downstream workflow code might not reconstruct the file object correctly. This can leave the node stuck in the "running" state or cause it to return empty results, especially if the file metadata is missing or malformed, or if the file record can't be found in the database. Similar issues have been reported and analyzed in detail, with the root cause traced to message transformation and file handling logic [source].

Recent fixes have improved handling for cases where the mime type is missing or set to None, defaulting it to application/octet-stream and ensuring the message type is set to BINARY_LINK for non-image files, which helps downstream code process the file correctly [source]. However, if your tool or plugin expects only LINK types, this could cause compatibility issues.

To troubleshoot:

  • Check if your custom tool emits file outputs and ensure the output message includes all required metadata (especially mime_type and a valid file reference).
  • Make sure the file record exists in the database and the file URL is accessible.
  • If you control the tool, try emitting BINARY_LINK messages for files, or update the downstream logic to handle LINK messages by reconstructing file objects from URLs.
  • If the tool is not emitting file outputs, check for any blocking code, infinite loops, or unhandled exceptions in the tool's implementation, as these can also cause the node to hang [source].

If you can share more details about the type of custom tool (API, plugin, script) and whether it emits file outputs, I can help with more targeted troubleshooting steps.

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 (Dec 23, 2025): <!-- Answer --> This issue is often caused by how Dify handles file outputs from custom tools in workflows. If your tool emits a file (or blob) result, Dify's message transformation logic may convert file objects into LINK messages, but the downstream workflow code might not reconstruct the file object correctly. This can leave the node stuck in the "running" state or cause it to return empty results, especially if the file metadata is missing or malformed, or if the file record can't be found in the database. Similar issues have been reported and analyzed in detail, with the root cause traced to message transformation and file handling logic [[source](https://github.com/langgenius/dify/issues/26431)]. Recent fixes have improved handling for cases where the mime type is missing or set to None, defaulting it to `application/octet-stream` and ensuring the message type is set to `BINARY_LINK` for non-image files, which helps downstream code process the file correctly [[source](https://github.com/langgenius/dify/pull/29579)]. However, if your tool or plugin expects only LINK types, this could cause compatibility issues. To troubleshoot: - Check if your custom tool emits file outputs and ensure the output message includes all required metadata (especially `mime_type` and a valid file reference). - Make sure the file record exists in the database and the file URL is accessible. - If you control the tool, try emitting `BINARY_LINK` messages for files, or update the downstream logic to handle LINK messages by reconstructing file objects from URLs. - If the tool is not emitting file outputs, check for any blocking code, infinite loops, or unhandled exceptions in the tool's implementation, as these can also cause the node to hang [[source](https://github.com/langgenius/dify/blob/9701a2994b7beee1bdc3f7531a62dfc3b094a54e/api/core/workflow/nodes/tool/tool_node.py#L53-L448)]. If you can share more details about the type of custom tool (API, plugin, script) and whether it emits file outputs, I can help with more targeted troubleshooting steps. <!-- 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/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3f65d64d-a7a4-4225-92c7-46345b3fae07?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%20issue%20is%20often%20caused%20by%20how%20Dify%20handles%20file%20outputs%20from%20custom%20tools%20in%20workflows.%20If%20your%20tool%20emits%20a%20file%20%28or%20blob%29%20result%2C%20Dify%27s%20message%20transformation%20logic%20may%20convert%20file%20objects%20into%20LINK%20messages%2C%20but%20the%20downstream%20workflow%20code%20might%20not%20reconstruct%20the%20file%20object%20correctly.%20This%20can%20leave%20the%20node%20stuck%20in%20the%20%22running%22%20state%20or%20cause%20it%20to%20return%20empty%20results%2C%20especially%20if%20the%20file%20metadata%20is%20missing%20or%20malformed%2C%20or%20if%20the%20file%20record%20can%27t%20be%20found%20in%20the%20database.%20Similar%20issues%20have%20been%20reported%20and%20analyzed%20in%20detail%2C%20with%20the%20root%20cause%20traced%20to%20message%20transformation%20and%20file%20handling%20logic%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/26431%29%5D.%0A%0ARecent%20fixes%20have%20improved%20handling%20for%20cases%20where%20the%20mime%20type%20is%20missing%20or%20set%20to%20None%2C%20defaulting%20it%20to%20%60application/octet-stream%60%20and%20ensuring%20the%20message%20type%20is%20set%20to%20%60BINARY_LINK%60%20for%20non-image%20files%2C%20which%20helps%20downstream%20code%20process%20the%20file%20correctly%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/pull/29579%29%5D.%20However%2C%20if%20your%20tool%20or%20plugin%20expects%20only%20LINK%20types%2C%20this%20could%20cause%20compatibility%20issues.%0A%0ATo%20troubleshoot%3A%0A-%20Check%20if%20your%20custom%20tool%20emits%20file%20outputs%20and%20ensure%20the%20output%20message%20includes%20all%20required%20metadata%20%28especially%20%60mime_type%60%20and%20a%20valid%20file%20reference%29.%0A-%20Make%20sure%20the%20file%20record%20exists%20in%20the%20database%20and%20the%20file%20URL%20is%20accessible.%0A-%20If%20you%20control%20the%20tool%2C%20try%20emitting%20%60BINARY_LINK%60%20messages%20for%20files%2C%20or%20update%20the%20downstream%20logic%20to%20handle%20LINK%20messages%20by%20reconstructing%20file%20objects%20from%20URLs.%0A-%20If%20the%20tool%20is%20not%20emitting%20file%20outputs%2C%20check%20for%20any%20blocking%20code%2C%20infinite%20loops%2C%20or%20unhandled%20exceptions%20in%20the%20tool%27s%20implementation%2C%20as%20these%20can%20also%20cause%20the%20node%20to%20hang%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify/blob/9701a2994b7beee1bdc3f7531a62dfc3b094a54e/api/core/workflow/nodes/tool/tool_node.py%23L53-L448%29%5D.%0A%0AIf%20you%20can%20share%20more%20details%20about%20the%20type%20of%20custom%20tool%20%28API%2C%20plugin%2C%20script%29%20and%20whether%20it%20emits%20file%20outputs%2C%20I%20can%20help%20with%20more%20targeted%20troubleshooting%20steps.)&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/30035)
Author
Owner

@960128119 commented on GitHub (Dec 24, 2025):

Why does a node occasionally get stuck in the Running state and fail to proceed further? @dosu

@960128119 commented on GitHub (Dec 24, 2025): Why does a node occasionally get stuck in the Running state and fail to proceed further? @dosu
Author
Owner

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

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

Issue Summary:

  • You reported that in Dify v1.10.1-fix (cloud), a custom tool gets stuck running without returning results, causing workflow stalls.
  • The issue often relates to how Dify transforms file outputs from custom tools into LINK messages but may fail to reconstruct them properly if metadata is missing or files are inaccessible.
  • Recent fixes addressed missing mime types and message type handling, but compatibility issues may persist if tools expect only LINK types.
  • I suggest troubleshooting by verifying file output metadata, database records, and checking for blocking code or exceptions in your tool implementation.

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, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 24, 2026): Hi, @Jiixiang. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify v1.10.1-fix (cloud), a custom tool gets stuck running without returning results, causing workflow stalls. - The issue often relates to how Dify transforms file outputs from custom tools into LINK messages but may fail to reconstruct them properly if metadata is missing or files are inaccessible. - Recent fixes addressed missing mime types and message type handling, but compatibility issues may persist if tools expect only LINK types. - I suggest troubleshooting by verifying file output metadata, database records, and checking for blocking code or exceptions in your tool implementation. **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, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@Jiixiang commented on GitHub (Jan 25, 2026):

Hi, @Jiixiang. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.您好,我是 Dosu ,我正在帮助 Dify 团队管理他们的待办事项,并将此问题标记为已过时。

Issue Summary:  问题概要:

  • You reported that in Dify v1.10.1-fix (cloud), a custom tool gets stuck running without returning results, causing workflow stalls.您报告称,在 Dify v1.10.1-fix(云)中,自定义工具会卡在运行过程中不返回结果,导致工作流程停滞。
  • The issue often relates to how Dify transforms file outputs from custom tools into LINK messages but may fail to reconstruct them properly if metadata is missing or files are inaccessible.这个问题通常与 Dify 如何将自定义工具的文件输出转换为 LINK 消息有关,但如果缺少元数据或文件无法访问,则可能无法正确重建这些消息。
  • Recent fixes addressed missing mime types and message type handling, but compatibility issues may persist if tools expect only LINK types.最近的修复解决了缺失的 MIME 类型和消息类型处理问题,但如果工具仅期望 LINK 类型,则兼容性问题可能仍然存在。
  • I suggest troubleshooting by verifying file output metadata, database records, and checking for blocking code or exceptions in your tool implementation.我建议通过验证文件输出元数据、数据库记录,并检查工具实现中是否存在阻塞代码或异常来进行故障排除���

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.如果最新版本的 Dify 仍然存在此问题,请在此处留言,以便我们继续讨论。
  • Otherwise, this issue will be automatically closed in 15 days.否则,此问题将在 15 天后自动关闭。

Thank you for your understanding and contribution!感谢您的理解和支持!
After upgrading to version 1.11.3, it can now run normally. However, for studios with many nodes, the execution speed is extremely slow. Even the start node alone takes about 4 seconds to run.

@Jiixiang commented on GitHub (Jan 25, 2026): > Hi, [@Jiixiang](https://github.com/Jiixiang). I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale.您好,我是 [Dosu](https://dosu.dev) ,我正在帮助 Dify 团队管理他们的待办事项,并将此问题标记为已过时。 > > **Issue Summary:  问题概要:** > > * You reported that in Dify v1.10.1-fix (cloud), a custom tool gets stuck running without returning results, causing workflow stalls.您报告称,在 Dify v1.10.1-fix(云)中,自定义工具会卡在运行过程中不返回结果,导致工作流程停滞。 > * The issue often relates to how Dify transforms file outputs from custom tools into LINK messages but may fail to reconstruct them properly if metadata is missing or files are inaccessible.这个问题通常与 Dify 如何将自定义工具的文件输出转换为 LINK 消息有关,但如果缺少元数据或文件无法访问,则可能无法正确重建这些消息。 > * Recent fixes addressed missing mime types and message type handling, but compatibility issues may persist if tools expect only LINK types.最近的修复解决了缺失的 MIME 类型和消息类型处理问题,但如果工具仅期望 LINK 类型,则兼容性问题可能仍然存在。 > * I suggest troubleshooting by verifying file output metadata, database records, and checking for blocking code or exceptions in your tool implementation.我建议通过验证文件输出元数据、数据库记录,并检查工具实现中是否存在阻塞代码或异常来进行故障排除��� > > **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.如果最新版本的 Dify 仍然存在此问题,请在此处留言,以便我们继续讨论。 > * Otherwise, this issue will be automatically closed in 15 days.否则,此问题将在 15 天后自动关闭。 > > Thank you for your understanding and contribution!感谢您的理解和支持! After upgrading to version 1.11.3, it can now run normally. However, for studios with many nodes, the execution speed is extremely slow. Even the start node alone takes about 4 seconds to run.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21228