π«€ Guidance on how to use Copilot Coding Agents with Poly Repo structure β #190627
Replies: 6 comments 1 reply
|
I haven't tried but did consider trying to do a checkout of the other repositories in the copilot-setup-steps, but this is messy and also comes with challenges of it correctly creating new branches on the "associated" repos along with creation of PRs etc. (I'm not sure if it can even do a git clone), although found you can instruct the agent to change git config :D Is there anything in the roadmap to address this by chance? |
|
Currently, Copilot Coding Agents are sandboxed to a single repository, so they donβt natively handle cross-repo changes in a polyrepo setup. Some workarounds include:
At the moment, full polyrepo support isnβt officially available, so the best practice is to treat the agent as repo-specific and coordinate multi-repo changes manually or with tooling. Mark as answered if your happy with this :D |
|
Gemini said Maintain a shared schema or .github/copilot-instructions.md in each repo to explicitly define the contracts and paths of its dependencies. |
|
Hi @michael-proctor , this is a very common pain point and it also bothered me quite a bit when I first started using Copilot in a poly repo setup too. Here are my key takeaways after working throughcross-repo devlopment in my organization:
This gives Copilot a unified view across your repositories without needing to change your actual repo structure. Hope this helps! |
This comment was marked as low quality.
This comment was marked as low quality.
|
I would keep the cloud agent repo-scoped rather than widening one agentβs credentials across the organization. For a vertical feature spanning polyrepos, coordinate several bounded repo-specific tasks around one shared contract. A workable sequence is:
This does not give Copilotβs cloud agent cross-repo context, but it turns the sandbox boundary into a useful ownership boundary and avoids distributing broad tokens to one autonomous process. Maintainer disclosure: I am building Better Agent, a local web workspace that can supervise separate Claude, Codex, Gemini, and other coding-agent sessions with persistent plans, files, approvals, and recovery: https://github.com/ofekron/better-agent It is source-available and free for non-commercial use. It can help coordinate those repo-scoped sessions, but it does not change Copilot Coding Agentβs cloud sandbox or grant it cross-repository access. |

Uh oh!
There was an error while loading. Please reload this page.
π·οΈ Discussion Type
Question
π¬ Feature/Topic Area
Copilot Coding Agent
Body
Have been trialling Github Coding Agents in our organization. One of the challenges we are facing is the poly repo structure. Each library, service is it's own repository. When doing a feature which requires changes across boundaries it becomes painful to link up the work from each agent.
Although I understand the core principle of the sandboxed environment only having access to the targeted repository, is there anyway we can provide rules to give it access to other repositories so it can have complete context?
We have a legacy codebase which is a distributed monolith in a mono repo pattern, Copilot does great at seeing the context across the boundaries and makes the required changes across the multiple projects.
Is there any guidance on how to operate in a poly repo pattern with Coding Agent?
All reactions