Reviewer comments create a new kind of mess.
The issue is no longer "what does this PR do?" The issue is "which comments actually require code changes, which files do they touch, and what can be fixed without reopening the whole branch?"
That is a different workflow from first-pass PR review. It is narrower, more thread-aware, and less forgiving of drift.
This page is about that stage: use GitHub MCP to read the live review comments, map them to the right files, and shrink the repair pass before you touch code.
Start With A Comment Set That Still Fits In One Repair Pass
This workflow works best when the review comments still belong to one branch-sized cleanup.
Good first examples:
- two or three comments pointing to the same missing validation path
- one approval-blocking comment plus one smaller follow-up clarification
- several comments spread across a small file set that still describe one underlying risk
Bad first examples:
- fifteen comments across unrelated parts of the PR
- a comment thread that has already turned into product redesign
- review feedback that really means "split this PR into two branches"
If the thread has already outgrown the branch, Claude should help you recognize that fact, not pretend the answer is one more clever patch.
Reopen GitHub Context Before Reading The Thread
Start from the repository that contains the pull request and verify the GitHub MCP server:
claude mcp list
claude mcp get github
Then work from the real PR link or number, not a paraphrased copy of the comments.
That matters because reviewer comments only make sense when read against:
- the changed files
- the surrounding diff
- the prior review summary
- the current state of the branch
If Claude only sees a pasted comment like "this still fails on null input," the answer will drift toward guesswork.
If GitHub MCP is not stable, go back to Setup GitHub MCP Server with Cursor or Claude Code.
If the earlier review pass is still weak, start with Use GitHub MCP with Claude Code to Review a Pull Request Before Merging.
What You Actually Need From Comment Triage
Do not ask Claude to "address all comments."
That instruction is too loose. A real comment-triage pass should answer:
- Which comments are duplicates of the same underlying issue?
- Which comments need code changes, and which only need explanation?
- Which files are most likely involved?
- Which comment should be handled first?
- Which comments are out of scope for this branch and should be deferred or split?
If the output does not separate those decisions, you do not have a triage result. You just have a summary.
Copy This Reviewer-Comment Triage Prompt
Paste this into Claude Code after opening the repository:
Use GitHub MCP for pull request context gathering first. Do not edit code yet.
Read this pull request and its reviewer comments: [paste PR link or number]
Turn the review thread into a repair plan.
Work in this order:
1. List the reviewer comments that require action
2. Group comments that point to the same underlying issue
3. Separate comments that need code changes from comments that only need clarification or reply text
4. For each code-change group, name the 2 to 5 files or code paths most likely involved
5. Rank the groups in the order they should be resolved
6. Mark anything that should be deferred, split into a later PR, or answered without code
7. End with a compact "fix first / reply only / defer" plan and stop before writing code
Rules:
- Prefer grouping over repeating every comment line by line
- If a comment is vague, say what missing context prevents a clean fix
- If the feedback implies the PR is too broad, say that directly
- Do not turn one reviewer note into a repository-wide refactor
The useful part of this prompt is the split between fix first, reply only, and defer. Without that split, review threads tend to produce too much work.
What Good Output Looks Like
Strong comment triage usually looks a little blunt.
You want to see:
- two comments collapsed into one real issue instead of treated as separate tasks
- one or two files named first, not a tour of the whole branch
- an explicit call that some comments only need explanation, not code
- a refusal to expand the branch just because the reviewer noticed adjacent cleanup
The best answers remove work. They do not manufacture more of it.
A Concrete Example
Suppose the PR gets these three comments:
- "This parser still crashes on missing payload fields."
- "Can we add a guard here so malformed webhook data does not blow up the request?"
- "The variable naming in this block is still confusing."
Bad triage:
- fix parser crash
- improve malformed payload handling
- clean up naming
That output is weak because it duplicates the first two comments and silently promotes naming cleanup into the same priority level.
Better triage:
- group the first two comments into one blocker: malformed webhook input is still not handled safely
- locate the parsing path and the immediate caller that assumes the payload shape
- treat the naming note as optional cleanup unless the same edit naturally touches that block
- fix the crash path first, then decide whether the naming change belongs in this PR at all
That is what "comment handling" should look like in practice: less duplication, tighter ranking, smaller file scope.
When Comments Need Reply Text Instead Of Code
Not every reviewer comment should mutate the branch.
Some comments are really asking for one of these:
- a clarification of intent
- a note about why a change was intentionally excluded
- a pointer to where the behavior is already covered
- a request to split work into a later PR
If Claude cannot distinguish those from code-change requests, it will keep proposing edits that do not actually answer the reviewer.
Use this follow-up prompt when that split is unclear:
Focus only on which reviewer comments need code versus reply text.
1. List each actionable comment group
2. Label it as code change, reply only, or defer
3. Give one sentence explaining why
4. If it is reply only, say what evidence from the PR or diff should be cited in the reply
5. Stop there
This is especially useful when senior reviewers leave terse comments that assume shared team context.
Use This Prompt To Find The First Files To Open
Once the comment groups are clean, narrow the search surface:
For the highest-priority reviewer comment group only:
1. Name the 2 to 4 files I should inspect first
2. Rank them in order
3. Explain what signal in the comment thread or diff points to each file
4. Name one nearby file that looks related but is probably not the first edit point
5. Stop there
This is the safer bridge from comment triage into implementation. It keeps the next step concrete without collapsing straight into code generation.
Watch For These Failure Modes
Reviewer-comment workflows go bad in predictable ways.
If Claude treats every comment as a separate task:
- the thread probably contains duplicates
- the prompt is missing grouping pressure
- the model is following chronology instead of issue structure
If Claude recommends too many files:
- the PR may be too broad
- the comment itself may not point to a specific surface
- the model may be echoing adjacent diff context instead of locating the real edit point
If Claude wants to fix code for comments that only need a reply:
- it is being judged on activity rather than resolution
- the review thread likely contains design or explanation questions, not just defects
These failures are not random. They usually mean the triage step was skipped.
A Small Human Rubric For Deciding Whether The Triage Worked
Before you ask for code changes, check five things:
- Did the output reduce the number of real problems compared with the raw comment count?
- Did it separate code work from explanation work?
- Did it identify a believable first file set?
- Did it keep optional cleanup below blocker-level fixes?
- Would the reviewer likely recognize their own concern in the grouped issue summary?
If the answer is mostly no, rerun the triage with narrower instructions before touching the branch.
When To Move Into A Code Change
Move from triage into code only when the first comment group is small enough to express as one repair sentence.
For example:
- "add the null guard back into the webhook parsing path and validate one malformed payload case"
- "restore the missing permission check for the admin route touched by this PR"
Do not move into code on goals like:
- "clean up the reviewer feedback"
- "resolve the review thread"
- "improve this area"
Those are still aggregation problems, not execution tasks.
Mistakes That Make Review Threads Harder Than They Need To Be
- treating each comment as independent when two comments describe the same defect
- changing code for a comment that only needed a reply
- letting naming or style notes outrank approval blockers
- touching five files when one caller and one callee would probably fix the issue
- using reviewer comments as a reason to reopen unrelated cleanup
- answering the entire thread before deciding which single problem should be fixed first
The point of this workflow is to make the repair pass smaller than the raw thread, not larger.
Official References
- GitHub MCP Server Repository
- GitHub Agentic Workflows: Getting Started With MCP
- Anthropic Docs: Connect Claude Code to tools via MCP
What To Read Next
Read Use GitHub MCP with Claude Code to Turn PR Review Into a Fix Plan if the review findings still need a more structured execution order.
Read Use GitHub MCP with Claude Code to Review a Pull Request Before Merging if the real problem starts earlier and the PR has not been reviewed cleanly yet.
Read Use GitHub MCP with Claude Code to Find the Right Files From an Issue if the branch-level work is still too early and you are starting from issue triage instead.