Agents Window: Submit comments from a child chat targets the parent and waits for its chat widget
Does this issue occur when all extensions are disabled?: Not tested.
Environment
- Local VS Code: 1.145.2, commit c4453f8.
- Dev Tunnel host VS Code: 1.145.1, commit 6bab64e.
- OS: Windows_NT x64 10.0.26300.
- Copilot: 1.0.103.r41379698026.g3219c66.
- Copilot SDK: 1.0.27.41379698026.g3219c66.
- Feature: Agents Window, Changes view, child chat within an agent-host session.
Steps to reproduce
- Run an agent-host session over a Dev Tunnel and open one of its child chats.
- Add review comments in the child chat's Changes view.
- Click the comments toolbar's Submit button while the child chat is selected.
- Navigate to the parent chat.
Actual behavior
The following was observed in this setup:
- Clicking Submit in the child chat appears to do nothing: no visible acknowledgement and no feedback request delivered to that chat.
- After selecting the parent chat, the parent receives
/act-on-feedbackwith the comments. - The parent then forwards the feedback to the child through an agent message, rather than the UI submitting directly to the child.
The interval between clicking Submit and selecting the parent was not measured.
Expected behavior
- Submit feedback directly to the parent or child chat where the comments were made.
- Accept the submission immediately, without requiring navigation to another chat. Acceptance is distinct from when the agent starts processing it.
- Show submission acceptance or failure in the UI.
Source investigation
The active feedback scope uses the owning session resource. Both the Changes primary action and the editor comments Submit action call submitFeedback(sessionResource) without passing the existing targetChat option (scope, Changes action, editor action).
The provider uses the owning session resource for its main chat and a distinct resource fragment for additional chats. Without targetChat, feedback submission therefore targets the main chat's widget, not the child chat's widget (chat identities, additional chat, target fallback).
If that widget is unavailable, the helper waits up to 10 seconds for a matching widget/model. Selecting the parent within that window can unblock submission. A timeout logs an error and returns false, which the Changes action does not surface to the user (waiter, failure handling, caller).
Explicit child-chat targeting already has service-level coverage. However, feedback records store only the owning sessionResource, not the originating chat, which also matters if the user navigates before submitting (targeted-chat test, feedback model).
This is a source-level investigation consistent with the observation, not a debugger-confirmed reproduction. Latest Insiders has not been tested.
Seeing this too on 1.145.2 (c4453f8), Windows 11, local agent host (no Dev Tunnel).
- Ran
/code-reviewin a child chat of a session. It added three review comments. - Clicking Submit in that child chat gave no visible response. The
/act-on-feedbackmessage was recorded by the agent host but never started a turn, and neither did a typed follow-up sent right after it. - A later Submit did start a turn, but it ended with an empty reply until I sent another message.
I also lost the comments to the unconfirmed Clear button in the same flow, filed separately as #347443.
This has the same cause as #335023. A child (nested) chat is a second chat inside the agent-host session. SubmitFeedbackAction calls submitFeedback(sessionResource) without a targetChat, so the service looks for the widget of the session's main chat, and no widget shows that chat while the child chat is open.
Draft PR #350235 sends Submit to the chat the focused session host shows, such as the child chat, when that host shows the same session. It reproduced the nested-chat case on Insiders 1.148.0 with a mock agent host: nothing was sent and the count stayed. On a build of the branch, the child chat got one /act-on-feedback request. The PR has the before and after recordings.
One part of this issue stays open after that PR. When no widget is found, whenChatWidgetForSession waits up to 10 seconds and submitFeedback returns false, but SubmitFeedbackAction (agentFeedbackEditorActions.ts) ignores the result, so the user still gets no error. I checked this on main at 16818a06785.
Also, as with #335023, comments belong to the session, not to a chat. All of the session's pending comments, including ones written in the main chat, go to the chat that is shown.
🤖 Authored with GitHub Copilot on behalf of @benibenj.