The reverse call with the conversation_id parameter resulted in an exception. #16142

Closed
opened 2026-02-21 19:24:48 -05:00 by yindo · 14 comments
Owner

Originally created by @he-ding on GitHub (Aug 13, 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.7.2

Cloud or Self Hosted

Cloud

Steps to reproduce

Due to the company's LLM, I can't use the Agent node in the Chat flow, so I wrote a tool plug-in and used the plug-in's reverse call method to call the Agent APP in the Chat flow node. I used self.session.app.chat.invoke(). When I set an empty string to the conversation_id parameter, it responded normally, but when I set the conversation_id parameter to the ID returned by the first call, an error occurred.

Image

✔️ Expected Behavior

After setting the conversation ID in the conversation_id parameter, the response worked.

Actual Behavior

Image
Originally created by @he-ding on GitHub (Aug 13, 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.7.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce Due to the company's LLM, I can't use the Agent node in the Chat flow, so I wrote a tool plug-in and used the plug-in's reverse call method to call the Agent APP in the Chat flow node. I used self.session.app.chat.invoke(). When I set an empty string to the conversation_id parameter, it responded normally, but when I set the conversation_id parameter to the ID returned by the first call, an error occurred. <img width="1078" height="503" alt="Image" src="https://github.com/user-attachments/assets/d7ee8caa-6eda-4b2b-bfb3-20dae7e25af4" /> ### ✔️ Expected Behavior After setting the conversation ID in the conversation_id parameter, the response worked. ### ❌ Actual Behavior <img width="1248" height="627" alt="Image" src="https://github.com/user-attachments/assets/8eae77d0-88a6-4749-9ab1-e3005c810fd3" />
yindo added the 🤖 feat:agent label 2026-02-21 19:24:48 -05:00
yindo closed this issue 2026-02-21 19:24:48 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 13, 2025):

When using the conversation_id parameter in Dify, you must use the exact system-generated conversation_id returned from the initial API response to continue an existing conversation. If you pass an empty string, a new conversation is created, which is why that works. If you pass a conversation_id that does not exist, is expired, or has been flagged (for example, due to sensitive content moderation), you will get a 400 error or "invalid_param" response. Make sure you are not using a custom or modified conversation_id, as only the system-generated IDs are valid for continuation—using anything else will result in a "conversation not exists" error reference reference.

If the conversation_id was flagged (e.g., by a model like qwen-plus for sensitive content), it becomes permanently unusable for further messages reference. In that case, you must start a new conversation.

If you are following these rules and still see errors, double-check that the conversation_id is being passed exactly as returned, and that the conversation has not been invalidated or deleted. If the issue persists, capturing the full error message and API response details will help pinpoint the cause.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 13, 2025): <!-- Answer --> When using the conversation_id parameter in Dify, you must use the exact system-generated conversation_id returned from the initial API response to continue an existing conversation. If you pass an empty string, a new conversation is created, which is why that works. If you pass a conversation_id that does not exist, is expired, or has been flagged (for example, due to sensitive content moderation), you will get a 400 error or "invalid_param" response. Make sure you are not using a custom or modified conversation_id, as only the system-generated IDs are valid for continuation—using anything else will result in a "conversation not exists" error [reference](https://github.com/langgenius/dify/issues/11637) [reference](https://github.com/langgenius/dify/issues/14462). If the conversation_id was flagged (e.g., by a model like qwen-plus for sensitive content), it becomes permanently unusable for further messages [reference](https://github.com/langgenius/dify/issues/11779). In that case, you must start a new conversation. If you are following these rules and still see errors, double-check that the conversation_id is being passed exactly as returned, and that the conversation has not been invalidated or deleted. If the issue persists, capturing the full error message and API response details will help pinpoint the cause. <!-- 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/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a1d65652-21d4-4818-8fd6-ab54c8ede0b6?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/23911)
Author
Owner

@he-ding commented on GitHub (Aug 13, 2025):

Yes, I'm absolutely sure I used the conversation_id returned from the first conversation and didn't modify it in any way.

@he-ding commented on GitHub (Aug 13, 2025): Yes, I'm absolutely sure I used the conversation_id returned from the first conversation and didn't modify it in any way.
Author
Owner

@dosubot[bot] commented on GitHub (Aug 13, 2025):

Given your setup, the most common reasons for a 400 "invalid_param" error with a valid conversation_id are:

  • The conversation was deleted (either manually, by moderation, or by system cleanup).
  • The user context (EndUser vs Account) or app_id does not match between the original and subsequent calls.
  • The conversation_id is being used in a different context (e.g., different plugin, tenant, or user session) than it was created with.

Dify strictly checks that the conversation_id exists, is not deleted, and matches the app_id and user context for every call—if any of these don't match, you'll get this error reference. There is no special logic for reverse/plugin calls; they use the same validation.

If you have access to backend logs or can inspect the conversation record, check that the conversation is not marked as deleted and that the user/app context is identical between calls. If everything matches and the issue persists, capturing the full API request/response and conversation status will help pinpoint the cause.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 13, 2025): <!-- Answer --> Given your setup, the most common reasons for a 400 "invalid_param" error with a valid conversation_id are: - The conversation was deleted (either manually, by moderation, or by system cleanup). - The user context (EndUser vs Account) or app_id does not match between the original and subsequent calls. - The conversation_id is being used in a different context (e.g., different plugin, tenant, or user session) than it was created with. Dify strictly checks that the conversation_id exists, is not deleted, and matches the app_id and user context for every call—if any of these don't match, you'll get this error [reference](https://github.com/langgenius/dify/blob/9e29309ffd026fa519f570f71098e7e705aa5333/api/services/conversation_service.py). There is no special logic for reverse/plugin calls; they use the same validation. If you have access to backend logs or can inspect the conversation record, check that the conversation is not marked as deleted and that the user/app context is identical between calls. If everything matches and the issue persists, capturing the full API request/response and conversation status will help pinpoint the cause. <!-- 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/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d54236f6-eae1-41f7-977a-7e7d3f3dc0cf?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/23911)
Author
Owner

@he-ding commented on GitHub (Aug 14, 2025):

Okay, as you said, the conversation_id does need to match the user information, and I verified this using Postman. Therefore, the error above is caused by not passing the user parameter when calling the self.session.app.chat.invoke method in the plugin. However, when I passed the user parameter to the self.session.app.chat.invoke method, a new error occurred (as shown in the figure). self.session.app.chat.invoke does not support the user parameter, so what should I do next? @dosu

Image
@he-ding commented on GitHub (Aug 14, 2025): Okay, as you said, the conversation_id does need to match the user information, and I verified this using Postman. Therefore, the error above is caused by not passing the user parameter when calling the self.session.app.chat.invoke method in the plugin. However, when I passed the user parameter to the self.session.app.chat.invoke method, a new error occurred (as shown in the figure). self.session.app.chat.invoke does not support the user parameter, so what should I do next? @dosu <img width="397" height="303" alt="Image" src="https://github.com/user-attachments/assets/aa049966-4ad1-4586-8115-c56b3e73f15f" />
Author
Owner

@dosubot[bot] commented on GitHub (Aug 14, 2025):

The error happens because self.session.app.chat.invoke does not support a user parameter—passing it causes a TypeError. Dify manages user context internally, so you should not try to pass user directly in plugin calls. Instead, the recommended pattern is to use the backend service method (like PluginAppBackwardsInvocation.invoke_app), which resolves the user context and calls the internal generate() method with the correct user and conversation_id for you see code reference.

If you are writing a custom plugin or tool, make sure it is invoked within the correct user session/context, and let Dify handle user resolution. Do not attempt to pass user as a parameter to invoke(). If you need to manually invoke chat with user context, you should use the generate() method of the appropriate chat app generator (e.g., ChatAppGenerator.generate), which accepts a user object and conversation_id see example.

Example pattern:

# Pseudocode for correct invocation in plugin/reverse call
from core.plugin.backwards_invocation.app import PluginAppBackwardsInvocation

response = PluginAppBackwardsInvocation.invoke_app(
    app_id=your_app_id,
    user_id=your_user_id,
    tenant_id=your_tenant_id,
    conversation_id=your_conversation_id,
    query=your_query,
    stream=False,
    inputs=your_inputs,
    files=[]
)

This ensures user context and conversation_id are matched correctly. If your plugin is running outside the intended workflow/session context, conversation_id validation will fail.

Let me know if you need help adapting your plugin to this pattern!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 14, 2025): <!-- Answer --> The error happens because `self.session.app.chat.invoke` does not support a `user` parameter—passing it causes a TypeError. Dify manages user context internally, so you should not try to pass `user` directly in plugin calls. Instead, the recommended pattern is to use the backend service method (like `PluginAppBackwardsInvocation.invoke_app`), which resolves the user context and calls the internal `generate()` method with the correct user and conversation_id for you [see code reference](https://github.com/langgenius/dify/blob/8d472135294aadaced6f0b71288738f6c3a4e5da/api/core/plugin/backwards_invocation/app.py). If you are writing a custom plugin or tool, make sure it is invoked within the correct user session/context, and let Dify handle user resolution. Do not attempt to pass `user` as a parameter to `invoke()`. If you need to manually invoke chat with user context, you should use the `generate()` method of the appropriate chat app generator (e.g., `ChatAppGenerator.generate`), which accepts a user object and conversation_id [see example](https://github.com/langgenius/dify/blob/8d472135294aadaced6f0b71288738f6c3a4e5da/api/core/app/apps/chat/app_generator.py). **Example pattern:** ```python # Pseudocode for correct invocation in plugin/reverse call from core.plugin.backwards_invocation.app import PluginAppBackwardsInvocation response = PluginAppBackwardsInvocation.invoke_app( app_id=your_app_id, user_id=your_user_id, tenant_id=your_tenant_id, conversation_id=your_conversation_id, query=your_query, stream=False, inputs=your_inputs, files=[] ) ``` This ensures user context and conversation_id are matched correctly. If your plugin is running outside the intended workflow/session context, conversation_id validation will fail. Let me know if you need help adapting your plugin to this pattern! <!-- 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/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7d5c618e-c48f-4ab9-b2ac-e00e88d4cc04?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/23911)
Author
Owner

@he-ding commented on GitHub (Aug 14, 2025):

I can't import PluginAppBackwardsInvocation using the 'from core.plugin.backwards_invocation.app import PluginAppBackwardsInvocation' method in the tool plugin because the plugin development environment only has a module named dify_plugin, not a core module. So, how do I import PluginAppBackwardsInvocation or ChatAppGenerator.generate in the tool plugin environment? Please provide specific code examples.@dosu

@he-ding commented on GitHub (Aug 14, 2025): I can't import PluginAppBackwardsInvocation using the 'from core.plugin.backwards_invocation.app import PluginAppBackwardsInvocation' method in the tool plugin because the plugin development environment only has a module named dify_plugin, not a core module. So, how do I import PluginAppBackwardsInvocation or ChatAppGenerator.generate in the tool plugin environment? Please provide specific code examples.@dosu
Author
Owner

@yazf01 commented on GitHub (Sep 3, 2025):

This issue mainly occurs during preview. If the chatflow is published and used as an app, the function of passing the conversation_id works normally. However, when used in preview, passing the conversation_id will result in the error described above.

@yazf01 commented on GitHub (Sep 3, 2025): This issue mainly occurs during preview. If the chatflow is published and used as an app, the function of passing the conversation_id works normally. However, when used in preview, passing the conversation_id will result in the error described above.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 4, 2025):

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

