GitLab not working with cloud agents

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

Cloud/Background agents continually throw the error:

{
  "error": "You need to connect your GitHub account to Cursor to access repository <GITLAB REPO>. Connect here: https://cursor.com/api/auth/connect-github?auth_id=auth0%7C<REDACTED>&github_repo=<URLENCODED REPO URL>&source=BACKGROUND_AGENT_API"
}

We are already connected to GitLab and when starting from inside the https://cursor.com/agents interface it is possible. However, we are not able to use the Clickup API as it throws the above error.

Issues:

  1. Error message says “connect your GitHub account” for a GitLab repository (confusing messaging)
  2. The connection URL parameter is named github_repo even though it’s a GitLab URL
  3. After visiting the connection URL, repository access is not granted (unverified - needs Cursor team to investigate)

Steps to Reproduce

curl --request POST \
  --url https://api.cursor.com/v0/agents \
  -u <KEY>: \
  --header 'Content-Type: application/json' \
  --data '{
    "source": {
      "repository": "<GITLAB REPO URL>",
      "ref": "main"
    },
    "target": {
      "autoCreatePr": true
    },
    "prompt": {
      "text": "Add a docstring to __init__.py"
    }
  }'

Expected Behavior

According to Cursor GitLab Documentation, Cloud Agents and Bugbot support GitLab repositories.

Expected:

  1. API should recognize GitLab repository format
  2. Error message should say “connect your GitLab account” (not GitHub)
  3. Connection URL should work for GitLab repositories
  4. After connecting GitLab account (per setup documentation), API should allow agent creation for GitLab repos

Alternatively:
If GitLab is not yet supported via the Cloud Agents API specifically, the error should clearly state: “GitLab repositories are not supported via API. Use the Cursor UI instead.”

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.50 (Universal)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
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.1.0

For AI issues: which model did you use?

Sonnet 4.5

Additional Information

API Endpoint Tested

  • Endpoint: POST https://api.cursor.com/v0/agents

  • Authentication: Basic Auth with API key

  • Content-Type: application/json

  • API Key: Valid (verified via GET /v0/me)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

GitLab is supported in UI Cloud Agents now, but the API spec only accepts GitHub repos. See API docs: Cloud Agents API | Cursor Docs

General GitLab docs: GitLab | Cursor Docs - agree, there’s a mismatch here. We’ll fix the messaging and params (connect-github/github_repo) and clarify support in the docs.

For now:

I’ll let you know here once we update the API/messaging.

Is there an ETA of when this will be added to the API?

Thanks for asking. No direct ETA yet for GitLab support in Cloud Agents API. Currently:

Thanks. Is it on your roadmap?

Yes, we’re planning this. But no exact ETA.

Also needing this for automations instead of manual actions. Hope this gets attention on your roadmap. :grinning_face:

Definitely interested in the API supporting GitLab. Would love to be notified when this is implemented/planned for a release!

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.