Repository navigation
Conversation
VS Code 1.147's Copilot agent host initializes with clientInfo.name "vscode-agent-host", and its Copilot CLI sessions with the agent host off send "vscode". Both read ~/.copilot/mcp-config.json, so they belong to the copilot client. The copilot row stayed connected_never_seen and the sessions showed up as an "other" row (or, for "vscode", under the VS Code client). Move "vscode" from the VS Code client to copilot and add "vscode-agent-host". The VS Code Local harness sends the product's long name, so the VS Code client also gains "Visual Studio Code - Insiders". Fixes smart-mcp-proxy#1959
The clientName 'vscode' Copilot CLI sessions get their MCP servers through VS Code's MCP gateway, so nothing shows that name reaching MCPProxy with the Copilot credential. With the agent host off, VS Code falls back to the Local harness, which the VS Code client already matches.
…rt-mcp-proxy#1961) Squash of upstream PR smart-mcp-proxy#1961 (not yet merged upstream).
…rt-mcp-proxy#1961) Squash of upstream PR smart-mcp-proxy#1961 (not yet merged upstream).
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…into claude/vscode-agent-host-issue-1ecbe0
…rt-mcp-proxy#1961) Squash of upstream PR smart-mcp-proxy#1961 (not yet merged upstream).
|
Thanks @felipecrs — this is a clean, well-sourced fix, and the table of what each VS Code path sends made it easy to verify. I checked the 1.147.0 tag myself: Two small, non-blocking notes:
CI is approved and running; this is set to merge once it is green. |
|
Merged — thanks @felipecrs. The table of what each VS Code path sends made this quick to verify, and it fixes #1959 for both the agent host and Insiders. It ships in the next release. |
Pull Request
Description
Fixes #1959. Presence matches the MCP
initializerequest'sclientInfo.nameexactly againstClientInfoNames. VS Code 1.147 sends a name that no client lists, so the Copilot row staysconnected_never_seenand an "other" row appears.What each VS Code path sends. VS Code links are pinned to the
1.147.0tag.clientInfo.namevscode-agent-host, set asclientNameproductService.nameLong=Visual Studio CodenameLong=Visual Studio Code - Insiders(VS Code checks both names onappName=nameLong)clientName: 'vscode'~/.copilot/mcp-config.jsongithub-copilot-developerCaveat. The Copilot SDK documents
clientNameonly as part of the User-Agent. The MCPclientInfo.nameis set by the Copilot CLI runtime, which isn't open source, so the link fromclientNametoclientInfo.namecomes from what #1959 observed, not from source.Not in this PR: the issue's second option, matching a session to a client by the credential it uses whatever name it sends.
Testing
TestCopilotClientInfoNamesMatchWhatCopilotSendsnow also checksvscode-agent-host.go testpasses forinternal/connect,internal/clientidentity, and the client/presence/connect tests ininternal/httpapi,internal/runtimeandinternal/server, using the CI skip list for the E2E tests that start the binary. Not checked against a live VS Code. golangci-lint was not run.