Issue Summary:

  • You reported exceptions when setting a valid conversation_id in reverse calls on Dify 1.7.2 Cloud, while empty strings worked fine.
  • The root cause was identified as passing an incorrect user context in plugin calls, especially in preview mode.
  • The conversation_id must exactly match the system-generated ID tied to the correct user/app context and not be deleted or flagged.
  • Published apps handle conversation_id correctly, but the plugin environment lacks direct access to core modules like PluginAppBackwardsInvocation.
  • Proper user context alignment is essential to avoid these errors.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of Dify, and if so, feel free to keep the discussion open by commenting here.
  • Otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Oct 4, 2025): Hi, @he-ding. 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 exceptions when setting a valid conversation_id in reverse calls on Dify 1.7.2 Cloud, while empty strings worked fine. - The root cause was identified as passing an incorrect user context in plugin calls, especially in preview mode. - The conversation_id must exactly match the system-generated ID tied to the correct user/app context and not be deleted or flagged. - Published apps handle conversation_id correctly, but the plugin environment lacks direct access to core modules like PluginAppBackwardsInvocation. - Proper user context alignment is essential to avoid these errors. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of Dify, and if so, feel free to keep the discussion open by commenting here. - Otherwise, I will automatically close this issue in 15 days. Thank you for your understanding and contribution!
