Agent Window shows the wrong related PR when multiple PRs share the same head branch

Feature request for product/service

Cursor IDE

Describe the request

Hi Cursor team,

I’m seeing an issue where the Agent Window links to the wrong pull request when there are multiple GitHub PRs created from the same head branch.

In our workflow, we sometimes have a secondary branch that mirrors the main integration branch, so it is possible to have two PRs with the same feature branch as the head but different base branches.

Example:

  • PR A: feature/some-work → integration-base
    • Status: Open
    • This is the PR I want to work with in Cursor
  • PR B: feature/some-work → mirror-branch
    • Status: Merged
    • This was created for branch mirroring / synchronization

When I’m on feature/some-work in Cursor, the Agent Window shows PR B as the related PR, even though PR B is already merged and PR A is still open.

Expected behavior:

  • Cursor should prefer the open PR over a merged PR when multiple PRs share the same head branch.
  • Ideally, Cursor should also consider the current intended base branch, or provide a way to explicitly link the Agent Window to a specific PR URL.

Actual behavior:

  • Cursor displays the merged PR instead of the open PR.

This makes the Agent Window confusing in workflows where the same feature branch may temporarily have PRs targeting multiple base branches.

Would it be possible to improve the PR selection logic, or add a way to manually associate an Agent Window with a specific PR?

This is a known bug. When multiple PRs share the same head branch, the Agent Window doesn’t prefer the open PR over merged or closed ones. Your workaround of using GitHub directly for PR management is the best option for now.

The team is actively working on improving how the Agent Window resolves and displays PR associations. I don’t have a specific timeline, but this area is seeing active development.