# Perform a code review in GitHub

**URL:** <https://forum.cursor.com/t/perform-a-code-review-in-github/130017>\
**Category:** Help\
**Created:** [August 15, 2025, 8:21pm UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017 "2025-08-15T20:21:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Spiescu](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Cristian\_Spiescu](https://forum.cursor.com/u/Cristian_Spiescu)\
**Post date:** [August 15, 2025, 8:21pm UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/1 "2025-08-15T20:21:20Z")

</div>

### Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

### Describe the Bug

I think that creating a review for a PR and adding the comments in the PR is a feature that should be working, isn’t it? I am having trouble achieving this. Details:

I asked to perform a code review, giving a PR link as input.

1/ the initial result was provided in the web interface  
2/ I asked “can you add these remarks in the PR as comments?”;

- it created a new PR, from the `main` branch, containing some `.md` files w/ the advice from 1/.

3/ I asked “you have created a new PR, creating .md files with your insights; but can you use the initial PR and add comments in that PR? Not as separate files, but as I would add coments during review”

- it complained about not having enough rights:
- It seems the token doesn’t have the right permissions. Let me try a different approach. Since I can’t directly add comments to the PR through the API, let me create a comprehensive review file that you can use to add comments manually. I’ll create a script that will help you add the comments efficiently.

4/ “you say that the token doesn’t have enough permissions; are you sure? I see in GitHub the following configs: Read and write access to checks, code, discussions, issues, pull requests, and workflows”

- I see the issue! The error message shows “Resource not accessible by integration” which suggests this might be a GitHub App token rather than a personal access token. GitHub App tokens have different permissions and scopes. Let me try a different approach - let me check what type of token this is and try to add review comments instead of issue comments.

### Steps to Reproduce

cf. above

### Operating System

Windows 10/11

### Current Cursor Version (Menu → About Cursor → Copy)

Using from the web interface

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![condor](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/condor/32/73148_2.png) [@condor](https://forum.cursor.com/u/condor)\
**Post date:** [August 17, 2025, 8:07am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/2 "2025-08-17T08:07:04Z")

</div>

hi @Cristian_Spiescu and thank you for your report. Could you be more detailed how you ask Cursor to do this. e.g. which command/tag do you use? Can you post an example screenshot?

---

<div class="post-metadata">

**Author:** ![Cristian\_Spiescu](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Cristian\_Spiescu](https://forum.cursor.com/u/Cristian_Spiescu)\
**Post date:** [August 17, 2025, 8:19am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/3 "2025-08-17T08:19:21Z")

</div>

Would it help if I post the entire discussion?

---

<div class="post-metadata">

**Author:** ![condor](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/condor/32/73148_2.png) [@condor](https://forum.cursor.com/u/condor)\
**Post date:** [August 17, 2025, 8:19am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/4 "2025-08-17T08:19:50Z")

</div>

Just the part where you instruct Cursor to do the review.

---

<div class="post-metadata">

**Author:** ![Cristian\_Spiescu](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Cristian\_Spiescu](https://forum.cursor.com/u/Cristian_Spiescu)\
**Post date:** [August 17, 2025, 8:50am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/5 "2025-08-17T08:50:12Z")

</div>

I see that the agent conversation disappeared from my history. I just did a similar interaction.

Here are my prompts:

> can you perform a code review of [https://github.com/famiprog/foundation-jhipster-gwt/pull/2](https://github.com/famiprog/foundation-jhipster-gwt/pull/2)?

* * *

> you have provided the results of the code review in this discussion; can you please update the existing PR with these comments? For the comments that target specific lines, please add the comments in the PR ins such a way to associate them w/ those specific lines

However, this time Cursor responded directly with:

> I understand you’d like me to add the code review comments directly to the GitHub pull request. However, I don’t have the ability to directly interact with GitHub’s web interface or add comments to pull requests through their API.

So I would say that this feature is not available to a background agent.

---

<div class="post-metadata">

**Author:** ![condor](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/condor/32/73148_2.png) [@condor](https://forum.cursor.com/u/condor)\
**Post date:** [August 17, 2025, 9:09am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/6 "2025-08-17T09:09:07Z")

</div>

GitHub integration uses `@Cursor` to instruct Cursor as otherwise we do not get the request. Its integrated as this handle.

Or are you asking Background Agent from [cursor.com/web](http://cursor.com/web) or where else?

---

<div class="post-metadata">

**Author:** ![Cristian\_Spiescu](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Cristian\_Spiescu](https://forum.cursor.com/u/Cristian_Spiescu)\
**Post date:** [August 17, 2025, 9:20am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/7 "2025-08-17T09:20:24Z")

</div>

I am using the web interface

---

<div class="post-metadata">

**Author:** ![condor](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/condor/32/73148_2.png) [@condor](https://forum.cursor.com/u/condor)\
**Post date:** [August 17, 2025, 9:29am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/8 "2025-08-17T09:29:50Z")

</div>

Background Agent is not able to communicate with a pull request directly but it can checkout any branch.

Alternatively you can though use `@cursor` in GitHub interface.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [September 8, 2025, 9:30am UTC](https://forum.cursor.com/t/perform-a-code-review-in-github/130017/9 "2025-09-08T09:30:09Z")

</div>

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
