mcp__claude-in-chrome resize_window reports success but does not change viewport size
Bug
resize_window (Claude in Chrome MCP tool) returns "Successfully resized window
containing tab <id> to <W>x<H> pixels" but the tab's actual viewport is
unchanged — verified via window.innerWidth/window.innerHeight in the same
tab immediately after the call.
Repro
- Open any page in a Claude-in-Chrome tab (tested on a live WordPress
admin page, desktop-sized window ~1360-1470px wide).
- Call
resize_windowwith a mobile size, e.g.{width: 390, height: 844}. - Tool returns success: "Successfully resized window containing tab <id>
to 390x844 pixels".
- Call
javascript_toolwithwindow.innerWidth— returns the original
desktop width (e.g. 1359, 1464), not 390.
- A screenshot taken after the resize call still shows the full desktop
layout, not a mobile layout — confirmed CSS media queries (max-width:) did not re-trigger.
768px
Reproduced twice in the same session, on two different pages, with a range
of target sizes (390x844, 414x896, 500x900) — all reported success, none
changed window.innerWidth.
Impact
Any responsive/mobile-viewport verification workflow that relies onresize_window for this tool silently produces a false-positive "verified
at mobile width" result — the screenshot/DOM read after the call is still
the desktop render, with no error or signal that the resize didn't happen.
Workaround used
Injected a same-origin <iframe> sized to the target viewport
(width:390px;height:844px) pointing at the same URL, then screenshotted/
zoomed into that region. This correctly triggers the CSS media query at
the iframe's own viewport width since iframes get their own layout
viewport. Not a real substitute for actual window/device-metrics resize
(cross-origin pages, JS relying on window.top, etc. would behave
differently), but useful as a stopgap for same-origin responsive checks.
Environment
- Platform: macOS (Darwin)
- Claude Code CLI, claude-in-chrome MCP server
- Reproduced in a non-interactive session; window is a real Chrome window
(not headless)