You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: MCP idle timeout closes the browser during a tool call that outlasts it, failing that call #42693
so the clock now runs during the call rather than around it.
What made this easy to miss is that #42663 shipped a test for exactly this, does not close the browser while a tool call is running. #42666 removed it while consolidating to one test per scenario, and #42676 landed after that, so nothing was left to catch it. Re-adding that test would pin the behaviour.
One smaller thing in the same three lines: the re-armed timer used to be .unref()ed and no longer is. Now that the timer is armed by default with defaultIdleTimeout of an hour, a pending one will hold the event loop open. I did not chase that far enough to say whether anything else keeps the process alive anyway, so treat it as a note rather than a claim.
The default of an hour makes this hard to hit by accident, but any explicitly lowered --idle-timeout combined with a slow navigation or a long browser_wait_for runs into it.
I am a freshman in college trying to be genuinely useful on real projects, so if the new semantics are intentional and the timer is meant to bound total call time too, I am happy to be told so.
Retracting the .unref() aside at the end of the report, I went and checked it properly and it does not hold up.
I spawned lib/entry/mcp.js --headless over stdio, ran a browser_navigate so the default hour-long timer was armed, then closed stdin. The process exited with code 0 after 27ms, so something on the transport-close path already tears the timer down and nothing hangs. Dropping .unref() has no visible consequence that I can find.
The main report is unaffected, that part was measured separately and still reproduces. Sorry for the noise in the original.
Activity
ayaangazali commentedon Sep 12, 2026
Retracting the
.unref()aside at the end of the report, I went and checked it properly and it does not hold up.I spawned
lib/entry/mcp.js --headlessover stdio, ran abrowser_navigateso the default hour-long timer was armed, then closed stdin. The process exited with code 0 after 27ms, so something on the transport-close path already tears the timer down and nothing hangs. Dropping.unref()has no visible consequence that I can find.The main report is unaffected, that part was measured separately and still reproduces. Sorry for the noise in the original.