Replying to a PR comment #161601
-
Select Topic AreaQuestion BodyI am building an agent that allows coding agents to respond to PR comments by making code changes but also to reply to the PR comment. I tried using the REST API (https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/pulls/comments/{comment_id}/replies). But always get the response: I made sure that the comment_id is correct.
When I create the original comment, I create it as a review comment (i.e. use "Start a Review" not "Add a single comment") and then I submit the review. I must be missing something obvious. Any help or pointers to sample code would be helpful. Thanks |
Beta Was this translation helpful? Give feedback.
Yep, exactly — the /replies endpoint is only valid for standalone diff comments made using “Add single comment”. These are technically different from comments made as part of a review.
When you use the review flow (“Start a review” → “Submit review”), the comments are part of a review thread, and GitHub’s REST API doesn’t support direct threaded replies to those. That’s why /replies gives a 404 in that case.
So:
Use /replies only for standalone comments.
For review comments, you need to post a new comment referencing the original — no actual reply threading supported.