Background Agent "Create PR" Not Working in a Specific Repository

Describe the Bug

Background Agent “Create PR” Not Working in a Specific Repository
The “Create PR” function of the background agent is not working for a particular repository.

Steps to Reproduce

Steps to Reproduce:

  1. Create a task using the background agent.
  2. Click Create PR → A “No URL returned” error appears, and the PR is not created.
  3. Go to your GitHub account and uninstall the Cursor application.
  4. Go to the Cursor dashboard and disconnect GitHub.
  5. Go to Cursor background and reconnect.
  6. Request a task for the same repository.
  7. A bug occurs stating it “cannot perform the task” (for about 5 minutes).
  8. After waiting and requesting again, it works and generates code.
  9. Click Create PR → The “No URL returned” bug occurs again, and the PR is not created.

Expected Behavior

Create PR

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

Yes - Cursor is unusable

If you have a branch named “cursor” prior to creating the PR, it will cause a failure because there will be a collision between the “cursor” branch, and the background’s agent branch because they are automatically prefixed with “cursor/”.

This error does not surface easily, but the best bet for debugging is to open the terminal from the background agent and manually try to push the branch to origin.

2 Likes

Thank you so much. This issue was resolved after removing the cursor branch in remote.

No problem! It was giving me lots of trouble as well.

If anyone at Cursor is listening, you should surface the git errors when trying to create PRs or check out to local from background agents.

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