Skip to content

Claude in Chrome: tabs_close_mcp times out on tabs with unsaved changes (beforeunload prompt), no error naming the blocker #109183

Open

Description

@aunysillyme

What happened (observed 2026-11-10 and 2026-11-11, Claude Code desktop, Claude in Chrome tools):
tabs_close_mcp on a tab that holds unsaved edits (a Shopify admin code editor with an "Unsaved changes" bar) does not return: it fails with "The tool did not respond in time". It failed the same way on six separate tabs, from two different agents (a subagent and the main session), and the tabs stayed open. Closing a tab with no unsaved edits worked normally in the same session.

What I expect: either the tab closes, or the tool returns an error that names the blocker (for example "page has a beforeunload dialog") so the agent can stop and ask the user to click Leave, instead of timing out and retrying.

Likely cause (not confirmed): Chrome's "Leave site?" beforeunload prompt on pages with unsaved changes; the extension appears to wait on it and has no way to answer it.

Cost: six tabs were left open in the user's real Chrome profile, and the agents had no signal to tell them why.

Suggested handling: detect the beforeunload dialog (CDP Page.javascriptDialogOpening), return a clear error, and optionally offer a force option that accepts the dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions