Bugbot Autofix commits directly to the existing PR branch even when set to "New Branch"

Where does the bug appear (feature/product)?

Bugbot / Security Review Agent

Describe the Bug

Bugbot Autofix is configured to “New Branch”, but occasionally it commits Autofix changes directly to the existing PR branch instead of creating a new branch.

Most of the time, Autofix works as expected and creates a separate branch. However, we have seen multiple cases where the changes were committed directly to the original PR branch.

The affected commits are shown with the Cursor logo on GitHub.

Steps to Reproduce

  1. Configure Bugbot Autofix to “New Branch”.
  2. Open a pull request and let Bugbot review it.
  3. Have Bugbot Autofix apply a fix.
  4. In some cases, the fix is committed directly to the existing PR branch instead of a new branch.

The issue is intermittent, so we have not identified specific conditions that reliably reproduce it.

Expected Behavior

When Autofix is set to “New Branch”, Bugbot should always create a separate branch for Autofix changes and should never commit directly to the existing PR branch.

Operating System

Other

Version Information

N/A — Bugbot / Cursor GitHub integration.

For AI issues: which model did you use?

N/A — this appears to be related to Bugbot Autofix behavior rather than the model used.

Additional Information

The Autofix setting is currently confirmed to be “New Branch”.

This does not happen on every Autofix. Most fixes correctly create a new branch, but occasionally a fix is committed directly to the existing PR branch.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. That behavior shouldn’t happen when New Branch is set up, and it’s not something in your project. There are a couple of paths that can make Autofix commit directly to the PR branch, so let’s narrow it down:

  1. In addition to the installation-level setting, each team member has a personal Autofix setting, and it takes priority. Ask the author of the affected PRs to check: cursor.com/dashboard → Bugbot → My Settings → Autofix. If it’s set to Commit to Existing Branch, that explains commits going straight to the branch. Switching it to Use Installation Default or Create New Branch will stop that.

  2. Was the affected PR opened from a branch that Bugbot created (branch name starts with cursor/)? For those PRs, fixes are intentionally pushed to that branch.

  3. Did this PR branch previously receive a direct Autofix commit (for example when the setting was Existing Branch, or if the branch name is reused across PRs)? We’re tracking a case where that history can carry over to later PRs on the same branch.

If you share the repo name and 1 to 2 affected PR numbers, plus the PR author’s GitHub username, we can check which path the commit took on our side. You can send it in DM if you don’t want to post it publicly.

Thanks for the clarification.

  1. My personal Autofix setting was already set to Create New Branch before this issue occurred. I did not change it from Commit to Existing Branch.

  2. No, the affected PR was opened from a branch I created myself, not a branch created by Bugbot.

  3. No. I also tried turning Autofix Off and then setting it back to Create New Branch, but Autofix still committed directly to the existing PR branch. For now, I have turned Autofix Off again to prevent this from happening.

This issue only seems to occur with my GitHub account; other team members have not experienced the same behavior.

Unfortunately, this is happening in a private repository, so I’m not able to share the repository name or PR numbers publicly.

Please let me know if there’s any other information I can provide to help investigate the issue without sharing details of the private repository.

Thanks, that’s exactly what we needed to clarify. Your answers rule out the most common case, a personal setting overriding the installation setting. Since you already had Create New Branch enabled and the branch isn’t one that Bugbot creates, it’s not that and it’s not your project.

What you’re describing sounds like a case we’re tracking where old branch history can stick to later PRs on the same branch, even if you don’t remember doing a direct push. One quick question on that. Do you reuse the branch name across multiple PRs, like a long lived branch you don’t delete after merge? That’s an important signal.

To confirm exactly what path the commit took on our side, we need:

  • the repo name
  • 1 to 2 affected PR numbers
  • your GitHub username

I get that the repo is private. You can send this in a DM, no need to post it publicly. With your username and the PR numbers, we can pull the server logs and confirm what happened.

For now, you can keep Autofix set to Off like you did. I’ll reply here or in DM once we find something.

Sorry for the delayed response, and thanks for looking into this.

I don’t reuse branch names across multiple PRs. Each PR uses a separate branch.

Understood regarding the repository and PR information. I’ll send you the repo name, affected PR numbers, and my GitHub username via DM later.

Thanks again for your help!

One more thing: I can’t seem to find a way to send you a DM on the forum. Could you please let me know how I can send you one, or send me a DM first?

Thanks, that’s a useful signal. If branch names aren’t being reused, that helps narrow things down.

Re the DM: I’ve sent you a message. Please reply there with:

  • the repo name
  • 1 to 2 PR numbers that were affected
  • your GitHub username

With that info, we’ll pull the server logs and see how the commit ended up in the branch on our side.

For now, you can keep Autofix set to Off, like you did. I’ll follow up in DM or here once there’s an update.

Thanks! I’ve just replied to your DM with the requested information.

Hey, thanks. Those PRs let us track each case.

We checked, and in every affected case Autofix worked correctly in New Branch mode and created its own separate branch. But then the Autofix agent itself pushed a commit into your PR branch, which is why the commits show the Cursor logo even though the setting was configured correctly. This isn’t related to your setup or anything in your project.

We’re tracking this issue, and I’ve shared your cases with the team. I can’t give an exact timeline yet, but I’ll follow up here or via DM once there’s an update.

For now, the best workaround is to keep Autofix set to Off, like you did. Your personal Off setting applies to PRs you create. If any coworkers want to avoid this on their PRs, they, or an installation-level admin, can also set Autofix to Off. As soon as there’s an update, I’ll let you know so you can safely switch back to New Branch.

Thanks for investigating and confirming the cause!
I’ll keep Autofix set to Off for now and wait for an update.
Thanks again for looking into this and for sharing my cases with the team.

Thanks for letting me see it through to the end. Without your PR numbers and username, we wouldn’t have been able to confirm the path that precisely.

For now, keep Autofix set to Off. That’s the right option. As soon as the update is ready, I’ll reply here and in DM so you can safely switch back to New Branch.

Hey @Erika_Tayama,

Quick update, as promised: the fix for the issue where Autofix was pushing to your PR branch when Create New Branch was enabled is now live on our side. In Create New Branch mode, Autofix can no longer push to the pull request branch itself. Its changes will only go to a separate branch that it creates. You don’t need to change anything on your side.

You can safely switch the Autofix setting back to Create New Branch whenever you’re ready. If you ever see an Autofix commit show up directly in the PR branch again after that, let us know. The PR number in a DM will be enough, and we’ll take a look.

Thanks again for the details about the PR. That was exactly what helped us pinpoint the cause.

Thanks for the update and for getting this fixed!

I’ll switch Autofix back to Create New Branch and keep an eye on it.
If I see the issue happen again, I’ll send you the PR number via DM :+1:

Thanks again for looking into this!

Glad everything is working now. You can switch back to Create New Branch.

If you ever see Autofix commit directly to the PR branch again, send over the PR number in DM and we’ll check it right away. But after this update, that shouldn’t happen anymore.

Thanks for helping get this over the finish line. The PR details were key.