Skip to content

Agents can't read back the PR review comments they stage #4644

Description

@jefgen

Feature summary

Let agents read the pending PR review, including the edits, additions and removals made in the review panel.

What problem are you trying to solve?

Agents can stage review comments (add_pr_review_comment) and change them (edit_pr_review_comment, remove_pr_review_comment), but can't read the pending review back. 🙃

I had the agent stage a review, then edited most of its comments in the review panel, removed one and added two of my own. When I asked it to look the review over before I submitted, it couldn't see any of that.

So the agent can't:

  • check what will actually be submitted, formatting and emoji included;
  • tell which of its comments were removed, so re-staging risks duplicates;
  • fix a typo safely: edit_pr_review_comment replaces the whole body, and the agent only has its original text.

The only way we found was to parse the app's WebView Local Storage (prReviewComments), which relies on undocumented internals. 🫤

Proposed solution

An app-native read, such as get_pr_review, returning the head SHA the draft is anchored to, each staged comment's ID, path, line, side, body and source (agent or user), and the IDs of removed comments.

Workflow impact

Anyone who has an agent draft a review and then refines it in the panel: the agent can't verify or polish the final review, and an edit made from its stale copy silently overwrites the human's changes.

Installation context

Windows desktop app (1.1.28, ARM64), in a PR-backed worktree session.

Additional context

Related to #3427, which asks for the same read access for delegated subagents. This comes from the human-in-the-loop side, with no delegation involved.

Co-authored by Copilot + Human. 🤖👩‍💻

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions