Agent side of conversation vanishing #7082

Closed
opened 2026-02-21 18:18:46 -05:00 by yindo · 14 comments
Owner

Originally created by @ScotTFO on GitHub (Dec 5, 2024).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.13.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create Agent
  2. Discuss with the agent
  3. Move to a different conversation
  4. Move back to initial conversation

✔️ Expected Behavior

The full conversation should exist between the user and agent

Actual Behavior

The agent side of the conversation is vanishing when revisiting.
image

Originally created by @ScotTFO on GitHub (Dec 5, 2024). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.13.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Create Agent 2. Discuss with the agent 3. Move to a different conversation 4. Move back to initial conversation ### ✔️ Expected Behavior The full conversation should exist between the user and agent ### ❌ Actual Behavior The agent side of the conversation is vanishing when revisiting. ![image](https://github.com/user-attachments/assets/3fcc4521-8266-49b0-b22e-c85dd57f1600)
yindo added the 🐞 bug label 2026-02-21 18:18:46 -05:00
yindo closed this issue 2026-02-21 18:18:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 5, 2024):

Hey @ScotTFO! 👋 I'm here to help you with bugs, questions, and becoming a contributor. If you need assistance, feel free to ask!

I found a similar unsolved discussion that might be related to your issue: i have problem with messages on conversationID. My agent does not have memory, which was last updated on October 30, 2024 [1].

Regarding your issue with the agent side of the conversation vanishing, it seems like there might be a problem with how conversation history is being managed or retrieved. Dify uses a conversation_id to maintain the continuity of conversations. When switching between conversations, it's crucial that the correct conversation_id is used to retrieve the full conversation history [2].

You might want to check if the conversation_id is being correctly managed and passed when switching back to the initial conversation. Additionally, ensure that there are no issues with the local storage state that keeps track of the current conversation_id for each app [2]. If the problem persists, it could be beneficial to look into the specific components or files responsible for storing and retrieving conversation history, although I couldn't find detailed information on those components in the repository.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 5, 2024): <!-- Greeting --> Hey @ScotTFO! 👋 I'm here to help you with bugs, questions, and becoming a contributor. If you need assistance, feel free to ask! <!-- Answer --> I found a similar unsolved discussion that might be related to your issue: [i have problem with messages on conversationID. My agent does not have memory](https://github.com/langgenius/dify/discussions/8974), which was last updated on October 30, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/8974)</sup>. Regarding your issue with the agent side of the conversation vanishing, it seems like there might be a problem with how conversation history is being managed or retrieved. Dify uses a `conversation_id` to maintain the continuity of conversations. When switching between conversations, it's crucial that the correct `conversation_id` is used to retrieve the full conversation history <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/application-publishing/developing-with-apis.md)</sup>. You might want to check if the `conversation_id` is being correctly managed and passed when switching back to the initial conversation. Additionally, ensure that there are no issues with the local storage state that keeps track of the current `conversation_id` for each app <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/application-publishing/developing-with-apis.md)</sup>. If the problem persists, it could be beneficial to look into the specific components or files responsible for storing and retrieving conversation history, although I couldn't find detailed information on those components in the repository. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@ScotTFO commented on GitHub (Dec 5, 2024):

@dosu that is not the same issue

@ScotTFO commented on GitHub (Dec 5, 2024): @dosu that is not the same issue
Author
Owner

@dosubot[bot] commented on GitHub (Dec 5, 2024):

If the issue you're experiencing is different, it might be helpful to check if conversation history is activated by ensuring that <histories> is included in the prompt. This can sometimes cause parts of the conversation to disappear if not set correctly [1]. Additionally, verifying that the conversation_id is consistently used and managed correctly when switching between conversations is crucial for maintaining the conversation history. If these steps don't resolve the issue, further investigation into the specific implementation details of your setup might be necessary.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 5, 2024): <!-- Answer --> If the issue you're experiencing is different, it might be helpful to check if conversation history is activated by ensuring that `<histories>` is included in the prompt. This can sometimes cause parts of the conversation to disappear if not set correctly <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/i18n/ko-KR/app-debug.ts)</sup>. Additionally, verifying that the `conversation_id` is consistently used and managed correctly when switching between conversations is crucial for maintaining the conversation history. If these steps don't resolve the issue, further investigation into the specific implementation details of your setup might be necessary. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Dec 5, 2024):

Before step 3, did the conversation finish generating things?

@crazywoola commented on GitHub (Dec 5, 2024): Before step 3, did the conversation finish generating things?
Author
Owner

@ScotTFO commented on GitHub (Dec 5, 2024):

Before step 3, did the conversation finish generating things?

Yes it did. I have other full conversations with about 20 back and forths and the same thing happened.

@ScotTFO commented on GitHub (Dec 5, 2024): > Before step 3, did the conversation finish generating things? Yes it did. I have other full conversations with about 20 back and forths and the same thing happened.
Author
Owner

@crazywoola commented on GitHub (Dec 5, 2024):

Before step 3, did the conversation finish generating things?

Yes it did. I have other full conversations with about 20 back and forths and the same thing happened.

Can you paste the logs of the chat bubble, you can hover the mouse on it and get the output log there.

