Before submitting#
Area#
Browser preview, agent preview_* tools
Steps to reproduce#
- In a project thread with agent browser access on, have a Claude agent call
preview_open on a local dev server (http://localhost:23251/login), then sign in, reload and resize with preview_navigate, preview_evaluate and preview_resize.
- Call
preview_snapshot, with and without includeImage and save.
- Open a fresh tab with
preview_open (reuseExistingTab: false) and call preview_snapshot on it.
- Quit and reopen T3 Code, then run the same flow in a new thread.
Expected behavior#
preview_snapshot returns the page state and a screenshot, and preview_navigate keeps working for the whole session.
Actual behavior#
Before the restart, every preview_snapshot call failed right away, in two separate runs, including on a brand-new tab:
Preview snapshot failed: Preview automation snapshot failed on client preview-00439f4f84c8de419781f74707059227.
Navigate, evaluate, resize and click kept working on the same tab.
After the restart the snapshot worked. Later in that session, preview_navigate to about:blank failed with the same client ID:
Preview automation navigate failed on client preview-00439f4f84c8de419781f74707059227.
Setting location.href through preview_evaluate still worked. The tab also flipped from visible: true to visible: false partway through, and calling preview_open again with open: true, show: true didn't bring it back.
A cross-origin fetch inside preview_evaluate failed with Preview automation evaluate failed on client … instead of returning the page's own error.
Impact#
Without preview_snapshot, agents get no screenshots, console messages or network log, so they can't verify UI changes. A restart is the only fix I found, and it didn't last the whole session.
Version or commit#
T3 Code (Alpha) 0.0.45 (Electron 44.4.2, Chrome 152.0.7977.130)
Environment#
macOS on Apple Silicon, Claude Code agents, several threads on separate worktrees running at the same time, local environment.
Related#
Possibly #16567, though that one hangs and this one errors immediately.
Agents also have no tool to close preview tabs, so tabs from earlier runs pile up. Three were left open in one thread after these tests.
Retested on a current build, in a fresh thread. The immediate
failed on clienterror no longer reproduces.preview_snapshotnow fails every time with a timeout instead, including on a plain static page.Build: T3 Code (Beta) 0.1.1 on macOS. User agent:
T3CodeBeta/0.1.1 Chrome/152.0.7977.130 Electron/44.4.5. Run window: 2026-10-22 07:49–07:54 UTC.Answers to your questions:
<!doctype html><title>static</title><h1>Static page</h1>, served bypython3 -m http.serveron127.0.0.1:8765, in a fresh thread.preview_opensucceeded and returned titlestatic.preview_snapshot {includeImage:false}and{includeImage:true, save:true}then both failed withPreview snapshot failed: Preview automation snapshot timed out after 15000ms.visiblewasfalsein everypreview_openandpreview_statusresult. That includespreview_openwithopen: true, show: true. The panel never became visible.Trace excerpt (server), the same for every snapshot failure:
Two details stand out in the trace:
visible: false) stops the page from rendering frames, so the capture never completes. I have not confirmed this.Snapshot calls that failed (all with the error above):
{includeImage:false}and{includeImage:true, save:true}/loginafter a freeform resize to 1280x800:{includeImage:false}preview_navigateand throughevaluatelocation.reload():{},{save:true},{includeImage:false, save:false}evaluatethat ranconsole.errorand fetched a 404 (evaluate returned404):{}iphone-12-propreset:{save:true}reuseExistingTab:false, called with its explicittabId:{includeImage:false}What worked on the same tabs:
preview_open,preview_navigate,preview_wait_for,preview_statusandpreview_evaluate.preview_typeandpreview_clickalso worked in the first thread. In the second thread they timed out onlocator.evaluateandlocator.scrollIntoViewIfNeeded. The profile was already signed in, so/loginredirected and the form never rendered. I don't count those two timeouts as a bug.Other findings:
preview_resize {mode:"preset", preset:"iphone-12-pro", orientation:"portrait"}stores a 390x844 setting, but the returnedviewportis{width:1280, height:800}.innerWidth/innerHeightin the page also stay 1280x800.evaluatethat setslocation.hrefand then waits returnscdpSession.send: Protocol error (Runtime.evaluate): Inspected target navigated or closed.about:blank:preview_navigate {url:"about:blank"}returnsInvalid preview URL (parse: https:; input length 11).The tool seems to parse it as a schemeless host.TypeError: Failed to fetch, not a generic client error.PreviewOperationError: Desktop preview operation failed: initializeDebugger.defaultBackground (WebContents 6)(and the same for WebContents 7). This may be cleanup noise.The full failing spans from the fresh-thread run are below. They come from
server.trace.ndjsonanddesktop.trace.ndjson, filtered to the run window, and have no tokens or page data.Server trace: 16 failing
PreviewToolkit.invokespansDesktop trace: 2 failing
PreviewManager.initializeControlSessionspans