Where does the bug appear (feature/product)?
- 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).
Screenshots / Screen Recordings
Operating System
- MacOS
For AI issues: which model did you use?
N/A — this occurs during Environment setup, before any model/agent run.
For AI issues: add Request ID with privacy disabled
No Request ID available — setup fails before an agent run is created.
Additional Information
Already ruled out (standard Git causes):
- Empty repository / no initial commit
- Missing
mainon remote mainvsmastermismatchgh apiconfirmsdefault_branch: mainand branch exists with commits
Already tried:
- Disconnect / reconnect GitHub in Cursor Integrations
- Uninstall and reinstall Cursor GitHub App (personal account, All repositories)
- Multiple retries over several hours (error is consistent, not intermittent)
- Confirmed Pro plan
Suspected cause: Stale or mismatched GitHub App installation ID on Cursor’s backend (similar to other forum reports).
Workaround: Using local Cursor Agent + GitHub Actions for now. Cloud Environment setup remains blocked.
Related threads:
- Cloud Agents cannot load default branch during environment setup and lose write access to GitHub despite correct App installation and org permissions
- Cursor Cloud Agent fails with “Error loading default branch” during environment setup
I can share repo details privately with the team if needed.
