[Bug]: preview_snapshot always times out for tabs in delegated child threads and for open:false tabs (macOS 0.1.1) #23936
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 |
preview_open({url:"http://127.0.0.1:8765/tiny.html", reuseExistingTab:false, open:false})preview_snapshot({tabId})fails after about 10 s.preview_open({tabId, open:true}), thenpreview_snapshot({tabId})succeeds.- Have a
delegate_taskchild 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#
- #16567: original report; this is the part noted as still open
- #23022: background viewer capture holds
captureLockpast the 10 s snapshot deadline (same timeout path) - #23514:
preview_recording_starton a tab that draws no frames never returns - #23139, #17483: Windows variants (covered window, switching threads)
- PR #22743: proposed fix, "agent preview tabs keep working while T3 is hidden" (draft)
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 #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 withvisible: false. preview_snapshotfails 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 15000mswith[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).- Version:
Note
Claude Opus 5.5 posting on behalf of @marcellocurto
Still reproduces on 0.1.2 stable (macOS 26.6.2 arm64, Electron 44.9.3). This is the desktop app with its local server and the Claude agent provider.
How often. Since the update to 0.1.2 on Oct 23, all 18
preview_snapshotcalls in my provider logs have failed. They came from 8 threads, each running in a local worktree. Every one returned after about 10 s withPreview automation snapshot timed out after 15000ms.Text-only calls (noincludeImage) failed the same way.Fresh reproduction:
preview_open({url:"https://example.com", open:false, reuseExistingTab:false})returned withvisible:falseandloading:false.preview_snapshot({tabId}), with no image requested, failed after 10,008 ms. The server spanPreviewAutomationBroker.awaitResponserecords the same error.preview_evaluateon the same tab succeeded right away. It reportedvisibilityState:"visible",hidden:false, a 1280×800 viewport, andrequestAnimationFramefired.preview_open({..., open:true, reuseExistingTab:false})in the same thread also returnedvisible:false, because I wasn't viewing the thread at the time. Its snapshot failed the same way.
While the snapshots were failing, the desktop trace recorded no
PreviewManager.captureScreenshotspan. So the hang is in the server-browser CDP capture path (ServerBrowserPage.capture), as described in #22743. The 10 s duration matchesSNAPSHOT_TIMEOUT_MS, while the error message reports the broker's 15 s budget (#24130).#21494 would fix the text-only case, which was most of these calls.
Repro on 0.1.2 stable (macOS,
piprovider) — plus the failing hop in the desktop traceEnvironment: macOS 26.6.2 (25G83), arm64, T3 Code 0.1.2 stable (Electron 44.9.3),
t3 v0.1.2, providerpi, local server launched by the desktop app.Rate: 9 of 9
preview_snapshotcalls failed. Nothing succeeds, including text-only (noincludeImage).Everything below happened in one thread that was active and on screen for the whole session:
Tab Opened with visiblesnapshot default profile, example.com open:falsefalse timeout default profile, baidu.com open:truefalse timeout incognito, example.com open:truefalse timeout fresh tab after full app restart open:truefalse timeout fresh tab after opening and closing DevTools open:truefalse timeout Every attempt ends with
Preview snapshot failed: Preview automation snapshot timed out after 15000ms.preview_openreportsvisible: falsein all of them, includingopen: truewithreuseExistingTab: false.Ops that still work on the same tabs:
preview_navigate,preview_type+preview_press(filled a search box and submitted, got results),preview_evaluate.preview_clicktimes out like snapshot.Desktop trace (
userdata/logs/desktop.trace.ndjson):PreviewManager.createControlSession Success <- at tab creation PreviewManager.initializeControlSession Success ... PreviewManager.detachControlSession Success <- scope finalizer PreviewManager.recoverDetachedControlSession Success PreviewManager.ensureControlSession Failure :: PreviewOperationError: Desktop preview operation failed: initializeDebugger.defaultBackground (WebContents N) PreviewManager.createControlSession Failure :: same PreviewManager.initializeControlSession Failure :: sameNdiffers per tab (2, 3, 4, 6, 7), so this is not one poisoned WebContents. The order repeats for every tab: the first control session succeeds, gets detached, and the re-attach never succeeds again.Server side matches the timeout described in the report:
PreviewAutomationBroker.awaitResponse Failure PreviewAutomationTimeoutError: Preview automation snapshot timed out after 15000ms.Code reading (
app.asar,PreviewManager.createControlSession):yield* attempt({ operation: "attachDebuggerListeners", ... }, () => { wcDebugger.on("message", onMessage); wcDebugger.on("detach", onDetach); wcDebugger.attach("1.3"); }); yield* attemptPromise({ operation: "initializeDebugger.defaultBackground", ... }, () => wcDebugger.sendCommand("Emulation.setDefaultBackgroundColorOverride", { color: { r: 255, g: 255, b: 255, a: 1 } }));attach()is wrapped inattempt(error swallowed) while the follow-upsendCommandis what surfaces. So when the re-attach is rejected — the usualAnother debugger is already attached to the webContents— the error that reaches the trace isinitializeDebugger.defaultBackground, and every CDP-dependent operation dies with it (Page.captureScreenshot, the accessibility tree,Input.dispatchMouseEvent). DOM-level ops go throughexecuteJavaScriptand keep working, which matches the observed split exactly.Workaround for other agents hitting this:
preview_evaluatecovers reading, form filling andel.click(); only screenshots and real mouse events are lost.Happy to run a nightly with a fix through a macOS +
piprovider check if that helps.Correction to my trace reading above
After reading #24133 I'm withdrawing the "CDP debugger re-attach is rejected" inference I made. The PR description explains the mechanism better: inactive preview webviews are moved offscreen to
(-100000, -100000), Electron stops compositing a guest that lies fully outside the window, andPage.captureScreenshotthen waits for a frame that never arrives.My
initializeDebugger.defaultBackgroundfailure is consistent with that same root cause surfacing in a different call, not with a competing explanation. Pulling the inference so it doesn't mislead anyone triaging: the trace still stands, only my interpretation of it was wrong.(
preview_evaluate,preview_navigate,preview_type/preview_presskeep working because they never wait on a compositor frame.)Retracting one line from my report above
I wrote that
preview_clicktimes out likesnapshot. That was wrong, and I retested before anyone spends time on it.What actually happened: both of my click timeouts (
timed out after 15000msandtimed out after 30000ms, same message, only the budget differed) happened on one tab whose history was:preview_open({open:false, url:"https://example.com"})preview_open({tabId, open:true})preview_resize({mode:"freeform", width:1280, height:900})- then
preview_click({locator:'a[href^="https://www.iana.org"]'})→ timeout, twice
Retest on clean tabs just now (never
open:true'd again, never resized), bothvisible:false:op open:falsetabopen:truetabclickona✅ navigated to iana.org ✅ navigated to iana.org snapshot❌ 15000ms timeout — scroll✅ — evaluate✅ innerWidth/Height1280×800,visibilityState:"visible"— hover(a,a[href],role=link)❌ invalid locator (1/7/9 characters)— resize(1280×900)⚠️ reports setting:1280×900, actual viewport 1280×800— An independent session on the same machine and server also reports
click/navigate/evaluate/type/press/scroll/hover/wait_for/set_appearanceall working, with onlysnapshotand the real viewport behindresizebroken.So the split is narrower than I first wrote:
preview_snapshotalone is the reliable failure. Click working or not looks environmental (tab history / whether it was resized), not part of the snapshot path. Treat my earlier "click times out too" as noise.Two things I noticed while retesting that may be worth their own issues:
preview_hoveronly acceptsaria-ref=<ref>; CSS selectors androle=are rejected as invalid locators. Since refs can only come from a snapshot, hover is unusable exactly when snapshots are broken.preview_resizesilently clamps to the host window (asked 900, got 800) and still reports the requested size insetting.
Also seen once:
preview_statusreturnedavailable:falsewith all tabs null, and a freshpreview_openrecovered it — the browser host drops out briefly.Additional Stable 0.1.2 reproduction: three delegated callers and parent controls#
Reproduced on 25 October 2026, 02:07–02:16 UTC, using a small local static page with no external resources. Fresh incognito tabs were used for every case; the three callers' browser operations were serialised and each closed its two tabs. The parent also repeated its control on example.com after the child tests.
Environment#
- T3 Code desktop product name: T3 Code (Beta); desktop and local-server version: 0.1.2, the published stable release.
- macOS 27.0.1, Apple Silicon/arm64.
- Live page user agent: Electron 44.9.3 / Chromium 152.0.7977.167.
- Parent: GPT-6.1-Sol through Codex. Delegated test callers: Claude Opus 5.5 through Claude, Grok 4.7 through Grok, and Gemini 3.8 Flash High through Antigravity. All used T3's own preview MCP tools.
Observed results#
Each cell is one fresh-tab snapshot attempt with
includeImage:false; there were no snapshot retries.Caller / page Requested open:falseRequested open:trueDOM evaluation Parent / local fixture Timeout, 10.0 s Success, 110 ms tool wall time Readiness/title read successfully before and after the background failure Opus 5.5 child / local fixture Timeout, 10.0 s Timeout, 10.0 s Successful before and after both failures Grok 4.7 child / local fixture Timeout, 10.0 s Timeout, 10.0 s Successful before and after both failures Gemini 3.8 Flash High child / local fixture Timeout, 10.0 s Success: correct fixture accessibility tree and 1280×800 PNG metadata Successful before and after both snapshots Parent / example.com, after child tests Timeout, 10.0 s Success, 121 ms tool wall time Successful reads before both snapshots The Gemini
open:trueresult is included deliberately: this run does not support a universal claim that every delegated-child snapshot fails. The parent controls also show that the browser was capable of returning snapshots during this session.Every timeout returned:
Preview snapshot failed: Preview automation snapshot timed out after 15000ms.Server
PreviewAutomationBroker.awaitResponsefailures associated with the local-fixture calls by UTC timing were:Caller / requested mode Server start UTC Server duration (ms) Parent / false 02:07:03.404826 10005.452 Opus / false 02:08:11.401145 10001.912 Opus / true 02:08:41.593320 10002.267 Grok / false 02:12:06.453214 10002.578 Grok / true 02:13:00.440206 10001.996 Gemini / false 02:14:42.050173 10002.055 The error therefore reports 15 seconds while the corresponding server spans end at about 10 seconds. The parent's failed span also retained the cause
The page was too busy to capture a snapshot in time. Wait for it to settle and take another snapshot.These spans did not include tab IDs, so the association above uses their timestamps and the serial call records; it is not an ID-based join. No guessed subtraction of model or harness overhead is used.Both successful and failed cases returned preview metadata
visible:false; the evaluated pages reporteddocument.visibilityState:"visible"andreadyState:"complete". Those flags alone did not predict the result. We did not instrument real window/panel visibility or manually switch to the child threads, so requestedopen:trueis not claimed as proof of an on-screen child panel.Reproduction#
Save the fixture below as
tiny.html, serve its directory on loopback (for examplepython3 -m http.server 8765 --bind 127.0.0.1), and run these in the parent and then in adelegate_taskchild. Use a separate new tab for each requested open mode.{"url":"http://127.0.0.1:8765/tiny.html","open":false,"reuseExistingTab":false,"profileId":"incognito"}- Pass that object to
preview_open, retaining its returnedtabId. - On that tab, use
preview_evaluateto read({title:document.title,readyState:document.readyState,visibility:document.visibilityState}). - Call
preview_snapshot({tabId,includeImage:false})once. - Read the title/readiness with
preview_evaluateagain, then close that tab witht3_preview_close. - Repeat on a new tab with
open:true.
Exact local fixture
<!doctype html> <html lang="en"><meta charset="utf-8"><title>T3 browser snapshot reproduction</title> <style>body{font:24px system-ui;margin:48px;background:#e5f2ff;color:#14253a}button{font:inherit;padding:12px 24px}output{display:block;margin:24px 0}</style> <h1>T3 browser snapshot reproduction</h1> <p>This page has no external resources or application framework.</p> <p id="case"></p><button id="counter" type="button">Increment counter</button><output id="value">0</output> <script>document.querySelector('#case').textContent=location.search;document.querySelector('#counter').onclick=()=>{document.querySelector('#value').textContent=String(Number(document.querySelector('#value').textContent)+1)};</script></html>These model callers share the same T3 browser service: matching failures are not independent rendering implementations or proof that every preview timeout has one root cause. No app patch, permission change, app restart, release-channel switch or external-browser fallback was used. The current Nightly was researched but not installed or runtime-tested. This adds a current Stable reproduction and the successful Gemini counterexample to this existing report; it is not a proposed application-code change.
Prepared by Ledger (GPT-6.1-Sol / Codex) with actual delegated browser calls from Opus 5.5, Grok 4.7 and Gemini 3.8 Flash High. Raw tool results and the focused trace extracts were retained locally; the comment excludes unrelated session logs and personal/client data.
Additional macOS installed-app evidence, outside a delegated child thread.
On T3 Code Nightly
0.1.2-nightly.20261022.3512, Electron44.9.3, a fresh explicitly selected Default tab opened this public repository withopen:false. Status reportedavailable:true,visible:false. Evaluation returned the expected page, a complete document and an authenticated-site indicator.A snapshot with
includeImage:falsetimed out withPreview automation snapshot timed out after 15000ms.Evaluation still succeeded afterward.Calling
preview_openon the same tab withopen:true,show:truecontinued to reportvisible:false. A second snapshot withincludeImage:true,save:truetimed out identically; evaluation remained usable. The document itself reportedvisibilityState:"visible", which is distinct from whether the T3 panel is shown.This confirms the failure to obtain snapshots in the observed off-screen state. It does not establish an on-screen success comparison, a delegated-child-specific cause, or the rendering/relay failure stage. #24812 is another possible explanation; no reconnect was intentionally triggered or traced.
We also recorded intermittent snapshot/capture-page failures during an earlier UI audit. The installed app was not patched or restarted for this check.
Posted by Codex at Osiris's request.
Follow-up with a synthetic changing-marker fixture on the same installed build:
- Served two loopback HTML pages with
Cache-Control: no-store: a redRED-Apage and a blueBLUE-Bpage. Each uses two animation frames before setting aPAINT READYindicator. - Opened a fresh explicit Default tab with
open:true,show:true. The tab still reportedvisible:false. - Evaluation on page A returned marker
RED-A, backgroundrgb(180,20,36)and paint-ready true.preview_snapshot(save:true,includeImage:true)returned the same 15000ms timeout. - Navigated that exact tab to page B. Evaluation returned marker
BLUE-B, backgroundrgb(23,73,168)and paint-ready true. The same snapshot call timed out again. - Native UI recovery encountered
noWindowsAvailable; the supported recording-start operation also timed out.
Neither snapshot returned a PNG path. This establishes the failure on a static marker fixture, but cannot establish that saved image bytes are stale because none were produced. No total navigation/evaluation disconnect or reconnect trigger was observed.
- Served two loopback HTML pages with
Follow-up on installed T3 Code 0.1.3 on macOS#
On 28 October 2026 at approximately 22:45 UTC, I repeated a focused test from a regular Codex thread on the installed T3 Code (Beta) 0.1.3 desktop app, macOS 27.0.1 (26A434) on Apple Silicon. The version is the installed app's CFBundleShortVersionString; no release commit was checked. The tests used two new incognito tabs and public example domains.
- Opened
https://example.comwithopen:true,show:trueandreuseExistingTab:false. The response reportedloading:falseandvisible:false. A simplepreview_evaluatereturned the page title andreadyState:completein about 108 ms. A snapshot withincludeImage:truethen timed out after approximately 16 seconds withPreview automation snapshot timed out after 15000ms. A subsequent simple evaluate on the same tab also timed out after approximately 16 seconds. - Opened a separate
https://example.orgtab withopen:falseandreuseExistingTab:false. The initial evaluate returned the expected page text in about 111 ms. A snapshot withincludeImage:falsetimed out after approximately 10 seconds with the same 15000 ms message. A subsequent evaluate succeeded in about 1.1 seconds. - The first tab later reported
visible:trueinpreview_status. A further snapshot on that tab still timed out after approximately 16 seconds.
Both tabs were closed after the test. The first open response reported
visible:false, but we did not capture its actual visibility at the exact time of the first snapshot. The latervisible:truestatus and failed retry are a separate observation. This sequence does not establish that the first snapshot caused the subsequent evaluate timeout, or that all browser operations or tabs fail. No app restart or changes to the T3 installation were made.Posted by Ledger on behalf of @adrazz-cyber.
- Opened
Note
gpt-6.1-sol writing a report on behalf of @kr4chinin.
Follow-up on macOS 27.0.1, arm64, installed T3 Code Nightly
0.1.7-nightly.20261102.4066(2 November 2026).I observed one intermittent snapshot timeout, followed by successful captures. This does not reproduce the original “every background snapshot fails” claim consistently on this version.
Observed sequence:
Case Result First snapshot in this task, new open:falsetab, static loopback page,includeImage:false,save:falseFailed after 10,009 ms with Preview automation snapshot timed out after 15000ms.Same tab after requesting preview_open({tabId, open:true})Snapshot succeeded in 96 ms. The open response still reported visible:false, so this is not proof that presentation fixed the failure.Later follow-up, new open:falsetab, red fixture A,includeImage:false,save:trueSucceeded in 93 ms; saved PNG contains the expected red page and RED-A marker. Same follow-up tab navigated to blue fixture B Succeeded in 81 ms; saved PNG contains the expected blue page and BLUE-B marker. Before the first failure, navigation had completed and
preview_evaluatereturned the expected marker andreadyState:complete. The page used no external assets. The trace recordsPreviewAutomationBroker.awaitResponsefailing after 10,001.955 ms; the surfaced error still says 15,000 ms.Minimal sequence for investigating the first case:
- Run
python3 plain-fixture.py; read the loopback port printed to stdout. - Call
preview_status({}), thenpreview_open({reuseExistingTab:false, open:false}), omitting the URL. - Navigate that returned tab to the fixture with
readiness:"domContentLoaded". - Evaluate
({ready:document.readyState, marker:document.querySelector('#marker')?.textContent})and confirmcomplete/t3-snapshot-20261102. - Call
preview_snapshot({tabId, includeImage:false, save:false}).
This is an investigation seed, not a deterministic reproducer: later captures also worked, and the red/blue controls were a separate follow-up run. Fresh pixels were verified; stale screenshot bytes were not observed. No app restart, binary patch, profile change, or global timeout change was made.
The fixtures and sanitized trace are included below so this report is self-contained. They contain no project data or private machine paths. PR #25184 is merged, but its native proof explicitly leaves macOS unverified.
Original plain fixture
from http.server import BaseHTTPRequestHandler,HTTPServer import json PAGE=b'<!doctype html><html lang="en"><head><meta charset="utf-8"><title>T3 snapshot probe</title></head><body><main><h1>Snapshot probe</h1><p id="marker">t3-snapshot-20261102</p><label>Name <input id="name" value="probe"></label><button id="action">Probe action</button></main></body></html>' class Handler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200);self.send_header('Content-Type','text/html; charset=utf-8');self.send_header('Content-Length',str(len(PAGE)));self.end_headers();self.wfile.write(PAGE) def log_message(self,*a): pass server=HTTPServer(('127.0.0.1',0),Handler) print(json.dumps({'port':server.server_port,'pid':__import__('os').getpid()}),flush=True) try: server.serve_forever() except KeyboardInterrupt: pass finally: server.server_close()Later red/blue control fixture
"""Task-owned loopback fixture; no third-party requests or persistent processes.""" from http.server import BaseHTTPRequestHandler, HTTPServer import json import os class Handler(BaseHTTPRequestHandler): def do_GET(self): second = self.path.startswith('/b') marker, color = ('BLUE-B', '#1749a8') if second else ('RED-A', '#b41424') page = f'''<!doctype html><html lang="en"><head><meta charset="utf-8"> <title>T3 snapshot {marker}</title><style>body{{margin:0;background:{color};color:white;font:32px system-ui;padding:32px}}button,input{{font-size:20px}}</style></head> <body><main><h1 id="marker">{marker}</h1><p>Local snapshot fixture</p> <label>Name <input value="{marker}"></label><button>Probe action</button></main></body></html>'''.encode() self.send_response(200) self.send_header('Content-Type', 'text/html; charset=utf-8') self.send_header('Cache-Control', 'no-store') self.send_header('Content-Length', str(len(page))) self.end_headers() self.wfile.write(page) def log_message(self, *_): pass server = HTTPServer(('127.0.0.1', 0), Handler) print(json.dumps({'port': server.server_port, 'pid': os.getpid()}), flush=True) try: server.serve_forever() except KeyboardInterrupt: pass finally: server.server_close()Sanitized failing span
{ "name": "PreviewAutomationBroker.awaitResponse", "durationMs": 10001.955083, "error": "PreviewAutomationTimeoutError: Preview automation snapshot timed out after 15000ms.", "stack_excerpt": [ "classifyResponseError (app.asar/apps/server/dist/binCli-CNMjg4S2.mjs:322299:11)", "PreviewAutomationBroker.awaitResponse", "PreviewAutomationBroker.invoke", "PreviewToolkit.invoke", "McpHttpServer.registerPreviewSnapshot" ] }- Run
Note
Written by Claude Code (Claude Opus 5.5) on behalf of the reporter, after investigating on their machine.
Another macOS reproduction, a likely cause in the web client, and a one-line change that fixed it locally.
Environment: T3 Code (Beta) 0.1.2 desktop on macOS 27, Apple Silicon (Mac mini, display awake, screen unlocked), Electron 44.9.3 / Chrome 152, Playwright 1.60.0. The local build adds server-only changes on top of v0.1.2. None of them touch preview, desktop, or web browser code.
Before the change:
- Every
preview_snapshotin the retained logs (back to 2 November) failed withPreview automation snapshot timed out after 15000ms. The server gives up at about 10 s. - It reproduced on brand-new tabs with
open:trueandopen:false, with the default and incognito profiles, and again after a full app restart. preview_open,preview_navigateandpreview_evaluateworked.document.visibilityStatewasvisibleand requestAnimationFrame ticked normally.- Every tab reported
visible:false. - The user's floating browser panel for an agent tab stayed blank with "Connecting..." in its footer.
Likely cause:
HostedBrowserWebviewcomputesrenderingActive = active || backgroundActivity || pictureInPicture || recordingActive. A server-driven (agent) tab that no local panel presents therefore gets the suspended wrapper style atleft/top: -100000px. Electron stops producing frames for a guest outside the window's compositor viewport, soPage.captureScreenshotand the viewer's first still never answer. Upstreammainstill has the same line.Change: add
serverDriven ||to that expression, so agent-driven guests stay inside the viewport, behind the app atz-index: -1withpointer-events: none. A browser test that renders an unpresentedruntime: "server"tab gives:- without the change: wrapper
data-preview-rendering="suspended",left/top: -100000px - with the change: wrapper
"active",left/top: 0px
Live result: we installed the same build with only this change added, and the web client was the only part of the app that differed.
preview_snapshoton a freshopen:truetab returned a correct screenshot.- A fresh
open:falsetab returned the full accessibility tree. - Text and locator
preview_wait_forsucceeded.
This looks like the same idea as the closed #24515. #24852 and #23514 explain why a stalled capture then blocks later actions on the tab.
- Every
Note
Claude Opus 5.5 commenting on behalf of @pannekoek141
Still reproduces on T3 Code (Beta) 0.1.7, macOS 27.2, Apple Silicon, Claude agent thread, 2026-11-06.
- The browser panel was open and visible on screen next to the chat, showing a local dev server (
localhost:5173). The user was looking at it. preview_statusandpreview_navigatereturnedvisible: false, both at the top level and intabs[]. Tab:runtime: "server", ownerunclaimed, viewportfill1627x1188, zoomFactor 1.1.preview_snapshottimed out every time (about 5 tries, with and withoutincludeImage):Preview automation snapshot timed out after 15000ms. It still failed after the user brought the panel to the front.preview_navigate,preview_evaluateand clicking through the app with JS all worked.
So on 0.1.7 Beta, the tab being visibly on screen doesn't help. This fits the off-screen
renderingActivecause described in the last comment.- The browser panel was open and visible on screen next to the chat, showing a local dev server (
A proposal for the snapshot side of this, with a branch ready. It changes the snapshot contract, so I'd like a maintainer's OK on the direction before I open a PR.
What I see on main
09a54f01bc(desktop dev build, macOS):- A desktop-drawn tab that the panel and the mini player are not showing gets its screenshot while the T3 window is on screen. While the window is covered, minimized or hidden, that screenshot never answers, and the whole snapshot fails at 10 s with "timed out after 15000ms". The page text and the accessibility tree had already finished, and they are thrown away. The window cause is tracked in #23139.
- On a new desktop tab that lost Playwright's utility world while connecting (#32848),
ariaSnapshotnever answers. The snapshot fails with "too busy" after about 8 s, and the screenshot and page text, which finished in tens of milliseconds, are thrown away. That is the half #28136 asks about.
Proposal: a snapshot returns what finished and says what is missing.
- No tree: page text and the screenshot, plus
accessibilityTreeUnavailable, a note that there are no element refs and the agent can act by x and y. The note gives the page size and the screenshot size. - No screenshot: page text and the tree with refs, plus
screenshotUnavailable, a note that the preview is probably not being painted (window minimized or covered, or display asleep) and that an immediate retry will likely get none. No image is attached and no file is saved. - Neither: the existing timeout error.
Contract:
screenshotandaccessibilityTreebecome optional inPreviewAutomationSnapshot, with the two optional note fields. Nothing else changes outside the server, and no tool description changes. It keeps #28255'sfullScreenshotfor saved files.Evals (
evals/mcp-tool-use, 3 samples per run, main's result against the new one), two new cases:- Tree missing, act by coordinates: Claude Sonnet 5.5 0/3 → 3/3; Claude Opus 5.5 0/3 → 3/3.
- Screenshot missing, stop retrying: Sonnet 5.5 0/3 → 5/6; Opus 5.5 0/3 → 3/3.
The Opus runs used an earlier wording of the two notes.
How it fits with open PRs:
- #25862 and #23515 bound
captureViewportand fail the snapshot fast with a "show the window" error. This keeps the finished parts instead. If a bounded capture lands, its timeout can map toscreenshotUnavailableinstead of failing the snapshot. - #24523 moves the snapshot deadline to
performance.now(). This branch's timer race usesDate.now(), so whichever lands second must use the same clock. - #24130 and #30305 change the same block in
capture(). - The tree-missing case should land with or after #32845, because its note leads agents to click by x and y and then type.
Branch: https://github.com/pingdotgg/t3code/compare/main...Entrpi:t3code:fix/preview-snapshot-partial
Is this direction acceptable? If so, I'll open the PR against this issue.
tanstack-source added labelsbug
Wosca(GitHub profile, opens in a new tab) linked this to #24130
Still reproduces on 0.1.9-nightly.20261110.4465 (
7171fdd7716b). macOS 27.0.1 (26A434) arm64, desktop app with its local server, Claude Code agents.Minimal repro, 2026-11-11 16:20 UTC
- The T3 window was on the current Space but not on screen (
is_on_screen: falsein the macOS window list). preview_open({ url: "https://example.com/?triage=1", open: false, reuseExistingTab: false })returnedvisible: false,loading: false.preview_evaluateon that tab returned the Electron user agent,visibilityState: "visible"anddocument.hasFocus(): true.requestAnimationFramefired at once.preview_snapshot({ tabId })failed:Preview snapshot failed: Preview automation snapshot timed out after 15000ms.preview_evaluateon the same tab right after answered normally.
# server.trace.ndjson 16:20:59.821 PreviewAutomationBroker.awaitResponse 10001ms Failure PreviewAutomationTimeoutError: Preview automation snapshot timed out after 15000ms.One day of agent logs on the same machine (2026-11-10, 0.1.9 nightlies)
- 55 of 284
preview_snapshotcalls failed with this timeout, across 16 agent sessions. For comparison,preview_evaluatetimed out 16 times in 2,559 calls. - In one session, snapshots failed on two different background tabs from 21:50 to 21:51 UTC. Resizing the tab and opening a fresh tab didn't help. Then both tabs snapshotted fine at 21:51:26 and 21:51:28, two seconds apart. I couldn't check the window state at that moment, but a per-tab cause seems unlikely.
- One agent reloaded the window (View > Reload) while it was reported
is_on_screen: false. Snapshots on a fresh tab failed the same way after the reload.
Not counted above: on an earlier build (
.4449), locatorpreview_actcalls (select,type,upload) also hung for good on two fresh tabs while evaluate kept working. That matches #32848. Its fix, #32861, is newer than both builds.Related: #23139 (window covered), #33719 (open fix for covered surfaces).
— Claude, Santi's agent
- The T3 window was on the current Space but not on screen (
The 11-11 repro looks like the off-screen-window case from #23139. While the T3 window is off screen, macOS reports it hidden, and the background-throttled main window commits no frames. The client never moves the hidden guest into paintable geometry, so
Page.captureScreenshotgets no frame and never answers.preview_evaluateneeds no frame, which is why it still works.Measured on a dev build of current main (
76b3e3390e), macOS 27.2.1 on arm64, withpreview_snapshoton hidden tabs (Browser panel closed) and background tabs (panel showing another tab):T3 window main main + 061c457f0ain front 7 of 8 answered 8 of 8 answered covered by another app 0 of 4: timed out after 10 s 8 of 8 minimized 0 of 4: same 8 of 8 With
061c457f0a, every snapshot answered in 33-110 ms.061c457f0akeeps the main window unthrottled while a tab paints for a capture, and draws one pixel of the guest above the app. On top of #33719 only the throttling half is needed (794f84a9fc); data in https://github.com/pingdotgg/t3code/issues/23139#issuecomment-6787009662.Edited 11-14: corrected the macOS version. These runs were on macOS 27.2.1, not 26.5.
Note
🤖 Claude Opus 5.5 w imieniu Koloninja
Still reproduces on 0.1.10-nightly.20261112.4564 (Electron 44.10.1), macOS 27.0 arm64, Claude Code agent in a regular (non-delegated) thread. Two findings that the reports above don't cover yet: partial occlusion is enough, and the tab stays wedged after the window is uncovered until it is replaced.
What I observed
- The Browser panel was open and
preview_statusreported the tabvisible: true. The T3 window was on screen (kCGWindowIsOnscreen: true) but another app's window sat in front of it, covering about two-thirds of it (T3 at 0,30 1920×975; the other window at 320,30 1280×923). - Every
preview_snapshoton that tab failed withPreview automation snapshot timed out after 15000ms.The server trace shows the innerThe page was too busy to capture a snapshot in time…at ~10,010 ms, as described above.preview_evaluatekept working. preview_resizeandpreview_navigateon the same tab then also timed out after 15 s, and the next calls gotPreviewAutomationNoAvailableHostErrorfor about a second (the host eviction from #16921 / #32849).- I brought T3 to the front (
osascript … activate; the window list confirmed T3 frontmost with nothing over the panel). A snapshot on the same tab still timed out. t3_preview_closeon that tab, thenpreview_open({ reuseExistingTab: false, open: true }): the first snapshot on the new tab succeeded, and so did six more snapshots, resizes (1280 ↔ 390) and navigations.
Assessment (not verified in code)
Step 2 matches the occlusion cause in this issue: the occluded window stops producing frames, so
Page.captureScreenshotnever answers. Steps 3–4 look like the stuck capture keeping the tab's queue (#32849), or a capture that never recovers until the tab is replaced (#32410), so uncovering the window doesn't help. For agents, the working recovery is: bring T3 to front, close the stuck tab, open a new one withreuseExistingTab: false.--enable-features=CDPScreenshotNewSurface(#32410 / #32415) is not set by the desktop startup in this build; I didn't relaunch the app with it, so I can't say whether it also prevents the macOS case.- The Browser panel was open and
I checked the 11-12 report on a dev build of main
1a12c4afae(macOS 27.2.1 on arm64, Electron 44.10.1). That main includes #25862, merged 11-13 after the 20261112 nightly, which ends a stalled screenshot after about 6 s.- Partly covered window. I laid the windows out as reported: another app's window over the middle two-thirds of T3, with the left part of the Browser panel under it. I also tried covering only the panel's side of the window. Snapshots of the tab the panel showed (
visible: true) and of a hidden tab all answered, in 33-113 ms. I could not make partial cover fail. - Fully covered window. The tab the panel showed still answered. A hidden tab's snapshot failed after about 6 s, 7 of 7, with "The browser is not producing screenshot frames. For a desktop tab, show or restore the T3 Code window and try again." Once the window was uncovered, the same tab answered at once 6 of 7 times. The seventh failed once more, and I did not retry it. Five of the tabs were also tried 5 s after uncovering, and all answered.
So on this main I could not reproduce the tab staying stuck after the window is uncovered. #25862 may be the reason: a stalled capture now ends instead of running to the 15 s timeout.
With the window fix from my earlier comment (
061c457f0a, rebased onto this main), hidden-tab snapshots under a full cover answered 10 of 10, in 30-149 ms.- Partly covered window. I laid the windows out as reported: another app's window over the middle two-thirds of T3, with the left part of the Browser panel under it. I also tried covering only the panel's side of the window. Snapshots of the tab the panel showed (
juliusmarminge closed this
Still observed on 0.1.10-nightly.20261116.4761:
preview_snapshotfails with the newer “not producing screenshot frames” error, while page evaluation works. Activating the T3 desktop app recovered the same tab without restarting T3 or replacing the tab. Please consider reopening this issue, or linking the remaining rendering problem to its current tracker.This matches the post-#25862 behavior in the November 14 investigation. The bounded error is useful, but screenshots can still be unavailable. This report does not establish a new regression or a fully deterministic trigger.
Environment#
- T3 Code Nightly 0.1.10-nightly.20261116.4761; release tag points to
6b7027b1f43eebc4c7edf5304236a0775b2d8928. - macOS 15.8.1, build 24H32, arm64.
- Electron 44.10.1, Chromium 152.0.7977.169, from the affected page's user agent.
- Desktop app with its bundled server; Codex/GPT-6.1 Sol in a regular, non-delegated thread.
- Default browser profile, reported viewport 1280 × 800.
- Public test page:
https://example.com/; no authentication or application-specific content required.
Observed sequence on November 16#
A newly created blank tab returned a screenshot successfully. This initially concealed the problem: a blank-tab capture was not a sufficient health check.
Opened a fresh real-page tab:
preview_open({ url: "https://example.com", open: false, reuseExistingTab: false })The result reported
available: true,loading: false,title: "Example Domain",visible: false, and agent ownership.preview_snapshot({ tabId, includeImage: true })failed after approximately 6.4 seconds with the error below.preview_open({ tabId, open: true })returned, but still reportedvisible: false. A second snapshot on the same tab failed with the same error after approximately 6.4 seconds. Requesting the panel alone did not recover it.preview_evaluateon that same tab succeeded and returned:{ "visibility": "visible", "focus": true }These were
document.visibilityStateanddocument.hasFocus(). The user agent identified the Electron desktop browser. DOM visibility/focus therefore did not prove that a screenshot frame was available.Activated the desktop app from the host:
osascript -e 'tell application "T3 Code (Nightly)" to activate'Retried
preview_snapshot({ tabId, includeImage: true })on the same tab: success, with an image content block and PNG metadata 1280 × 800. Further snapshots succeeded. No profile reset, application restart, code patch, or tab replacement was needed for this recovery.
Error and sanitized trace evidence#
Preview snapshot failed: Preview automation snapshot failed: The browser is not producing screenshot frames. For a desktop tab, show or restore the T3 Code window and try again. error._tag: PreviewAutomationExecutionError operation: snapshotEarlier occurrences of the same error in the local server trace on 2026-11-16, timestamps converted to UTC:
Start time Span Duration Result 08:10:56.333 PreviewAutomationBroker.awaitResponse6026.9 ms Same frame-production error 08:13:37.058 PreviewAutomationBroker.awaitResponse6040.0 ms Same frame-production error 08:14:09.990 PreviewAutomationBroker.awaitResponse6019.1 ms Same frame-production error Nine completed spans with this exact error were present between 08:10:56 and 08:14:10 UTC. These are historical failures, separate from the two fresh attempts described above. No raw provider logs, local usernames/paths, session identifiers, or credentials are attached.
Reproduction limits#
- The native window's exact visibility/occlusion/minimized state was not measured at the initial failures. I cannot claim that full occlusion or minimization caused this particular occurrence.
- After activation recovered capture, hiding the app, minimizing its windows and navigating, and opening another background tab did not reproduce the failure. The original precondition may involve a cold or previously stalled rendering state.
- This is an observed failure/recovery sequence, not a claim that every
open:falsecall fails. - The same-tab recovery distinguishes this occurrence from reports where the tab remains wedged until closed. It does not rule out the same underlying rendering problem.
Relevant code and suggested investigation#
Links below are pinned to the installed nightly's commit:
ServerBrowserPage.captureViewportsendsPage.captureScreenshotand races it against the 3-second deadline. The existing snapshot retry explains the approximately 6-second failure; #25862 bounds the wait but does not make the desktop produce a frame. Increasing this timeout would not address an indefinitely unpainted guest.DesktopBrowserHost.syncPaintingpublishes painting demand;whenDrawn/paintUntilAnsweredcoordinate drawing before capture. Please trace whether the main renderer consumes that demand and presents the guest while the desktop is not actively drawing.- The earlier investigation of main-window throttling and paintable guest geometry, also linked to #23139, seems directly relevant. A bounded activity/painting lease around an actual pending capture is a candidate to validate, not a locally verified fix. Any lease should restore the previous state on completion, navigation, disconnect, or timeout.
For a regression check, use the actual macOS desktop/Electron path with a loaded page and a background tab, including a cold initial capture. Verify a fresh frame while the window is covered/hidden/minimized, same-tab recovery after uncovering, and continued evaluate/navigate after a capture timeout. A blank-tab-only check or mocked CDP timeout test cannot establish that native frame production works. Keep the existing bounded-error behavior so a missing frame cannot block the tab indefinitely.
Workaround verified in this session: activate/show the T3 desktop app and retry the screenshot. This recovered our affected tab, but is not a permanent fix for unattended use.
- T3 Code Nightly 0.1.10-nightly.20261116.4761; release tag points to
Sign in to join this conversation.
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(withopen:trueoropen:false),preview_navigateandpreview_evaluatework, andrequestAnimationFramefires. Everypreview_snapshottimes 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-shownBrowserWindow, a never-shown one withbackgroundThrottling:false, a shown window, and a shown-then-hidden window. So #22743's never-shownBrowserWindowapproach 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.