Repository navigation
chat: surface out-of-band subagent approvals - #336317
Merged
Justin Chen (justschen) merged 5 commits intoSep 16, 2026
Merged
Conversation
Discover pending approvals independently of virtualized transcript rows and include retained-worker approvals in the Sessions list. Preserve the existing confirmation card and subagent attention styling without adding an out-of-band status heading or shimmer. Keep approval callbacks and command edits intact across model switches, and route Accept/Skip to the selected carousel item. Cover historical approvals, request editing, independent confirmations, and pill highlighting with regression tests and an interactive mock fixture. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Accept Selected bypasses option-specific callbacks, losing required selected-option metadata.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced (auto)
Findings: 1
Note
Copilot is running an experiment and ran this review at Balanced.
Open (1)
What changed in this PR
Surfaces offscreen subagent approvals in chat and Sessions while preserving existing confirmation UI and callbacks.
Changes:
- Discovers pending confirmations directly from chat models.
- Routes carousel actions to the selected approval and preserves command edits.
- Adds regression and interactive fixture coverage.
| File | Description |
|---|---|
chatWidget.fixture.ts |
Extends widget fixture behavior. |
chatAgentLifecycle.fixture.ts |
Adds offscreen-approval scenario. |
chatListRenderer.test.ts |
Tests discovery, routing, editing, and cleanup. |
chatSubagentContentPart.test.ts |
Tests retained-pill highlighting. |
agentSessionApprovalModel.test.ts |
Tests historical Sessions approvals. |
chatViewModel.ts |
Exposes editing-state changes. |
chatInputPart.ts |
Manages model-driven carousel entries. |
chatListRenderer.ts |
Discovers offscreen confirmations. |
chatToolConfirmationCarouselPart.ts |
Preserves per-item factories and removal. |
chatTerminalToolConfirmationSubPart.ts |
Restores edited commands. |
chat.shared.contribution.ts |
Updates setting documentation. |
agentSessionApprovalModel.ts |
Finds approvals across responses. |
chatToolActions.ts |
Targets the active carousel item. |
sessionsList.test.ts |
Tests Sessions-row approval controls. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Screenshot ChangesBase: Changed (2)3 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. Added (8) |
Invoke the active confirmation card's primary action so keyboard acceptance preserves option metadata and respects disabled actions. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Retained subagents flickered between working and idle because the host completed a child 250 ms after each SDK model round ended, even when the next round had already started. Completion now confirms against the task list before closing a child turn, re-arms when the confirmation is superseded or fails, and ignores stale task snapshots taken before a child started its next round. An empty final answer now emits an explicit response-round-ended boundary so the parent's open thinking or tool section settles instead of looking stuck, without claiming the markdown scope for later text. The Working shimmer stays hidden while active subagent pills are the last visible content and returns after other content. Read agent and Write to agent labels use the canonical agent display name in streaming, ready, completed, and restored history, keeping the execution id as the fallback. Co-authored-by: Copilot <[email protected]>
Justin Chen (justschen)
marked this pull request as ready for review
September 16, 2026 00:54
Justin Chen (justschen)
enabled auto-merge (squash)
September 16, 2026 00:54
Collaborator
Author
|
Copilot resolve the merge conflicts in this pull request |
…endering-issues # Conflicts: # src/vs/workbench/contrib/chat/test/browser/widget/chatListRenderer.test.ts Co-authored-by: justschen <[email protected]>
Contributor
roblourens
approved these changes
Sep 16, 2026
Ulugbek Abdullaev (ulugbekna)
approved these changes
Sep 16, 2026
Justin Chen (justschen)
deleted the
agents/fix-subagent-rendering-issues
branch
September 16, 2026 12:48
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Make pending subagent approvals discoverable independently of where their original launch response is rendered, while preserving the existing confirmation UI.
Investigation findings
The apparent hangs included several distinct cases:
inputNeededwatcher handles owned client-tool execution, not independent rendering of SDK-native shell/file approvals.Resource not foundsubscriptions preceded delayed child startup; the remaining 18 requested reviews were not hidden running agents.task_complete, completed tool calls, and delivered final Markdown, but no protocolchat/turnCompletewhile an attached preview server remained running. That completion-boundary issue is tracked separately in agentHost: finish foreground turns independently of background work #336083.Related rendering work: #335899. This PR does not change SDK/CLI versions, runtime concurrency limits, child-start timing, or foreground completion semantics.
Validation
npm run gulp compile-client— passed, zero errors.AgentSessionApprovalModel,ChatListRenderer,ChatSubagentContentPart, and Sessions-list chat rows — 263 passing, 1 existing pending.Manual validation
Open the existing Component Explorer Server task and select
chat/agent-lifecycle/chatAgentLifecycle/OffscreenSubagentApprovals(Dark or Light):The fixture's shortcut shim dispatches the real Accept/Skip commands; it is not an end-to-end test of the production keybinding resolver. Sessions-list Allow routing is exercised separately with real row controls in the focused tests.