Author
Owner

@w2534073922 commented on GitHub (Oct 15, 2025):

@he-ding

Have you solved this problem? I encountered the same situation. When calling the app from the plugin and passing the conversation_id, it failed.

Traceback (most recent call last):
File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/endpoints/popo_application_bot_callback.py", line 210, in call_agent
response = self.session.app.chat.invoke(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/invocations/app/chat.py", line 55, in invoke
for data in response:
File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/core/runtime.py", line 315, in _full_duplex_backwards_invoke
yield from self._line_converter_wrapper(reader.read(timeout_for_round=1), data_type)
File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/core/runtime.py", line 209, in _line_converter_wrapper
raise Exception("invocation exited without response")
Exception: invocation exited without response

@w2534073922 commented on GitHub (Oct 15, 2025): @he-ding Have you solved this problem? I encountered the same situation. When calling the app from the plugin and passing the conversation_id, it failed. Traceback (most recent call last): File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/endpoints/popo_application_bot_callback.py", line 210, in call_agent response = self.session.app.chat.invoke( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/invocations/app/chat.py", line 55, in invoke for data in response: File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/core/runtime.py", line 315, in _full_duplex_backwards_invoke yield from self._line_converter_wrapper(reader.read(timeout_for_round=1), data_type) File "/app/storage/cwd/wangfeng/popo_open_platform-1.0.9@f324f8a80f60ab36a14fa40f945fcef6e96cb9958e4935dbf93a20a6b74e595f/.venv/lib/python3.12/site-packages/dify_plugin/core/runtime.py", line 209, in _line_converter_wrapper raise Exception("invocation exited without response") Exception: invocation exited without response
Author
Owner

@yazf01 commented on GitHub (Oct 15, 2025):

@w2534073922 try v1.9.0. problem is solved in 1.9.0

@yazf01 commented on GitHub (Oct 15, 2025): @w2534073922 try v1.9.0. problem is solved in 1.9.0
Author
Owner

@w2534073922 commented on GitHub (Oct 15, 2025):

@yazf01
Do you know what the underlying cause of this bug is?
I upgraded to Dify version 1.9, but encountered another error:

invoke app failed: request failed with status code: 400 and respond with: {"code":"invalid_param","message":"user not found","status":400}
@w2534073922 commented on GitHub (Oct 15, 2025): @yazf01 Do you know what the underlying cause of this bug is? I upgraded to Dify version 1.9, but encountered another error: ``` invoke app failed: request failed with status code: 400 and respond with: {"code":"invalid_param","message":"user not found","status":400} ```
Author
Owner

@yazf01 commented on GitHub (Oct 15, 2025):

Ran into this issue during a PostgreSQL failure. Also saw a 'tenant not found' error at the same time. Haven't come across it in other scenarios though

@yazf01 commented on GitHub (Oct 15, 2025): Ran into this issue during a PostgreSQL failure. Also saw a 'tenant not found' error at the same time. Haven't come across it in other scenarios though
Author
Owner

@he-ding commented on GitHub (Oct 19, 2025):

Image i tryed in cloud.dify(dify version 1.9.1), found a 400error
@he-ding commented on GitHub (Oct 19, 2025): <img width="373" height="296" alt="Image" src="https://github.com/user-attachments/assets/d1085042-a2ed-4068-b797-2f68290a5a54" /> i tryed in cloud.dify(dify version 1.9.1), found a 400error
Author
Owner

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

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

Issue Summary:

  • You reported exceptions when setting a valid conversation_id in reverse calls on Dify 1.7.2 Cloud, while empty strings worked fine.
  • It was clarified that conversation_id must exactly match the system-generated ID tied to the correct user/app context, and incorrect user context in plugin calls causes errors.
  • You found that self.session.app.chat.invoke lacks a user parameter and were advised to use PluginAppBackwardsInvocation.invoke_app instead, but faced import issues in the plugin environment.
  • Another user noted the issue mainly occurred in preview mode and was resolved in Dify v1.9.0, though some still experienced user/tenant not found errors.
  • You confirmed a 400 error persists in cloud.dify v1.9.1.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of Dify; if so, you can keep the discussion open by commenting here.
  • Otherwise, I will automatically close this issue in 15 days.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 18, 2026): Hi, @he-ding. 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 exceptions when setting a valid conversation_id in reverse calls on Dify 1.7.2 Cloud, while empty strings worked fine. - It was clarified that conversation_id must exactly match the system-generated ID tied to the correct user/app context, and incorrect user context in plugin calls causes errors. - You found that self.session.app.chat.invoke lacks a user parameter and were advised to use PluginAppBackwardsInvocation.invoke_app instead, but faced import issues in the plugin environment. - Another user noted the issue mainly occurred in preview mode and was resolved in Dify v1.9.0, though some still experienced user/tenant not found errors. - You confirmed a 400 error persists in cloud.dify v1.9.1. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of Dify; if so, you can keep the discussion open by commenting here. - Otherwise, I will automatically close this issue in 15 days. Thanks 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#16142