Skip to content

chat: link subagent completion and coordination messages - #348949

Merged
Connor Peet (connor4312) merged 2 commits into
mainfrom
connor4312/subagent-chat-links
Nov 17, 2026
Merged

Connor Peet (connor4312) merged 2 commits into
mainfrom
connor4312/subagent-chat-links

Conversation

@connor4312

Copy link
Copy Markdown
Member

chat: link subagent completion and coordination messages

  • Link completion, read-agent, and write-to-agent messages to the matching child chat.
  • Share pill rendering and keep inline references compact without changing launch pills.
  • Preserve chat links through markdown conversion and use the persisted catalog during restore.
  • Add regression tests for restored identities, rendering, spacing, and navigation.

(Commit message generated by Copilot)

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Validation

  • pnpm run build-fast --client-only — passed.
  • pnpm run typecheck-client — passed.
  • Pre-commit hygiene and oxlint — passed for all 28 changed files.
  • git merge-tree --write-tree HEAD origin/main — passed; no conflicts with fetched main.

The following targeted test commands passed: 11, 203, and 17 tests respectively.

./scripts/test.sh --reporter dot \
  --run src/vs/platform/agentHost/test/node/agentService.test.ts \
  --run src/vs/platform/agentHost/test/node/agentHostSeams.test.ts \
  --grep 'restored historical subagent references|chat owner reference|new sessions keep one child per spawn edge'
./scripts/test.sh --reporter dot \
  --run src/vs/platform/agentHost/test/node/agentHostSeams.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSubagentContentPart.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatSystemNotificationContentPart.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatToolProgressPart.test.ts \
  --grep 'Agent Host provider seams|subagent|Subagent|agent links|agent coordination'
./scripts/test.sh --reporter dot \
  --run src/vs/workbench/contrib/sessions/providers/agentHost/test/browser/openSubagentChat.test.ts

Manual Verification

Live verification is left to the maintainer. Start a subagent, read from and write to it, and wait for its completion. Confirm that each compact reference shows the agent name and opens the same child chat as the launch pill. Repeat after restoring the session, and check keyboard activation and that activating a reference does not expand the enclosing tool details.

- Link completion, read-agent, and write-to-agent messages to the matching child chat.
- Share pill rendering and keep inline references compact without changing launch pills.
- Preserve chat links through markdown conversion and use the persisted catalog during restore.
- Add regression tests for restored identities, rendering, spacing, and navigation.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:59
@vs-code-engineering

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 1a44cebb Current: 7c007d38

Changed (1)

chat/chatSubagentContent/CompletionNotices/Light
Before After
before after

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the child-chat navigation changes.

No open issues 🎉

What changed in this PR

This PR connects subagent completion and coordination messages to their child chats, extending VS Code’s existing subagent navigation to compact inline references.

Changes:

  • Generate child-chat links for completion, read-agent, and write-to-agent messages, including restored history.
  • Share pill rendering across chat surfaces while preserving launch-pill presentation.
  • Add regression coverage, update fixtures, and document keyboard navigation.

The PR reports successful automated validation; live verification remains pending.

File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatSubagentContent.fixture.ts Adds completion and coordination reference fixtures.
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatAgentMergeNotice.fixture.ts Updates services and notification constructor arguments.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatContentParts/​chatToolProgressPart.test.ts Tests pill navigation without expanding tool details.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatContentParts/​chatSystemNotificationContentPart.test.ts Tests notification pill layout and navigation.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatContentParts/​chatSubagentContentPart.test.ts Adapts context inspection to the shared toolbar.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​stateToProgressAdapter.test.ts Tests chat-link preservation during markdown conversion.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatListRenderer.ts Passes parent-session context to notifications.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​media/​chatSubagentOpenChat.css Adds compact inline-pill styling.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatToolInputOutputContentPart.ts Supplies navigation context to tool titles.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatSystemNotificationContentPart.ts Renders notification chat links as pills.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatSubagentOpenChat.ts Extracts the shared toolbar and inline-link renderer.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatSubagentContentPart.ts Reuses the shared toolbar for launch pills.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatProgressContentPart.ts Renders pills in initial and updated progress messages.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatConfirmationWidget.ts Supports child-chat pills in markdown titles.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentMarkdownRenderer.ts Allows the chat URI scheme in markdown links.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​stateToProgressAdapter.ts Preserves chat links rather than rewriting them as files.
src/​vs/​workbench/​contrib/​chat/​browser/​actions/​chatAccessibilityHelp.ts Documents navigation from the new reference locations.
src/​vs/​platform/​agentHost/​test/​node/​mapSessionEvents.test.ts Tests linked notifications and coordination messages during replay.
src/​vs/​platform/​agentHost/​test/​node/​copilotToolDisplay.test.ts Tests recipient links across tool execution stages.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgentSession.test.ts Tests live and restored links and markdown escaping.
src/​vs/​platform/​agentHost/​test/​node/​agentService.test.ts Tests restored child identity for both URI formats.
src/​vs/​platform/​agentHost/​node/​copilot/​mapSessionEvents.ts Resolves historical agent references to child-chat links.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotToolDisplay.ts Formats linked recipient labels with fallback text.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSystemNotification.ts Generates linked completion and idle notifications.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSubagentTracking.ts Supports seeding historical agent-to-tool mappings.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Wires chat resolution into live messages and replay.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Supplies child-chat resolution when loading history.
src/​vs/​platform/​agentHost/​node/​agentChatContext.ts Uses the persisted default-chat format before registration.

Review effort: Balanced

Set the session resource in the progress fixture context so link rendering can read its owner.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-code-engineering

This comment has been minimized.

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Demo of 2524299

Subagent read, write, and completion messages now display compact chat-link pills.

Subagent coordination and completion references

Before (main) After (this pull request)
Agent names are plain inline-code text; completion says Background agent … is complete.
Agent names are plain inline-code text; completion says Background agent … is complete.
Read, write, and completion messages show compact agent pills with an Open subagent chat tooltip.
Read, write, and completion messages show compact agent pills with an Open subagent chat tooltip.

The change, on this pull request's build:

after.mp4
The same steps on main
before.mp4

Recorded by an agent on a build of this pull request merged with main, signed out, with a mock model. It can be wrong. Workflow run

Tip

Was this useful? React to this comment with 👍 or 👎.
On the VS Code team? Say what was wrong or missing.

@vs-code-engineering vs-code-engineering Bot added the pr-demo A PR demo was recorded for this pull request label Nov 17, 2026
@connor4312
Connor Peet (connor4312) added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 497299d Nov 17, 2026
37 of 38 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/subagent-chat-links branch November 17, 2026 23:38
@vs-code-engineering vs-code-engineering Bot added this to the 1.148.0 milestone Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-demo A PR demo was recorded for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants