message tracing does not work when there are more than 3 messages in one conversation #15710

Closed
opened 2026-02-21 19:23:01 -05:00 by yindo · 5 comments
Owner

Originally created by @ufo009e on GitHub (Jul 28, 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.0 docker

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In one agent, generates 4 messages, then go the agent console page, logs, select this conversation, click any messages and click tracing. The detailed messages info block just disappeared without showing anything.

Image

✔️ Expected Behavior

I should be able to see the llm, tools call details result when click tracking

Actual Behavior

No response

Originally created by @ufo009e on GitHub (Jul 28, 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.0 docker ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce In one agent, generates 4 messages, then go the agent console page, logs, select this conversation, click any messages and click tracing. The detailed messages info block just disappeared without showing anything. <img width="591" height="410" alt="Image" src="https://github.com/user-attachments/assets/b903f4ef-271c-4d25-9d1d-71b49917535d" /> ### ✔️ Expected Behavior I should be able to see the llm, tools call details result when click tracking ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:23:01 -05:00
yindo closed this issue 2026-02-21 19:23:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 28, 2025):

This issue is caused by how the frontend builds the chat message tree: it assumes every message is part of a strict question/answer pair. If the conversation data isn't perfectly paired (for example, if there's an odd number of messages or a missing counterpart), the UI logic can silently fail, making the tracing panel disappear or not render any details. There is no hardcoded 3-message limit in the backend or frontend; the problem is with how the frontend processes the message list structure [source].

As a workaround, check that your conversations have even numbers of question/answer pairs and no orphaned messages. If you have access to the database, you can look for any incomplete or mismatched message pairs in the affected conversation and correct them. Improving the frontend logic to handle unpaired messages more gracefully would also help prevent this issue in the future.

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 (Jul 28, 2025): <!-- Answer --> This issue is caused by how the frontend builds the chat message tree: it assumes every message is part of a strict question/answer pair. If the conversation data isn't perfectly paired (for example, if there's an odd number of messages or a missing counterpart), the UI logic can silently fail, making the tracing panel disappear or not render any details. There is no hardcoded 3-message limit in the backend or frontend; the problem is with how the frontend processes the message list structure [[source]](https://github.com/langgenius/dify/blob/bd5b9385719e642cad37c32e725ca8846b8d192d/web/app/components/base/chat/utils.ts). As a workaround, check that your conversations have even numbers of question/answer pairs and no orphaned messages. If you have access to the database, you can look for any incomplete or mismatched message pairs in the affected conversation and correct them. Improving the frontend logic to handle unpaired messages more gracefully would also help prevent this issue in the future. <!-- 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/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b7aad127-e58d-4d91-8cf0-91c73ac96814?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/23034)
Author
Owner

@crazywoola commented on GitHub (Jul 28, 2025):

Is this an Agent application?

@crazywoola commented on GitHub (Jul 28, 2025): Is this an Agent application?
Author
Owner

@ufo009e commented on GitHub (Jul 28, 2025):

Is this an Agent application?

Yes, I did not try workflow, not sure if same issue also applies to workflow.

@ufo009e commented on GitHub (Jul 28, 2025): > Is this an Agent application? Yes, I did not try workflow, not sure if same issue also applies to workflow.
Author
Owner

@crazywoola commented on GitHub (Jul 29, 2025):

Image

Sorry but I can not reproduce this in our latest version.

@crazywoola commented on GitHub (Jul 29, 2025): <img width="2904" height="1524" alt="Image" src="https://github.com/user-attachments/assets/d5145b3d-08c3-4cd1-89d0-3a0e81784ae1" /> Sorry but I can not reproduce this in our latest version.
Author
Owner

@ufo009e commented on GitHub (Jul 30, 2025):

I upgraded to 1.7.1 and I still can see this problem. Even when this is no tools or knowledges linked to this Agent

@ufo009e commented on GitHub (Jul 30, 2025): I upgraded to 1.7.1 and I still can see this problem. Even when this is no tools or knowledges linked to this Agent
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15710