Page.captureScreenshot hangs for minutes while other browser tools still work

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

On a locked built-in browser tab (cursor-ide-browser), Runtime.evaluate, browser_snapshot, and browser_scroll return within a few seconds. Screenshot capture does not.

browser_take_screenshot failed three times in a row with “Screenshot failed: screen shot timed out, please try again”. Each call came back in about 10 seconds.

browser_cdp method Page.captureScreenshot (a small JPEG clip of the same tab) does not return. The Browser Automation log records the start of the call and then nothing until a later tool runs many minutes later. The tab stays usable: Runtime.evaluate on that same tab still succeeds.

Steps to Reproduce

  1. Open the built-in browser on a normal page and lock the tab.
  2. Call browser_cdp Runtime.evaluate. It returns immediately.
  3. Call browser_take_screenshot on that tab. It times out after about 10 seconds.
  4. Call browser_cdp Page.captureScreenshot with a small JPEG clip. It does not return.

Expected Behavior

A screenshot returns within about a second, or fails within a few seconds with an error. A stuck Page.captureScreenshot must not block later browser tools for many minutes.

Operating System

MacOS

Version Information

IDE:
Version: 3.27.12
OS: macOS 26.6.2 (Build 25G83)

Additional Information

Browser Automation log, same tab:

  • 2026-10-23 18:08:05 UTC Page.captureScreenshot, next log entry 18:18:45 UTC (about 11 minutes)
  • 2026-10-23 18:20:24 UTC, next log entry 18:36:30 UTC (about 16 minutes)
  • 2026-10-23 18:36:51 UTC, next log entry 18:49:54 UTC (about 13 minutes)
  • 2026-10-24 05:14:59-05:15:18 UTC three browser_take_screenshot calls, each ending in the timeout error above
  • 2026-10-24 05:15:30 UTC Page.captureScreenshot (clip 720x280 JPEG). The call was aborted because it still had not returned. Runtime.evaluate, browser_snapshot, and browser_scroll on this tab had just succeeded.

This is separate from Browser tools (CDP / Browser Tab) are significantly slower than in Claude . There, other actions are slow but finish. Here, screenshot capture specifically stalls, and Page.captureScreenshot has no short timeout.

This does not stop Cursor from being used. Cursor works, but screenshot capture in the built-in browser is broken.

Hey @Orivital,

The screenshot commands wait for the page in the built-in browser to draw a new frame. When the page isn’t drawing, the capture has nothing to grab. browser_take_screenshot gives up after a few seconds, which is the “screen shot timed out” error you saw. Page.captureScreenshot sent through browser_cdp has no time limit today, so it waits until the agent turn is stopped, and that holds up every tool call after it. I’ve flagged this to the team.

The page stops drawing when it isn’t visible on screen: when the Cursor window is minimized, fully covered by another app, on another desktop, or the display is asleep, or when the browser tab isn’t the one showing in its pane. Runtime.evaluate, snapshots and scrolling don’t need a fresh frame, which is why they kept working.

In the meantime, these should get you unstuck:

  1. Keep the Cursor window and the browser tab visible while the agent takes screenshots.
  2. Ask the agent (or add a rule) to use browser_take_screenshot instead of browser_cdp with Page.captureScreenshot, so a failed capture returns an error within seconds instead of hanging.
  3. If a capture is already stuck, stop the agent and send your message again.

To help confirm this, could you try:

  1. Open the built-in browser on any page and make sure the tab is visible.
  2. Ask the agent to call browser_take_screenshot.
  3. Minimize the Cursor window or cover it fully with another app, then ask for another screenshot.

Does the first screenshot work and the second one time out? Also, when it failed for you, was the Cursor window in the background or covered?

Hi @Colin

Thank you for your reply.

Retested on Cursor 3.27.14 (the report was on 3.27.12).

Using `browser_take_screenshot` on `https://example.com` (I did not call `Page.captureScreenshot`):

1. Cursor frontmost, browser tab visible: returned in under a second.

2. Cursor minimized (no on-screen Cursor windows): also returned in under a second. No `screen shot timed out`.

3. App hidden, and browser tab behind another editor tab while the Cursor window stayed visible: both returned in under a second as well.

So on 3.27.14 I cannot reproduce the timeout by minimizing or hiding the window.

On your second question: I’m not sure whether the window or tab was covered during the original failures on Oct 23–24, since I wasn’t watching the window the whole time.

One more detail from the logs on that run: the `Page.captureScreenshot` started at `2026-10-24 05:15:30 UTC` stayed pending in `vscode:webviewSendCDPCommand` until `06:19:46 UTC`, when it finally failed with `Error: target closed while handling command`. After I aborted the agent turn, `Runtime.evaluate` on that same tab still worked while that capture was still pending.

Hi @Orivital,

Your retest helps narrow this down. A minimized or hidden window doesn’t seem to be the trigger, and nothing between 3.27.12 and 3.27.14 changed how screenshots are captured. So something else stopped the page from drawing during those runs. One thing that might do it is the Mac’s display going to sleep or the screen locking while the agent works unattended, though that’s a guess for now.

You’re also right about the abort. Stopping the agent ends the tool call on the agent’s side, but the Page.captureScreenshot request inside Cursor stays open until the browser tab itself goes away. The team is tracking this with your report attached, and I’ve passed your retest results along.

For now, browser_take_screenshot is the safer choice, because it gives up after a few seconds instead of waiting. If a raw CDP capture does get stuck, closing that browser tab should end it.

If it happens again, could you note whether the display had gone to sleep or the screen was locked at the time?

Hi @Colin

Got it. I’ll get by with browser_take_screenshot for now. Thanks for looking into this. I’ll let you know if it happens again.