Cloud Agent API: Support for GitLab/Self-hosted Git Repositories

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:

  1. The branch develop/1.0.2 exists in the repository
  2. The repository is publicly accessible via the proxy URL
  3. I can git clone -b develop/1.0.2 from the proxy URL successfully

Questions:

  1. Does the Cloud Agent API support non-GitHub repositories (GitLab, self-hosted Git)?
  2. If so, is there any additional authentication or configuration required?
  3. 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:

  1. Accept non-GitHub repository URLs - Support GitLab self-hosted Git repositories that are publicly accessible via HTTPS

  2. Successfully verify branch existence - When the repository and branch are accessible via git ls-remote or git clone, the API should be able to verify them

  3. 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

Hey there @pandaa

Unfortunately, POST /v0/agents only supports GitHub today, and not Gitlab. :frowning:

In the meantime, you’ll need to continue using the Web UI to launch agents for Gitlab repo.

This is a feature we’ve been looking forward to, and we hope it can be implemented as soon as possible. It would be a great help for us in managing day-to-day issues in the backend. Thank you very much!

Sadly the WebUI is also not functional for GitLab repositories.

GitLab seems to have quite bad support in general based on all of the open bug reports with no solutions.

Are there any updates on support for GitLab in the last three months?

(two more links because I can only do 2 per post)