dify - 💡(How to fix) Fix chatflows that are manually stopped by the user remain in a running state in the log system [4 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35549Fetched 2026-04-24 10:43:29
View on GitHub
Comments
4
Participants
2
Timeline
10
Reactions
1
Timeline (top)
commented ×4mentioned ×2subscribed ×2labeled ×1
RAW_BUFFERClick to expand / collapse

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When the agent continued to respond, I pressed the stop response button.

<img width="727" height="191" alt="Image" src="https://github.com/user-attachments/assets/ee8f17f3-6690-48a8-8f9f-971429bc932e" />

The agent has indeed stopped generating output.

<img width="1727" height="929" alt="Image" src="https://github.com/user-attachments/assets/eb30a3c6-2c47-43f5-9838-29b8cca61017" />

However, within the backend logging system—specifically when opening the conversation logs—the status of this particular log entry remains "running."

<img width="1727" height="929" alt="Image" src="https://github.com/user-attachments/assets/31ed3661-2264-4931-b55c-95da33ec6be1" />

Even after my next response has been generated which status has switched to "success"—the previous, interrupted session remains in a "running" state, and the token usage continues to display as 0.

<img width="1727" height="929" alt="Image" src="https://github.com/user-attachments/assets/9f380c41-78b8-4af8-9fb4-51e4c18025e4" />

✔️ Expected Behavior

The state of the interrupted conversation should transition to "stop" and the token consumption should be outputtable.

❌ Actual Behavior

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring proper state updates in the conversation logs when an agent's response is stopped.

Guidance

  • Investigate the backend logging system to identify why the conversation log entry remains in a "running" state after the agent's response is stopped.
  • Verify that the state update logic is correctly implemented to transition the conversation state to "stop" when the agent's response is interrupted.
  • Check the token usage calculation to ensure it accurately reflects the consumption after an interrupted session.
  • Review the logging system's data consistency to prevent discrepancies between the actual state and the displayed state.

Example

No code snippet can be provided without more context, but the fix likely involves updating the state transition logic in the conversation log entry.

Notes

The issue seems to be related to the state management and logging in the backend system. Without more information about the system's architecture and code, it's challenging to provide a precise solution.

Recommendation

Apply a workaround by manually updating the conversation log entry state to "stop" when an agent's response is interrupted, until the root cause is identified and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING