Repository navigation
Description
Description of the bug
When a page-side call never settles, the server answers no other tool call until it does, and an MCP notifications/cancelled for that request does not release it. Observed triggers are execute_webmcp_tool on a WebMCP tool whose execute never resolves and evaluate_script with a never-resolving promise; an earlier run in this investigation saw the same with execute_3p_developer_tool. On the 1.10.1 release, execute_webmcp_tool blocked the server with no upper bound in these runs (still blocked about 270 s after the cancel, when the client gave up), and evaluate_script blocked it until Puppeteer's 180-second protocol timeout. On main, the 60-second tool-call cap ends the wait, but it does so by discarding the browser and every page; the cancellation is still ignored. A client that cancels a stuck call has no way to get the server back short of a timeout or a restart.
Actual behavior
Case A (execute_webmcp_tool), cancel sent 5 s after the call:
release: list_pages #1 -> no answer within 30 s
list_pages #2 -> no answer within 240 s (server still blocked about 270 s after the cancel)
main: list_pages #1 -> no answer within 30 s
list_pages #2 -> answered about 61 s after execute_webmcp_tool started, when the 60 s cap fired:
## Pages
2: about:blank [selected]
Case B (evaluate_script), cancel sent 5 s after the call:
release: list_pages #1 -> no answer within 30 s
list_pages #2 -> answered about 180 s after evaluate_script started:
## Pages
1: Real Title (http://127.0.0.1:PORT/titled.html) [selected]
main: list_pages #1 -> no answer within 30 s
list_pages #2 -> answered about 61 s after evaluate_script started, when the 60 s cap fired:
## Pages
2: about:blank [selected]
On main, page 1 (the fixture page) is gone in both cases and the browser was replaced. The second list_pages carried no restart note; the note was presumably consumed by the earlier list_pages whose response the client had stopped waiting for (not observed, since the client discards late responses).
Another investigator observed on the release build that after a 400-second wait on execute_webmcp_tool the next list_pages also waited 400 s without an answer, and that execute_3p_developer_tool with a never-resolving execute blocked all tools until Runtime.callFunctionOn timed out after 180 s, with cancellation ignored there too.
Reproduction
- Serve these two pages from a loopback HTTP server on port
PORT./webmcp.htmlregisters a WebMCP tool that never resolves:
<!doctype html><title>WebMCP</title><script>
const mc = document.modelContext ?? navigator.modelContext;
mc.registerTool({name: 'hang', description: 'Never resolves', inputSchema: {type: 'object', properties: {}}, execute: () => new Promise(() => {})});
</script>/titled.html is any plain page, for example <!doctype html><title>Real Title</title><h1>Titled</h1>.
- Case A, WebMCP. Start the server under test with the flags above plus
--categoryExperimentalWebmcp --chromeArg=--enable-features=WebMCP, then send the following. The call with request idNis cancelled 5 s after it is sent with{"jsonrpc":"2.0","method":"notifications/cancelled","params":{"requestId":N,"reason":"probe cancel"}}. The firstlist_pagesafter it is given 30 s, the second 240 s.
{"name":"navigate_page","arguments":{"pageId":1,"url":"http://127.0.0.1:PORT/webmcp.html"}}
{"name":"list_pages","arguments":{}}
{"name":"execute_webmcp_tool","arguments":{"pageId":1,"toolName":"hang"}}
{"name":"list_pages","arguments":{}}
{"name":"list_pages","arguments":{}}- Case B,
evaluate_script. In a fresh server with only the base flags, send the same sequence with these first two calls, cancellingevaluate_scriptafter 5 s:
{"name":"navigate_page","arguments":{"pageId":1,"url":"http://127.0.0.1:PORT/titled.html"}}
{"name":"evaluate_script","arguments":{"pageId":1,"function":"() => new Promise(() => {})"}}Each case was run once per build for this report (four runs).
Expectation
The MCP cancellation utility (https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/cancellation) says the receiver of notifications/cancelled SHOULD stop processing the cancelled request and free associated resources. After the cancel, the server should be able to serve the next call promptly, with the browser and its pages intact.
MCP configuration
--headless --isolated --no-usage-statistics --no-performance-crux unless the reproduction states otherwise (update checks disabled with CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1).
Chrome DevTools MCP version
1.10.1 (npm) and main 5ddb0a3 (local build)
Chrome version
154.0.8037.98 (stable)
Node version
v22.23.2
Operating system
macOS 27.0
Environment details
- chrome-devtools-mcp 1.10.1 from npm (the release build).
- chrome-devtools-mcp built from
mainat commit 5ddb0a3 (themainbuild). - Google Chrome 154.0.8037.98 stable, headless; Node v22.23.2; macOS 27.
- Both builds were started with
--headless --isolated --no-usage-statistics --no-performance-cruxandCHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1, and driven by a scripted stdio MCP client that sendsnotifications/cancelledfor a pending request and stops waiting for that request's response.
Evidence
- Expected source: MCP specification 2025-06-18, Cancellation utility (linked above).
- Failure source: scripted MCP runs of Cases A and B on both builds. Every call runs under one tool lock (
using _guard = await this.toolMutex.acquire()inToolHandler.handle,src/ToolHandler.ts:237on themainbuild), and no handler observes the request's cancellation signal.execute_webmcp_tool(await tool.execute(input)atsrc/tools/webmcp.ts:71) awaits the page tool's response with no timeout or abort signal, which is why Case A has no upper bound on the release build. - Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Both cases were observed on both builds for this report; the 400-second run and the execute_3p_developer_tool variant are from an earlier run in this investigation.
Fix check
In Cases A and B, after notifications/cancelled is sent for the stuck call, the first list_pages is answered within a few seconds and still lists the fixture page as page 1, with no restart note. As a control, a WebMCP tool or script that resolves normally still returns its result, and cancelling a call that has already finished changes nothing.
Additional context
The full open and closed issue and PR corpus was screened as of 2026-10-06 (including searches for notifications/cancelled, cancel tool call and webmcp hang). Closed #2424 and #2426 are dialog-related stalls; no issue or PR reports ignored cancellation or a non-settling page tool blocking the server.
This issue closes when cancellation releases the server. Separately, execute_webmcp_tool has no timeout of its own: an earlier run in this investigation observed it blocking the release build for more than 800 s without any cancel. Whether a page tool call should also have a server-side bound is left to maintainers; it is not part of this issue's restoration check.
On the main build the 60-second tool-call cap from #2699 bounds these stalls, but it treats them as a lost browser connection and relaunches the browser, which is itself a separate defect for slow but valid calls. Restoring cancellation would let a client recover from a stuck call without depending on that cap.
Activity
feat: run independent tool calls in parallel with a TaskRunner (Chrom…
coygeek commentedon Nov 5, 2026
This is partly fixed. I reran the Fix check on 1.12.0 and on
mainat 0877ee0 with Chrome 156.0.8078.81, and both gave the same results. The Fix check still fails.Done
list_pagesstill lists the fixture as page 1, with no restart note. This matches fix: do not close a healthy browser when a tool call outlasts 60s #3149, which shipped in 1.11.0.execute_webmcp_toolno longer blocks tools on other pages.take_snapshoton page 2 answered in 5-7 ms during the stuck call on page 1. This matches feat: run independent tool calls in parallel with a TaskRunner #3243 and feat: run page-scoped tools on different pages in parallel #3252, which shipped in 1.12.0. I did not bisect either change.Left
execute_webmcp_tool,take_snapshoton the same page andlist_pagesgave no answer within 20 s.evaluate_script,take_snapshoton another page gave no answer within 20 s.The controls still pass: a resolving WebMCP tool and a resolving script return their results, and cancelling a finished call changes nothing. I did not retest
execute_3p_developer_tool. #3079 is open with changes requested; I did not run it.fix: preserve task serialization on request cancellation (ChromeDevTo…
fix: settle cancelled evaluate_script calls