Summary
Copilot CLI does not send an MCP cancellation request when a tool call is
waiting for an in-flight URL-mode elicitation to complete. If the user
cancels the tool call while the authentication browser flow is pending, the
MCP server remains blocked until the elicitation or authentication flow
eventually returns.
Steps to reproduce
- Start an MCP server that uses URL-mode elicitation for authentication.
- Invoke a tool that triggers authentication.
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"_meta":{"progressToken":1},"name":"foo","arguments":{}}}
- Accept the Elicitation Request
{"jsonrpc":"2.0","id":1,"result":{"action":"accept"}
- Cancel the tool call from Copilot CLI without finishing the authentication flow in the browser
Actual behavior
- Copilot CLI does not send an MCP cancellation request for the pending tool call.
- The server-side elicitation remains in flight.
- The tool call does not terminate promptly after the user cancels it.
- The server can remain blocked until the authentication flow's timeout
Expected behavior
When the user cancels the tool call, Copilot CLI should send an MCP
cancellation request for the associated in-flight request, as specified by
the MCP cancellation protocol. The server should then observe cancellation
through the request context and promptly terminate the pending elicitation and
tool call.
Impact
We have an MCP server that synchronizes elicitation requests to ensure that parallel tool calls do not trigger the same authentication flow multiple times.
If the user cancels the authentication flow (for example, by canceling the tool call), the server cannot release the synchronization lock because the client does not send an MCP cancellation request. As a result, the pending elicitation remains blocked, and all subsequent tool calls that require the same lock are also blocked until the authentication flow eventually times out or completes.
Summary
Copilot CLI does not send an MCP cancellation request when a tool call is
waiting for an in-flight URL-mode elicitation to complete. If the user
cancels the tool call while the authentication browser flow is pending, the
MCP server remains blocked until the elicitation or authentication flow
eventually returns.
Steps to reproduce
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"_meta":{"progressToken":1},"name":"foo","arguments":{}}}{"jsonrpc":"2.0","id":1,"result":{"action":"accept"}Actual behavior
Expected behavior
When the user cancels the tool call, Copilot CLI should send an MCP
cancellation request for the associated in-flight request, as specified by
the MCP cancellation protocol. The server should then observe cancellation
through the request context and promptly terminate the pending elicitation and
tool call.
Impact
We have an MCP server that synchronizes elicitation requests to ensure that parallel tool calls do not trigger the same authentication flow multiple times.
If the user cancels the authentication flow (for example, by canceling the tool call), the server cannot release the synchronization lock because the client does not send an MCP cancellation request. As a result, the pending elicitation remains blocked, and all subsequent tool calls that require the same lock are also blocked until the authentication flow eventually times out or completes.