Skip to content

fix(showcase): anchor live subagent progress to the latest delegated run - #7401

Open
kvnloo wants to merge 6 commits into
CopilotKit:mainfrom
kvnloo:fix/subagent-console-latest-run-anchor
Open

kvnloo wants to merge 6 commits into
CopilotKit:mainfrom
kvnloo:fix/subagent-console-latest-run-anchor

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 23, 2026

Copy link
Copy Markdown

What changed

The reskinnable-demo's harness console now anchors to the first task call in the most recent user-turn segment that contains a delegation, rather than the first task in the entire thread.

That preserves the original nested-delegation rule — only the parent run gets one console — while fixing repeated delegated runs in the same conversation. A later run now surfaces progress beside the turn that started it instead of updating a console far back in history.

The selection rule lives in a pure helper so restored-thread behavior is testable without the live event stream.

Verification

Added regressions for:

  • first run: parent delegation + nested delegation;
  • second run: parent delegation + nested delegation;
  • a later ordinary user turn with no delegation;
  • a thread segment with multiple nested task calls.

The selected anchor remains the first parent delegation of the latest delegated turn.

No local repository test run was available in this execution environment; CI is the executable verification.

UX invariant

current work should surface near the interaction that started it.

A stable anchor is useful, but “stable for the entire thread” is too stable once the same workflow can run twice. This keeps progress spatially coupled to the user's current request without relying on transient event timing.

Integration limits

Only the reskinnable-demo's harness-console anchor selection changes. The live event fold, persisted-event seed, tool execution, and AG-UI protocol are unchanged.

AI-use note: I used an AI assistant to trace the console anchoring path across restored messages and live subagent events, isolate the selector, draft the regression, and review the final diff before opening this PR.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (4)
  • fix(showcase)
  • feat(showcase)
  • chore(release)
  • chore: release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: aee03ed6-4e6c-4654-b623-ebef1c760ccf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

1 participant