[BUG] The browser pane `computer { action: "screenshot" }` tool consistently times out after 30s with:
Status Fixed / completed
Reported on v2.1.198
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Jul 11, 2026 · closed Jul 16, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The browser pane computer { action: "screenshot" } tool consistently times out after 30s with:
computer timed out after 30s. The Browser pane may be stuck (modal dialog, navigation hang, or unresponsive renderer).
Steps to reproduce
- Open Claude Code desktop app (Windows 11)
- Use
preview_startwith any URL (internal or external) - Call
computer { action: "screenshot" } - Times out every time — restarting Claude Code does not fix it
Environment
- OS: Windows 11 Pro 10.0.26200
- Claude Code: desktop app
- URLs tested: https://google.com
Notes
navigateworks fine (returns 200)read_pageworks fine (returns full DOM)- Only
screenshot/computeractions fail
What Should Happen?
The screenshot should be returned immediately showing the current state of the browser pane, as it does in other sessions/platforms.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code desktop app (Windows 11)
- Use preview_start with any URL
- Call computer { action: "screenshot" }
- Tool times out after 30s — restarting Claude Code does not fix it
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.198 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
5 Comments
I hit the same failure on Windows 11 (Claude Code 2.1.199, desktop app) and was able to pin down the root cause from inside the affected page.
Root cause
The captures hang whenever the Browser pane is not visible on screen (panel collapsed, covered, or app minimized). Chromium applies occlusion/background throttling to hidden pages: the compositor stops producing frames entirely, and the capture path waits for a compositor frame that will never arrive, until the 30 s MCP timeout fires. DOM tools (
read_page,get_page_text,javascript_tool) keep working because they don't need compositor frames — which is why the renderer looks healthy in every other respect.Evidence, gathered via
javascript_toolon the exact tab wherescreenshotandzoomwere both timing out:document.visibilityState === "hidden"→ the pane's WebContents is occluded/backgrounded.requestAnimationFramenever fires → zero compositor frames are being produced.The failure is fully deterministic: pane hidden ⇒ 100 % of
screenshot/zoomcalls time out; pane visible ⇒ captures work.Suggested fixes
document.visibilityState(or check occlusion state) on the target. If hidden, return immediately with something like "Browser pane is hidden; make it visible to capture, or use read_page instead" rather than a 30 s generic timeout.webPreferences.backgroundThrottling: false, and/orPage.setWebLifecycleState("active")for the duration of the capture) socaptureScreenshotgets a frame even off-screen.Quick workaround for anyone hitting this: keep the Browser pane visible while asking for screenshots, or probe first with
javascript_tool:await Promise.race([new Promise(r=>requestAnimationFrame(()=>r('visible'))), new Promise(r=>setTimeout(()=>r('hidden'),1500))])— if it returnshidden, don't bother attempting a capture.i am having the exact same issue
same issue, Claude gave me this for a bug report:
Title: In-app Browser preview never displays; screenshots always fail (Windows desktop app)
Environment
App: Claude/1.20186.1 (MSIX package), Electron 42.5.1, Chromium 148.0.7778.271
OS: Windows 11 Pro (build 10.0.26200), x64
GPU: NVIDIA GeForce RTX 5090
Summary
The in-app Browser/preview pane is never displayed in the app window, and every screenshot capture fails as a result. Reproduces on every session, persists across full OS reboots and app reinstalls (Squirrel → MSIX, both 1.20186.1).
Steps to reproduce
Open a Browser preview in a session.
Observe: no browser panel appears in the app window (logs show [Preview] Created browser preview succeeded).
Attempt a screenshot of the preview.
Expected: the preview panel renders and the screenshot returns an image.
Actual: no panel is visible; screenshot times out (~30s) or fails immediately.
Diagnostic evidence
The preview webContents reports screen 0×0 and window.outerWidth/Height 0×0 even when its tab is active (document.visibilityState stays hidden) — it's mounted off-screen / zero-size, so the compositor never paints a frame.
Screenshot path fails in %APPDATA%\Claude\logs\main.log:
[CDPTools] CDP compressed screenshot failed
[Preview] capturePreviewScreenshot failed: Error: target closed while handling command (stack via destroyPreview → teardownSession, app-1.20186.1)
Not a GPU issue: WebGL initializes fine (ANGLE / NVIDIA RTX 5090 / Direct3D11) and 2D canvas rasterizes correctly.
Not corrupt window state: window-state.json is clean ({"width":1200,"height":800}, no off-screen coordinates).
DOM / JS / console / network tools all work — only frame painting and capture are broken.
Independent reproduction, with main-process log evidence supporting the hidden-pane mechanism.
Environment
Deterministic repro, both directions
computer {action: "screenshot"}andzoomcalls time out at 30s. Dozens of attempts across multiple sessions, zero successes.zoom. No other change.navigate,read_page,read_console_messages, and click/type actions work normally against the same tab, so the CDP session itself is healthy.Log signature (
%APPDATA%\Claude\logs\main.log; for the Store build the real path isAppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\logs)Each hung capture logs only:
The underlying CDP
Page.captureScreenshotcommands never resolve — they stay pending until the preview is torn down, at which point they all flush at once:(a dozen of these with the same timestamp, one per earlier hung attempt, emitted at pane/preview close).
This is consistent with Chromium not compositing frames for a hidden/occluded webview:
Page.captureScreenshotwaits for a frame that never comes, and the tool layer gives the generic "renderer may be stuck" timeout.Ruled out (no effect on the hang; pane visibility was the only variable that mattered):
Cache,Code Cache,GPUCache,DawnGraphiteCache,DawnWebGPUCache)Workaround confirmed: keep the Browser pane visible while captures run.
Two suggestions from the debugging experience: the 30s timeout message ("The Browser pane may be stuck...") is misleading for this case — detecting a hidden pane and either forcing offscreen frame generation (e.g.
fromSurface/captureBeyondViewport-style capture or briefly waking the compositor) or returning a "pane not visible" error immediately would save a lot of misdirected debugging.The root cause of this is that claude desktop can't open the preview tab on it's own, in my environment, and it needs to be open for the screenshot to work. If I've manually opened the preview, screenshots work. When I first installed it, the agent was able to open the preview panel.
This is different from:
https://github.com/anthropics/claude-code/issues/77670
Where the user is describing the preview panel as being open, but the screenshot is failing regardless of what site is loaded in the preview.
Please reopen this issue @codebytere-ant