fix(agent): preserve completed thought elapsed time - #39777
Open
qdivan wants to merge 1 commit into
Open
Conversation
qdivan
marked this pull request as ready for review
July 29, 2026 19:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
elapsed_timewhen the final log for the samemessage_idreports0or omits the fieldCloses #39757.
Validation
4 failed, 6 passedagainst the unpatched implementationPYTHONDONTWRITEBYTECODE=1 uv run --project api pytest -p no:cacheprovider -o addopts='' api/tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.py -q(10 passed)uv run --project api --dev ruff check api/core/workflow/nodes/agent/message_transformer.py api/tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.pyuv run --project api --dev ruff format --check api/core/workflow/nodes/agent/message_transformer.py api/tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.pygit diff --checkDuplicate Check
Checked the live issue timeline, open and closed pull requests by issue number, affected symbols, paths, and behavior, plus the current canonical
mainat72c20daa61adb2448caa02f7d4e807af35f6a84e. No equivalent active fix, merged fix, public implementation claim, assignment, or contribution lock was found. PRs #35301, #35574, and #35932 concern different UI or behavior boundaries.Browser / Playwright
Not run. The regression is isolated to backend Agent log aggregation and is deterministically covered by unit tests. A full browser reproduction requires a configured Dify service, model/Agent plugin, and workflow; no frontend code is changed.