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:
- Error message says “connect your GitHub account” for a GitLab repository (confusing messaging)
- The connection URL parameter is named
github_repoeven though it’s a GitLab URL - 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:
- API should recognize GitLab repository format
- Error message should say “connect your GitLab account” (not GitHub)
- Connection URL should work for GitLab repositories
- 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