@crazywoola commented on GitHub (Dec 5, 2024): > > Before step 3, did the conversation finish generating things? > > Yes it did. I have other full conversations with about 20 back and forths and the same thing happened. Can you paste the logs of the chat bubble, you can hover the mouse on it and get the output log there.
Author
Owner

@zolgear commented on GitHub (Dec 5, 2024):

Switching the conversation during the output of a lengthy source code response reproduces the issue.

However, this behavior appears to be the same as explicitly pressing "Stop responding," so it seems to be by design.

@zolgear commented on GitHub (Dec 5, 2024): Switching the conversation during the output of a lengthy source code response reproduces the issue. However, this behavior appears to be the same as explicitly pressing "Stop responding," so it seems to be by design.
Author
Owner

@ScotTFO commented on GitHub (Dec 5, 2024):

Before step 3, did the conversation finish generating things?

Yes it did. I have other full conversations with about 20 back and forths and the same thing happened.

Can you paste the logs of the chat bubble, you can hover the mouse on it and get the output log there.

image

@ScotTFO commented on GitHub (Dec 5, 2024): > > > Before step 3, did the conversation finish generating things? > > > > > > Yes it did. I have other full conversations with about 20 back and forths and the same thing happened. > > Can you paste the logs of the chat bubble, you can hover the mouse on it and get the output log there. ![image](https://github.com/user-attachments/assets/c2a5393b-f18d-4653-bc20-684b593df151)
Author
Owner

@ScotTFO commented on GitHub (Dec 5, 2024):

Switching the conversation during the output of a lengthy source code response reproduces the issue.

However, this behavior appears to be the same as explicitly pressing "Stop responding," so it seems to be by design.

I will check and see if that is the case for me as well, but in this instance, I did allow the text to finish generating. I was when I left the conversation and later came back to it that the replies were then missing.

@ScotTFO commented on GitHub (Dec 5, 2024): > Switching the conversation during the output of a lengthy source code response reproduces the issue. > > However, this behavior appears to be the same as explicitly pressing "Stop responding," so it seems to be by design. I will check and see if that is the case for me as well, but in this instance, I did allow the text to finish generating. I was when I left the conversation and later came back to it that the replies were then missing.
Author
Owner

@ScotTFO commented on GitHub (Dec 6, 2024):

I did a bit more testing, and as far as I can tell, this behavior is specific to using the o1-preview model for OpenAI. When I switched to GPT-4o, it was working as expected.

@ScotTFO commented on GitHub (Dec 6, 2024): I did a bit more testing, and as far as I can tell, this behavior is specific to using the o1-preview model for OpenAI. When I switched to GPT-4o, it was working as expected.
Author
Owner

@sofs2005 commented on GitHub (Dec 7, 2024):

this issue happened very often after I upgraded to 0.13.1, and I'm using gpt-40-mini.
in history I can see the reply, but front end just empty.

@sofs2005 commented on GitHub (Dec 7, 2024): this issue happened very often after I upgraded to 0.13.1, and I'm using gpt-40-mini. in history I can see the reply, but front end just empty.
Author
Owner

@sofs2005 commented on GitHub (Dec 7, 2024):

this issue happened very often after I upgraded to 0.13.1, and I'm using gpt-40-mini. in history I can see the reply, but front end just empty.

after I reversed to 0.13.0, it's better

@sofs2005 commented on GitHub (Dec 7, 2024): > this issue happened very often after I upgraded to 0.13.1, and I'm using gpt-40-mini. in history I can see the reply, but front end just empty. after I reversed to 0.13.0, it's better
Author
Owner

@zolgear commented on GitHub (Dec 8, 2024):

The issue was reproduced with the agent (default) + GPT-4o-mini (Azure).

From the nginx logs and browser requests, it appears that a stop was requested even though the conversation had already been completed.

Since the data is stored in the database, switching the conversation twice caused it to display properly.

@zolgear commented on GitHub (Dec 8, 2024): The issue was reproduced with the agent (default) + GPT-4o-mini (Azure). From the nginx logs and browser requests, it appears that a stop was requested even though the conversation had already been completed. Since the data is stored in the database, switching the conversation twice caused it to display properly.
Author
Owner

@dosubot[bot] commented on GitHub (Jan 9, 2025):

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

Issue Summary

  • Reported bug in Dify version 0.13.1 where the agent's conversation disappears upon revisiting.
  • Issue linked to conversation_id management, specific to the o1-preview model for OpenAI.
  • Switching to the GPT-4o model resolves the problem.
  • User zolgear suggested it might be a design feature related to switching conversations.
  • Sofs2005 experienced similar issues, resolved by reverting to version 0.13.0.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of Dify.
  • If no further updates are provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 9, 2025): Hi, @ScotTFO. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary** - Reported bug in Dify version 0.13.1 where the agent's conversation disappears upon revisiting. - Issue linked to `conversation_id` management, specific to the o1-preview model for OpenAI. - Switching to the GPT-4o model resolves the problem. - User zolgear suggested it might be a design feature related to switching conversations. - Sofs2005 experienced similar issues, resolved by reverting to version 0.13.0. **Next Steps** - Please confirm if this issue is still relevant to the latest version of Dify. - If no further updates are provided, the issue will be automatically closed 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#7082