Cannot run Cloud Agent against a Bitbucket repository

Where does the bug appear (feature/product)?

Cloud Agent (GitHub, Slack, Web, Linear)

Describe the Bug

Creating a Cloud Agent environment from a Bitbucket Cloud repository fails while resolving its default branch. Repository discovery works and shows the complete repository list.

Steps to Reproduce

  1. Open https://cursor.com/dashboard/cloud-agents
  2. Click New Environment.
  3. Select a Bitbucket Cloud repository.
  4. Select Personal or Team scope.
  5. Wait for Resolving branch to change to Start Agent.
  6. Click Start Agent.

Actual result

The operation fails with:
Could not resolve default branch
No environment or Agent conversation is created.

Expected Behavior

Cursor resolves the repository’s configured default branch and creates the environment.

Operating System

Windows 10/11

Version Information

Web - no version :wink:

For AI issues: which model did you use?

None. Couldn’t start the agent.

Additional Information

I have a sanitized network trace if that’s helpful. Don’t know where to upload it, though.
I can of course use Cursor in other contexts, but the cloud agent feature is completely broken for me.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @stmoebius, thanks for the report and the clear steps!

From what we can see, your team’s repository list comes from the Cursor app installed in your Bitbucket workspace, but looking up branches (and the agent’s own access to the repo) uses your personal Bitbucket connection. Your account doesn’t have one linked yet, so the branch lookup fails and the dashboard shows the generic “Could not resolve default branch” message instead of the real reason. I’ve flagged both parts to the team.

In the meantime, this should get you unblocked:

  1. Open https://cursor.com/dashboard/integrations
  2. Find Bitbucket under Source Control.
  3. Click Connect. If it already shows Manage, open that menu and choose Reconnect.
  4. Approve access in Bitbucket with an account that can see the repository.
  5. Go back to Cloud Agents, click New Environment, pick the repo again and click Start Agent.

Could you let us know whether it works after that? If it still fails, please reply with the exact error text and roughly what time you tried, so we can match it on our side.

Ok, this has actually solved it for me. Thanks for the quick reply!