Task-led troubleshooting · official GitHub Docs checked Nov 3, 2026
Give GitHub Copilot cloud agent the right repository context
Understand why a Copilot cloud task may not see a second private repository, how attached repositories differ from the working repository, and which access settings to check.
Can Copilot cloud agent work across two private repositories in one task?
Treat the repository selected for the session as the working repository. GitHub’s cloud-agent guidance describes the sandbox as a copy of that selected repository and says the cloud agent is limited to the repository where it is creating a pull request. Attaching another repository can provide reference context, but does not make it the working repository for changes. If the work must change both repositories, create and review a separate task in each repository, subject to its access and organization policies.
How do I give a cloud session context from another repository?
In the session composer, use the Attach menu to add a repository as reference material, if it is available to you. GitHub distinguishes an attached reference from the repository selected when starting a session: the selected repository is the working scope. If a repository is missing from the picker, check whether your personal settings or an organization or enterprise policy excludes it, and confirm you can access it.
Why can Copilot read a repository but not make changes there?
GitHub documents that a cloud agent responds to users with write access for the repository and creates changes in the selected working repository. A second repository attached only as context is not a second writable checkout. Confirm your own write permission and the organization’s Copilot cloud-agent repository-access policy; ask an administrator if the repository is excluded.
Can I use a private repository as a package or dependency instead?
That is a different setup problem. For packages and other private resources, GitHub documents Agents secrets and variables for the cloud agent, plus setup steps for sessions that use GitHub Actions. See the separate private-dependency setup guide for registry credentials, environment differences, and workflow checks. Do not copy a broad personal token into a prompt or repository file.
What should I check when the second repository is unavailable?
First identify whether you need read-only reference context or changes in that repository. For reference context, check the Attach menu, your account or organization scope, and the repository access policy. For changes, start the task with that repository as the selected working repository and verify that you have write access. If using GitHub MCP configuration, GitHub says its default token is read-only for the current repository; access beyond it requires explicitly configured credentials, so review the credential scope and organization policy before changing it.
Does this guide show that Copilot can edit multiple repositories in one cloud task?
No. The guide separates documented reference context from the selected working repository and summarizes GitHub documentation checked November 3, 2026. It does not claim that one cloud-agent task can make coordinated changes across multiple repositories. Check current product documentation and your organization settings before relying on a workflow.
Sources
- GitHub Docs: Using Copilot in the cloud on GitHub · checked Nov 3, 2026
- GitHub Docs: Managing Copilot in the cloud for your organization · checked Nov 3, 2026
- GitHub Docs: GitHub Copilot Agents responsible use · checked Nov 3, 2026
- GitHub Docs: MCP for Copilot · checked Nov 3, 2026
- GitHub Community discussion #191790: access to another private repository · observed Nov 3, 2026