Where does the bug appear (feature/product)?
Cloud Agent (GitHub, Slack, Web, Linear)
Describe the Bug
When a Cursor Automation is configured with a “PR opened” trigger on a self-hosted GitLab repository, runs triggered by Merge Requests opened from a personal fork consistently fail at startup with:
The starting branch or commit
"<source-branch>"does not exist in<gitlab-host>/<org>/<repo>. It may have been deleted after its pull request merged. Choose an existing branch and try again.
The source branch has not been deleted and the MR is still open — it simply resides in the contributor’s fork repository (source_project_id != target_project_id), not in the upstream target repository.
In contrast:
- MRs opened from a branch inside the same upstream repository trigger the exact same automation and succeed every time.
- Cursor Bugbot runs and succeeds on the exact same forked GitLab MR, so the GitLab integration and webhook delivery are working properly.
Steps to Reproduce
- Connect a self-hosted GitLab instance to Cursor.
- Create a Cursor Automation triggered on “PR opened” for an upstream repository (
<org>/<repo>) by “Anyone”, with “Comment on Merge Request” enabled. - Open a Merge Request from a personal fork (
<user>/<repo>, branch<source-branch>) targeting<org>/<repo>:main. - Observe the Automation triggers a run, but the Cloud Agent fails because it tries to look up
<source-branch>on the upstream repository<org>/<repo>.
Expected Behavior
The Automation Cloud Agent should check out forked GitLab MRs properly — for example by fetching GitLab’s merge request ref (refs/merge-requests/<iid>/head) on the target repository, or fetching from the MR’s source fork repository — instead of looking up <source-branch> on the upstream repository.
Operating System
Other
Version Information
Cursor Automations (Web) with GitLab Self-Hosted (15.5.2-ee). Not IDE/CLI specific.
For AI issues: which model did you use?
N/A (fails during Cloud Agent branch checkout before model execution)
For AI issues: add Request ID with privacy disabled
Automation ID: 8ce6d842-a2ce-11f1-b532-320a589b8025
Failed Cloud Agent Run ID: bc-81d60c56-3e42-4924-8692-4dbd01401b09
Additional Information
This looks very similar to the GitLab fork MR issue previously fixed for Bugbot (Bugbot some times couldn't run on my GitLab Self-Hosted). Bugbot now handles these forked GitLab MRs fine, while Automations / Cloud Agent checkout still assumes the source branch exists on the target repository.
Does this stop you from using Cursor
No - Cursor works, but with this issue