Skip to content

Agent host: submit auto-approved review comments - #329592

Open
Benjamin Christopher Simmonds (benibenj) wants to merge 4 commits into
mainfrom
benibenj/agents/investigate-comments-reveal-issue
Open

Agent host: submit auto-approved review comments#329592
Benjamin Christopher Simmonds (benibenj) wants to merge 4 commits into
mainfrom
benibenj/agents/investigate-comments-reveal-issue

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Summary

  • preserve automatic approval context when executing agent-host server tools
  • make auto-approved viewUnreviewedComments submit and return every unreviewed PR and code-review comment
  • retain the interactive picker behavior for user-selected comments
  • add focused regression coverage and update the Sessions specification

Testing

Not run, per request.

Preserve automatic approval context for server tools so viewUnreviewedComments submits and returns every unreviewed PR and code-review comment when no picker is shown, while retaining interactive selection behavior.

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

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.

Pull request overview

Adds automatic-approval context so feedback tools can submit all unreviewed review comments without opening the picker.

Changes:

  • Propagates approval context through Copilot and Codex server-tool execution.
  • Auto-submits unreviewed PR/code-review comments.
  • Adds regression tests and documentation.

The Claude execution path does not yet propagate this context.

Show a summary per file
File Description
src/vs/sessions/SESSIONS.md Documents approval behavior.
src/vs/platform/agentHost/test/node/mockAgent.ts Tracks auto-approved permissions.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Tests approval-context distinction.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Tests option forwarding.
src/vs/platform/agentHost/test/node/agentSideEffects.test.ts Tests automatic approval metadata.
src/vs/platform/agentHost/test/node/agentFeedbackServerTools.test.ts Tests automatic comment submission.
src/vs/platform/agentHost/node/shared/agentServerToolHost.ts Forwards execution context.
src/vs/platform/agentHost/node/shared/agentFeedbackServerTools.ts Submits auto-approved comments.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Tracks interactive approvals.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Forwards permission options.
src/vs/platform/agentHost/node/codex/codexAgent.ts Marks confirmation tools auto-approved.
src/vs/platform/agentHost/node/agentSideEffects.ts Identifies automatic approvals.
src/vs/platform/agentHost/common/agentService.ts Adds permission response options.
src/vs/platform/agentHost/common/agentServerTools.ts Adds server-tool execution context.

Review details

  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Balanced

* are invalid.
*/
executeTool(sessionUri: URI, toolName: string, rawArgs: unknown): string | Promise<string>;
executeTool(sessionUri: URI, toolName: string, rawArgs: unknown, context?: IAgentServerToolExecutionContext): string | Promise<string>;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will addressee in follow up PR

@benibenj

Copy link
Copy Markdown
Contributor Author

not ready yet

Treat an absent explicit picker selection as selecting every unreviewed review comment. This removes provider-specific approval-source tracking while preserving user selections until delivery and preventing empty interactive approvals.

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

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: c780ea96 Current: 342d752a

Changed (2)

chat/chatAgentFeedbackReviewConfirmation/Empty/Dark
Before After
before after
chat/chatAgentFeedbackReviewConfirmation/Empty/Light
Before After
before after

Make server-tool confirmation session-aware so viewUnreviewedComments runs without prompting when there are no created comments or pending selections, while retaining confirmation whenever revealable comments exist.

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

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Tyler James Leonhardt (@TylerLeonhardt)

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeAgent.ts
  • src/vs/platform/agentHost/node/claude/claudeCanUseTool.ts
  • src/vs/platform/agentHost/node/claude/claudeServerToolMcpServer.ts

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.

4 participants