Agent host: MCP tool confirmations lose ToolCallContributor after the MCP server reconnects mid-turn#340435
Version: VS Code 1.140.0 (07f806f999227108933c2e30515b26eecc1fda74), agent host, copilotcli provider. Still present on main (copilotAgentSession.ts line ~5443).
Problem
For tools from a root-configured (mcpServers) MCP server, the AHP session/inputNeededSet tool-confirmation request normally carries
toolCall.contributor = { kind: "mcp", customizationId: "mcp-top-level:copilotcli:<session>:<server>" }.
After the MCP server restarts and the host reconnects to it during a running turn (MCP server '<name>' pending (starting) → connected (ready)), later confirmations for that server's tools arrive with no contributor at all. The toolInput still names the server ({"serverName":"<name>","toolName":"<name>-<tool>"}).
Per the AHP MCP guide, an MCP tool call is identified by its MCP ToolCallContributor, so a client can no longer attribute these tool calls to their server.
Observed sequence (agent host log + AHP log)
- Before the reconnect:
Tool started: x-update_record→Requesting confirmation …→ request has the contributor. - MCP server
x:pending (starting)→connected (ready).