Background Agent (GitHub, Slack, Web, Linear)
※ Cloud Agents dashboard → Create a New Environment
Describe the Bug
When I try to create a new Cloud Agent Environment for a private repository on my personal GitHub account, the setup fails immediately with:
“Could not resolve default branch”
The failure happens before any agent run starts. I never get past Create a New Environment → Start Agent. No agent is created and there is no Request ID in the agents URL.
This is not a local Git issue: GitHub API and gh CLI both confirm the default branch main exists with commits.
Steps to Reproduce
Ensure Cursor GitHub App is installed on my personal account with All repositories access
Go to Cloud Agents dashboard → New Environment
Select my private repo from the list (not typed manually)
Click Start Agent
Error appears immediately: Could not resolve default branch
Expected Behavior
Cursor should resolve main as the default branch and proceed with environment onboarding (~20 min setup).
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
We’re also having this issue and cannot create any cloud agent environment. Could be related to the fact that our default branch is not master or main, but Cursor settings does have a field to set the name of the default branch and we did. Apparently they’re ignoring the field.
I have the same problem. For me the network response says that it failed because I am in privacy mode (legacy). However there is no hint on the UI at all.
{
"error": {
"message": "Error",
"details": [
{
"error": "ERROR_BAD_REQUEST",
"details": {
"title": "Bad Request",
"detail": "Cloud agent is not supported in Privacy Mode (Legacy). Switch to Privacy Mode to use cloud agents.",
"isRetryable": false,
"additionalInfo": {
"cloudAgentLegacyPrivacyEnforcingTeams": "[]"
},
"buttons": [],
"planChoices": []
},
"isExpected": true
}
]
}
}