Skip to content

[Bug]: preview_snapshot always times out for tabs in delegated child threads and for open:false tabs (macOS 0.1.1) #23936

Open

Description

@GeorgieSmile

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

This is the remaining part of #16567, which was closed with the note that background-tab snapshots can still time out because the underlying screenshot capture remains unbounded. The Windows reports (#23139, #17483) describe the same mechanism; this is the macOS / delegated-child case.

Area

apps/desktop

Steps to reproduce

Same tiny static page, all within ~3 minutes:

Caller How the tab was opened preview_snapshot
Parent thread (on screen) open:false timed out, 3 of 3
Parent, same tab then preview_open({tabId, open:true}) OK
Parent, new tab open:true OK
Child thread (delegate_task, Claude Sonnet 5.5) default (no open) timed out
Child, same tab then open:true timed out
Child, new tab open:false timed out
  1. preview_open({url:"http://127.0.0.1:8765/tiny.html", reuseExistingTab:false, open:false})
  2. preview_snapshot({tabId}) fails after about 10 s.
  3. preview_open({tabId, open:true}), then preview_snapshot({tabId}) succeeds.
  4. Have a delegate_task child run steps 1–3. Step 3 still fails, because the child thread is never on screen.

Second repro on a public site: I gave one Claude child (Sonnet 5.5) and one Codex child (GPT-6.1 Sol) the same QA task on https://todomvc.com/examples/react/dist/ without naming any tool. Both chose T3's preview tools first; preview_open and preview_evaluate worked, but preview_snapshot timed out every time (Claude 3 of 3, Codex 2 of 2), and both had to fall back to an external headless browser to finish.

Expected behavior

Snapshots work for background tabs and for tabs opened by delegated child threads. The preview_open description says open=false is for "background-only automation". If that can't be supported, fail immediately with a clear error (like the existing capture-unavailable "present the target tab" message) and document the limitation.

Actual behavior

preview_snapshot succeeds only when the tab is shown in the inline preview of the thread on screen. Otherwise it waits ~10 s and fails with Preview snapshot failed: Preview automation snapshot timed out after 15000ms.

In those same tabs, preview_open, preview_navigate, preview_evaluate, preview_click and t3_preview_close all work, and requestAnimationFrame still fires. Only the snapshot (screenshot capture) hangs.

This breaks the coordinator pattern: a parent agent delegates browser checks to children, and none of them can take a snapshot.

Secondary: the error message is misleading. The server trace shows each failure at ~10,000 ms. The host throws tooBusy() ("The page was too busy to capture a snapshot in time…") from SNAPSHOT_TIMEOUT_MS = 1e4, then classifyResponseError rebuilds it from the broker context, which uses timeoutMs: 15e3. Agents see the wrong duration and lose the real reason.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Beta) 0.1.1 (also checked: 0.1.2-nightly.20261022.3526 does not include PR #22743)

Environment

macOS 27.0.1, Apple Silicon. Agents: Claude (Opus 5.5 parent, Sonnet 5.5 child via delegate_task), Codex (GPT-6.1 Sol child).

Logs or stack traces

PreviewAutomationBroker.awaitResponse 10003ms Failure PreviewAutomationTimeoutError: Preview automation snapshot timed out after 15000ms.
    at classifyResponseError (.../binCli-DF59J6P3.mjs:310107:48)
PreviewAutomationBroker.respond   # late response arrives ~10 s after the failure

Workaround

The on-screen thread can snapshot with open:true. Child threads can use preview_evaluate for DOM checks, and an external headless browser (e.g. Playwright CLI) for screenshots.

Related

Activity

  1. DrBushyTop commented on Oct 23, 2026

    @DrBushyTop

    Note

    Claude Opus 5.5 posting on behalf of @DrBushyTop

    Repro on macOS while the session is locked and the user is on another machine. Desktop 0.1.3-nightly.20261023.3566 on an Apple Silicon Mac used as a server. The user follows the thread from a second Mac, so the thread is never on this machine's screen. preview_open (with open:true or open:false), preview_navigate and preview_evaluate work, and requestAnimationFrame fires. Every preview_snapshot times out, even on example.com.

    The lock is not the cause. On the same locked session, a standalone Electron 44.9.3 script capturing an animated page with webContents.capturePage() got 3 of 3 distinct fresh frames for each of: a never-shown BrowserWindow, a never-shown one with backgroundThrottling:false, a shown window, and a shown-then-hidden window. So #22743's never-shown BrowserWindow approach should also cover locked or unattended Macs. That case isn't in its test table yet.

    Regression context. Before roughly Oct 21, this setup used the server's headless browser, which works while locked. Now the server always gets desktop browser file descriptors when the desktop app launches it, so agent tabs land in parked webviews. No setting turns this off.

  2. Prosta4okua commented on Oct 23, 2026

    @Prosta4okua

    Also reproduces on Linux, nightly build, panel open, not a delegated child thread

    • Version: 0.1.3-nightly.20261023.3579 (desktop AppImage), Linux x64 (Fedora, kernel 7.2.9). This build includes fix(desktop): reduce app crashes when a preview tab's renderer dies during agent screenshots #24056.
    • The thread is a regular one created from the UI (not delegate_task). The user confirmed the browser panel was open in the thread during the attempt. The agent still saw all of its tabs with visible: false.
    • preview_snapshot fails every time in this session: Preview snapshot failed: Preview automation snapshot timed out after 15000ms.
    • Reading page data works. Broker calls made about 5 s before the failure succeeded (450 ms, 4 ms, 2 ms).
    • Server trace (paths removed):
      • PreviewAutomationBroker.awaitResponse: 10009 ms, Failure.
      • PreviewAutomationTimeoutError: Preview automation snapshot timed out after 15000ms with [cause]: Error: The page was too busy to capture a snapshot in time. Wait for it to settle and take another snapshot.
      • This is the same 10 s vs 15 s mismatch described under "Secondary" in the issue body.
    • Server startup in the same trace logs PreviewBrowserHost.sandboxBlocked. I don't know whether it is related.

    The page the user had open is not disclosed.

    Prepared via t3 triage (Claude Sonnet 5.5, Claude Code).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions