Where does the bug appear (feature/product)?
Background Agent (GitHub, Slack, Web, Linear)
Describe the Bug
Hi Cursor team,
I’m trying to use the Cloud Agent API to create agents for our internal GitLab repository (self-hosted). I’ve set up a public proxy via Cloudflare Tunnel to make the repository accessible from the internet.
Steps to Reproduce
Request:
curl --request POST \
--url https://api.cursor.com/v0/agents \
-u mykey: \
--header 'Content-Type: application/json' \
--data '{
"prompt": {
"text": "Analyze the login flow"
},
"source": {
"repository": "https://my-proxy-domain.com/org/my-repo",
"ref": "develop/1.0.2"
}
}'
Response:
{
"error": "Failed to verify existence of branch 'develop/1.0.2' in repository my-proxy-domain.com/org/my-repo. Please ensure the branch name is correct."
}
What I’ve verified:
- The branch
develop/1.0.2exists in the repository - The repository is publicly accessible via the proxy URL
- I can
git clone -b develop/1.0.2from the proxy URL successfully
Questions:
- Does the Cloud Agent API support non-GitHub repositories (GitLab, self-hosted Git)?
- If so, is there any additional authentication or configuration required?
- How does the API verify branch existence? Does it require public read access without authentication?
Environment:
- Repository: Self-hosted GitLab behind a public HTTPS proxy
- Branch format:
develop/x.x.x(contains forward slash)
Expected Behavior
The Cloud Agent API should be able to:
-
Accept non-GitHub repository URLs - Support GitLab self-hosted Git repositories that are publicly accessible via HTTPS
-
Successfully verify branch existence - When the repository and branch are accessible via
git ls-remoteorgit clone, the API should be able to verify them -
Clone and analyze the repository - Once verification passes, the agent should clone the repository and start analyzing the code
Current Behavior:
The API returns "Failed to verify existence of branch" error even though:
- The repository URL is publicly accessible
- The branch exists and can be cloned manually using
git clone -b <branch> <url>
Workaround Attempted:
We’ve tried accessing the same repository through Cursor’s web interface (cursor.com/agents), which works correctly. This suggests the backend can handle non-GitHub repos, but the public API /v0/agents endpoint may have different validation logic.
Thank you for your help!
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.41
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.2.0
Does this stop you from using Cursor
Yes - Cursor is unusable