Repository navigation
[cherry-pick] agentHost: Remember the Copilot proxies a client resolved for Kerberos lookups - #345567
Merged
Merged
Conversation
…ed for Kerberos lookups
Christof Marti (chrmarti)
approved these changes
Nov 2, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the proxy-host caching and deduplicated Kerberos logging changes.
No open issues 🎉
What changed in this PR
This cherry-pick reduces repeated proxy resolution for Agent Host Kerberos lookups, particularly after reconnecting to WSL or a local container.
Changes:
- Remembers system proxy hosts resolved for GitHub Copilot, while leaving
http.proxysettings uncached. - Logs declined Kerberos lookups once per host.
- Updates tests to verify fewer proxy resolutions and deduplicated logging.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/browser/agentHostClientProxy.test.ts |
Updates resolution-count expectations and adds declined-host logging coverage. |
src/vs/platform/agentHost/browser/agentHostClientProxy.ts |
Caches Copilot-resolved proxy hosts and deduplicates decline logs. |
Review effort: Balanced
Dirk Bäumer (dbaeumer)
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #345516 from
release/1.145.Follow-up to #345225.
An Agent Host in WSL or a local container asks its client for Kerberos tickets for its proxy. The client only issues them for proxies it points the Agent Host at, and remembered only the proxies the Agent Host resolved through it. Any other lookup resolved the system proxy for GitHub Copilot again: an IPC to the main process and a PAC evaluation in Electron, once per new proxied connection. That happens, for example, after a window reconnects. The Agent Host keeps the proxy it cached from the earlier client, and the Copilot runtime keeps the
HTTPS_PROXYit was started with, so the new client never resolves that proxy itself.Changes
http.proxysetting need no IPC and stay uncached, so a change to that setting still applies right away.How to test
On Windows, behind a proxy that requires Kerberos, connect the Agents window to a WSL Agent Host and start a Copilot session. Reload the window and continue the session. The Agent Host's requests through the proxy keep working, and the renderer no longer resolves the proxy for each new proxied connection.
Validation
scripts\test.bat --reporter dot --run src\vs\platform\agentHost\test\browser\agentHostClientProxy.test.ts --run src\vs\platform\agentHost\test\electron-browser\agentHostProtocolClient.test.ts: 400 passing.only issues tickets for the proxies configured or resolved for GitHub Copilotnow expects two proxy resolutions for five lookups instead of four; the newlogs a declined proxy oncetest covers the log.npm run typecheck-client: passed. ESLint on the changed files: passed.