fix(delegation): update live-transcript manifest on async completion - #72771
Closed
plcunha wants to merge 1 commit into
Closed
fix(delegation): update live-transcript manifest on async completion#72771plcunha wants to merge 1 commit into
plcunha wants to merge 1 commit into
Conversation
Collaborator
Related to #67479: that merged live-transcript infrastructure updates manifest statuses on synchronous aggregation, while this focused follow-up adds the missing async-finalization updates. |
plcunha
force-pushed
the
fix/delegation-manifest-async-update
branch
from
July 29, 2026 15:22
9126109 to
d941c42
Compare
The synchronous subagent path in delegate_tool calls update_manifest_statuses() after every batch aggregates, so the cache/delegation/live/<id>/manifest.json always reflects the final per-task statuses. The background-pool path (_finalize for single subagents and _finalize_batch for fan-out batches) was missing this call, so completed tasks appeared as 'running' forever even after their .log files recorded 'final | status=completed'. The Desktop and status-bar subagent indicators read manifest.json directly, so this gap caused the UI to show '1 Background' / 'Thinking' indefinitely for every async delegation, even when all work had already finished. Add update_manifest_statuses to both _finalize and _finalize_batch, wrapped in best-effort try/except so a manifest write failure never blocks delivery of the completion event to the chat.
plcunha
force-pushed
the
fix/delegation-manifest-async-update
branch
from
July 29, 2026 18:48
d941c42 to
d3f89eb
Compare
Contributor
|
Thanks for the focused investigation and regression coverage. Automated hermes-sweeper review found this behavior is already implemented on current
The proposed tests invoke |
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
Keep live-transcript manifests synchronized when background
delegate_taskworkers finish. Both single-child and batch finalization now write terminal per-task statuses throughupdate_manifest_statuses(), so Desktop/status consumers no longer see completed children as perpetually running.The manifest update is best-effort and intentionally occurs after completion delivery; a filesystem/logging failure cannot suppress the result returning to the parent conversation.
RED proof
The regression tests were copied onto unfixed
origin/main(cff972858) and run there:After the fix:
Code path trace
cache/delegation/live/<id>/manifest.jsoncan remainstatus=runningindefinitely.update_manifest_statuses(), while_finalize()and_finalize_batch()only publish completion events and durable state.delegation_live_log.Widening audit
[result].combined.results.Verification
Validated on PR head
d3f89eb0c. GitHub reports the branch mergeable with all required checks passing against the current base.