Back to AI Q&A
Why is Cursor Background Agent not working on GitHub? Let's start with the GitHub App, repository permissions, and IP allowlist

Why is Cursor Background Agent not working on GitHub? Let's start with the GitHub App, repository permissions, and IP allowlist

AI Q&A Admin 85 views

If Cursor's Background Agent doesn't run on GitHub at all, the most common reason is not that the model is hanging, but that the access conditions on GitHub side are not met. Cursor's official documentation is now straightforward: both Background Agents and Bugbot rely on Cursor's GitHub App to clone repositories, create branches, and push changes.

In other words, as long as the GitHub App is not installed correctly, the corresponding repository permissions are not obtained, or the organization has enabled the IP allowlist but does not release it, even if the backend agent can click on the interface, it is easy to get stuck in issues such as "not reading the repository", "no permission to push PR", and "comment trigger is not responsive".

Now there are three layers that are most likely to be missed. First, the GitHub App is only installed in the account, not the target organization or target repository. Second, the private repository has insufficient permissions, and the agent can see the issue but cannot get the code. Third, the organization has IP allowlist enabled, but does not allow GitHub Apps to inherit the pre-configured list or manually add IPs from the cursor documentation.

The correct order of investigation is recommended as follows:
1. Go to Cursor's GitHub integration page to confirm that your account is indeed connected.
2. Go to GitHub to confirm that the installation scope of the Cursor App includes the target repository.
3. If it is a private repository, check whether the repository read/write permission and PR write permission are given.
4. If your organization has set up an IP allowlist, enable "Allow access by GitHub Apps" first, and you can't manually add IPs.

If you trigger the background agent through a cursor comment, check the branch protection rules again. Many times the agent is actually running, but it doesn't have permission to push changes to the target branch, so it looks like "no movement at all".

Therefore, the way to judge such problems is very simple: as long as the error report focuses on cloning, accessing the repository, pushing commits, and writing PR comments, prioritize GitHub App and network release, and don't toss around with Cursor's local settings first. The key bottleneck of the Background Agent is often not in the editor at all.

Recommended Tools

More