microsoft / microsoft/vscode

Agent host: review confirmation cannot load comments in editor windows

Open
#336,428 0 comments 0 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Problem

In an ordinary VS Code editor window, an agent-host `viewUnreviewedComments` call can show **Reveal unreviewed comments?**, **No unreviewed comments.**, and a disabled **Reveal Selected** button. The chat remains at **1 confirmation pending**, with Cancel as the only usable action.

Observed with the Codex agent in a Windows VS Code 1.137.0 window connected to WSL (build `645f29cc3176500b4b5762ba887cf2a7f0ffdf2c`). The same missing registration remains in upstream source at `0a4fc0adc2c7ca7dc85fe5a271cf78f2ec36bc25`; the defect is not inherently WSL-specific.

## Reproduction

1. Use an agent-host chat in a regular editor window, rather than the dedicated Agents window.
2. Have review feedback available and invoke the host's `viewUnreviewedComments` tool so it requests confirmation.
3. Observe the empty confirmation and inspect the renderer log.

The observed renderer warning is:

```text
[AgentFeedbackReview] Failed to fetch unreviewed comments command '_agentFeedbackReview.getComments' not found
```

## Expected

Load the session's review comments from its owning agent host, let the user choose which comments to reveal, and continue after that explicit selection. A loading failure should be reported as a failure, not as proof that there are no comments.

## Root cause

`stateToProgressAdapter` creates the specialized feedback confirmation for editor-window agent-host chats. Its renderer calls `_agentFeedbackReview.getComments` and the related reveal/delete/accept commands. Those commands are registered by `vs/sessions/contrib/agentFeedback/browser/agentFeedback.contribution.ts`, which belongs to the dedicated Agents window and is not loaded by the regular editor.

The renderer catches the missing-command error, leaves its comments array empty, and falls through to the successful empty-state message. This hides the actual integration failure and keeps the reveal action disabled.

A fix should provide editor-window command handlers without importing `vs/sessions` services into the workbench, await annotation hydration, preserve explicit selection, and distinguish loading errors from empty results.

## Public source patch

[Source patch, review notes and validation](https://github.com/RyanEwen/vscode-patches/blob/main/docs/patches/vscode-336430.md) · [Download source patch](https://github.com/RyanEwen/vscode-patches/raw/refs/heads/main/source-patches/vscode/336430.patch)

The source proposal targets the recorded upstream base. A separate [installed-bundle backport](https://github.com/RyanEwen/vscode-patches/blob/main/docs/fixes/agent-feedback-review-editor.md) is validated on Windows ARM64 VS Code 1.137.0 (`645f29cc31`), whose editor client also serves WSL windows. Bundle tests and deployment checks passed; live UI verification remains outstanding.

*AI disclosure: this comment and the related code were written with the assistance of AI.*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.