Goal
Use repositories on multiple GitHub Enterprise instances concurrently in the same VS Code window, with one selected account/client per host. GitHub.com continues to use its separate connection.
This is the Walk follow-up to Crawl (#9003, implemented by #8996). Crawl recognizes multiple configured instances but keeps only one Enterprise account active at a time. This issue removes that host-switching limitation; it is not part of #8996.
User experience
With GitHub.com, Enterprise A, and Enterprise B repositories open, all three should be usable at once. Authenticating, refreshing, or signing out on B should not replace A's connection or disrupt public GitHub repositories.
Scope
- Introduce host-aware connections while retaining one selected account per host. Reuse the existing credential/authentication owner rather than adding a second source of truth.
- Resolve a repository's host/deployment identity and request a session with an explicit
authorizationServer hint. Validate the returned issuer; session provenance remains authoritative for API destinations.
- Scope account selection, current-user data, scope upgrades, reauthentication deduplication, failures, and invalidation to the affected host.
- Include provider/host/deployment identity wherever repository, notification, or cache keys currently rely only on owner/name or native account/session IDs.
- Make repository-bound PR, issue, review, tool, and agent actions use the repository's connection.
- Define explicit selection or aggregation for hostless entry points such as notifications and clone/search. Do not silently pick the first configured host or automatically sign into every instance at startup.
- Keep errors and sign-in prompts local to the affected host. Configuration changes and account removal must not disrupt unrelated connections.
Design decisions before implementation
- How should SSH remotes that do not uniquely identify a deployment path or API port select an instance?
- How should native account preferences be represented per host under the single
github-enterprise provider?
- Which hostless views aggregate results, and which ask the user to select a host?
Acceptance
- GitHub.com plus two Enterprise hosts work simultaneously, including identical owner/repository names and colliding native account/session IDs.
- An account change, expired token, canceled scope upgrade, or removed instance affects only that host.
- Tokens, current-user state, cached metadata, comments, and notifications never cross host boundaries.
- Unavailable or slow hosts do not block healthy repositories, and background refresh does not produce surprise sign-in prompts.
- Cover desktop, web, and remote extension hosts with product-code tests and a real-account integration pass.
Out of scope
Multiple accounts on the same host, including multiple GitHub.com accounts, belong to Run. This phase does not change Copilot service eligibility or invent new Enterprise authentication providers.
Walk/Run design outline.
Next phase: #9005 (Run: multiple accounts on the same host).
Goal
Use repositories on multiple GitHub Enterprise instances concurrently in the same VS Code window, with one selected account/client per host. GitHub.com continues to use its separate connection.
This is the Walk follow-up to Crawl (#9003, implemented by #8996). Crawl recognizes multiple configured instances but keeps only one Enterprise account active at a time. This issue removes that host-switching limitation; it is not part of #8996.
User experience
With GitHub.com, Enterprise A, and Enterprise B repositories open, all three should be usable at once. Authenticating, refreshing, or signing out on B should not replace A's connection or disrupt public GitHub repositories.
Scope
authorizationServerhint. Validate the returned issuer; session provenance remains authoritative for API destinations.Design decisions before implementation
github-enterpriseprovider?Acceptance
Out of scope
Multiple accounts on the same host, including multiple GitHub.com accounts, belong to Run. This phase does not change Copilot service eligibility or invent new Enterprise authentication providers.
Walk/Run design outline.
Next phase: #9005 (Run: multiple accounts on the same host).