Skip to content

fix(workflow): isolate nested tool context and stabilize delegate UI#280

Merged
duguwanglong merged 1 commit into
devfrom
fix/workflow-delegate-card-and-tool-state
May 18, 2026
Merged

fix(workflow): isolate nested tool context and stabilize delegate UI#280
duguwanglong merged 1 commit into
devfrom
fix/workflow-delegate-card-and-tool-state

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

@xiami762 xiami762 commented May 18, 2026

Summary

  • Use a child ToolContext without metadata callbacks when executing workflows so nested tools cannot overwrite run_workflow card metadata (which previously made the UI treat workflow runs like delegate/subagent cards).
  • Report completed (not running) on successful task / delegate_task tool results for consistent status.
  • Skip persisting stale pending/running tool part updates when the stored part is already terminal (completed/error).
  • Tighten shouldRenderDelegateTaskCard so named tools are not classified as delegate cards solely from leaked sessionId metadata; add regression tests on backend and webui.

Prevent nested workflow tools from overwriting run_workflow metadata,
report completed status for successful task/delegate results, reject
stale running updates over terminal tool parts, and tighten delegate
card rendering so run_workflow is not misclassified.

Co-authored-by: Cursor <cursoragent@cursor.com>
@xiami762 xiami762 requested a review from duguwanglong May 18, 2026 05:17
@duguwanglong duguwanglong merged commit 251ca57 into dev May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants