Hey, thanks for the detailed report. This is a known issue. The GitHub installation token for Cloud Agent doesn’t always get the right access scopes, which can cause both the “Error loading default branch” message and 403/401 errors when it tries to leave a PR comment.
A similar issue was discussed here: Background agent cannot create GitHub issue and here: Failed to Create a GitHub Pull Request from Cursor Web. The team is aware and is tracking it.
Could you share:
- The Request ID from one of the failed Cloud Agent runs (cursor.com/agents)
For now, the inconsistent behavior you’re seeing when you install and uninstall matches what we’re tracking. It looks like the installation token permissions on the backend may get “stuck.” Unfortunately, there isn’t a reliable workaround yet, but your report helps us prioritize this.
Let me know if you can share those IDs.