Skip to content

Feature: Add ability to reply to existing inline comment threads #731

@cheapsteak

Description

@cheapsteak

Summary

Currently, Claude can only reply within an existing inline comment thread if it was directly triggered by a pull_request_review_comment event. There's no way for Claude to reply to existing inline threads when triggered by other events (e.g., issue comment, PR comment, workflow_dispatch).

Current Behavior

In src/github/operations/comments/create-initial.ts, the action uses createReplyForReviewComment only when the event is pull_request_review_comment:

} else if (isPullRequestReviewCommentEvent(context)) {
  response = await octokit.rest.pulls.createReplyForReviewComment({
    owner,
    repo,
    pull_number: context.entityNumber,
    comment_id: context.payload.comment.id,  // replies to triggering comment
    body: initialBody,
  });
}

The github-inline-comment-server.ts provides create_inline_comment which can create new inline threads via createReviewComment, but it doesn't expose the in_reply_to parameter that would allow replying to existing threads.

Proposed Solution

Add an optional in_reply_to parameter to the create_inline_comment tool in src/mcp/github-inline-comment-server.ts:

in_reply_to: z
  .number()
  .optional()
  .describe("Comment ID to reply to (creates a reply in an existing thread instead of a new thread)")

GitHub's createReviewComment API supports this parameter: https://docs.github.com/en/rest/pulls/comments#create-a-review-comment-for-a-pull-request

This would allow Claude to:

  1. Read existing inline comment threads on a PR
  2. Reply to specific threads with follow-up responses
  3. Consolidate feedback in existing threads rather than creating duplicates

Use Case

When the review action is triggered multiple times on the same PR (e.g., after each push), Claude currently creates separate inline comment threads for the same issues each time. This results in N duplicate threads for the same problem, each requiring separate resolution.

With this feature, Claude could instead reply to the existing thread with a message like "This issue from the previous review still hasn't been addressed" - keeping all feedback about a specific line consolidated in one thread.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmcpp3Minor bug or general feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions