Skip to content

Review runs: deliver the GitHub MCP server under the review identity #508

Description

@czpython

Problem

The review prompt tells the agent to post one review with a verdict, a body, and inline comments. gh CLI has no command for that, so agents build the REST calls by hand: create a pending review, add each comment, submit. A recent codex review run spent most of its wall time reconstructing this flow from web docs before it could post.

The GitHub MCP server has typed tools for exactly this (create pending review, add comment to pending review, submit pending review). But review runs do not receive it: ReviewWorkspace declares no required MCP servers. BuildWorkspace already shows the pattern — it delivers the GitHub MCP authenticated with the review actor's secret.

Proposal

Give ReviewWorkspace the same required GitHub MCP server as BuildWorkspace, authenticated with the review actor token. The run then has gh and the MCP tools under one identity, and the review posts as the review actor through either path.

An alternative or complement: name the one-shot endpoint in the review prompt (POST /repos/{owner}/{repo}/pulls/{n}/reviews with a comments array posts everything in one call), so a harness without MCP support does not have to rediscover the API.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions