GitHub repositoryDependencies in different Organizations

Where does the bug appear (feature/product)?

Cloud Agent (GitHub, Slack, Web, Linear)

Describe the Bug

repositoryDependencies only expands the scope in the GitHub Organization of the repository the environment is spun up in - even if another organization’s repo is linked and they are part of the same GitHub Enterprise

Steps to Reproduce

Prerequisites

Two distinct GitHub Organizations (Org A and Org B) that belong to the same GitHub Enterprise.

One repository in each organization (e.g., Org-A/primary-repo and Org-B/dependency-repo).

The user must have access to both repositories. Cursor must be connected to both orgs.

Steps to ReproduceConfigure the Environment:

In Org-A/primary-repo, define the environment.json for Cursor and add the cross-org repository to the repositoryDependencies

{
“repositoryDependencies”: [
github.com/Org-B/dependency-repo
]
}

Launch the Environment: Spin up the Cursor environment for Org-A/primary-repo.

Attempt to clone - failure.

Expected Behavior

I would expect that setting repositoryDependencies for another org’s repo in my enterprise adds that repo to the scoped token in Cloud Agent.

Operating System

Other

Version Information

Cloud Agent

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. Your analysis is correct. The token Cloud Agent gets is scoped per organization at the GitHub App installation level, so a repositoryDependencies entry that points to a repo in another org isn’t included in the token right now, even if both orgs are in the same GitHub Enterprise. This is a current limitation, not something in your config. I’ve passed it to the team.

What should work today as a workaround is to add the Org-B repo as a full repository in a multi-repo environment instead of using repositoryDependencies. In the Cloud Agents dashboard, open your environment and add the second repo. Multi-repo environments can span multiple organizations, and each org gets its own credentials. Just make sure the Cursor GitHub App is installed on both orgs. From your description, it already is.

Let me know if this unblocks you. If there’s an update on the main repositoryDependencies flow, I’ll reply in the thread.

In the Cloud Agents dashboard, open your environment and add the second repo.

Can you clarify how one adds more repos? I have 4 repos and would now like to add one, but I’m not seeing how you add: