Automation keeps opening duplicate PRs for the same bug when previous PR is not merged

Where does the bug appear (feature/product)?

BugBot

Describe the Bug

When using the “Check for bugs in the latest code” Automation template, if the automation opens a fix PR and that PR is NOT merged before the next run, the automation creates a brand new bug ticket and a new PR for the exact same issue on every subsequent run.

This results in multiple duplicate open PRs for the same bug. If a maintainer is away for a few days, you can end up with 3-5 identical PRs, wasting CI resources and creating confusion about which one to review.

Steps to Reproduce

  1. Create an Automation using the “Check for bugs in the latest code” template, pointing it at a repo with a known reproducible bug.
  2. Run the automation. It detects the bug and opens a fix PR.
  3. Do NOT merge the PR.
  4. Wait for the automation to trigger again (scheduled run or manual re-trigger).
  5. Observe: the automation opens a second, separate bug ticket and a new PR for the exact same issue.
  6. Repeat step 4 without merging. Each run creates yet another PR.

Result after 3-5 runs with no merge: 3-5 open PRs all targeting the same bug fix.

Expected Behavior

Once a bug has been detected and a fix PR has been opened, subsequent automation runs should NOT open additional PRs for the same issue. The automation should:

  1. Check for existing open PRs (or issues) related to the same bug before creating a new one.
  2. If an open PR already exists for that bug, skip PR creation and optionally leave a comment on the existing PR noting the bug is still present.
  3. Only open a new PR if no open fix PR exists for that specific issue.

This would prevent PR spam and wasted CI resources when maintainers can’t merge immediately.

Operating System

MacOS

Version Information

Latest (Cursor Automations / BugBot — web-based, no IDE version applicable)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. The description is really solid, with clear steps and expected behavior.

Confirmed this is a product gap. The template runs on a cron with memory enabled, but the prompt doesn’t tell the agent to check memory or existing open PRs before creating a new one. So there’s no cross-run deduplication right now, only within a single run. I’ve shared this internally with the team.

I can’t share an ETA for a fix yet. Once I have an update, I’ll reply in the thread.

For now, the workaround is if you know the maintainer will be unavailable, you can pause the automation temporarily or increase the interval between runs so duplicates don’t pile up.