Environment: T3 Code (Alpha) 0.0.42, macOS 26.5.1, Apple M5 Max. Local environment 3e58c8ff-0558-4f50-8b5d-7d436d0906fd.
Summary
One preview_evaluate call that hits the server's 15-second timeout also kills the long-lived previewAutomation.connect stream between the desktop app and the server. The stream never comes back. From then on, every agent preview tool fails with "No preview automation host is available", including preview_status and preview_open, and including new tabs. The visible preview panel keeps working for the user, so the agent's tools are broken while everything looks normal.
Steps to reproduce
- Have an agent open a page in the preview that keeps the renderer busy. Ours was a WebGL scene running at about 1.3 fps.
- Have the agent call
preview_evaluate with a script that runs longer than 15 seconds. Ours measured the frame rate repeatedly with requestAnimationFrame over about 1.5 s each, and several runs added up to more than 15 s.
- The call fails with
Preview automation evaluate timed out after 15000ms.
- Call any preview tool afterwards.
Expected: The one evaluate fails and later calls work. At worst the automation connection re-establishes itself.
Actual: Every later call fails with No preview automation host is available for <op> in environment 3e58c8ff-…. Closing all tabs doesn't fix it, and neither does letting the agent open a new one. The user sees a working preview panel the whole time.
Evidence
From ~/.t3/userdata/logs, 2026-09-24, times in PDT:
- 15:30:28.56:
PreviewAutomationBroker.awaitResponse starts (span 9dc02ace45fbc741, trace d6e0d0596242af8e21a804c877bc5131).
- 15:30:43.56: that span fails after 15001 ms with
PreviewAutomationTimeoutError: Preview automation evaluate timed out after 15000ms (server bin.mjs:164689).
- Same millisecond:
ws.rpc.previewAutomation.connect (span c8709b146316e7c2) exits Interrupted ("All fibers interrupted without error"). That stream had been open for about 19.3 hours.
- Same millisecond:
PreviewAutomationBroker.disconnect and closeConnection run twice (traces a1600ede9acd6b06e8d6d323c979e76b and d6e0d0596242af8e21a804c877bc5131).
- 15:30:45.08 (desktop): the underlying
evaluate.Runtime.evaluate on WebContents 2 fails (main.cjs:79854). About 0.1 s later the desktop re-registers the webview and creates a new control session. So the desktop side recovers, but it never re-opens previewAutomation.connect to the server.
- After 15:30:43: there is no
previewAutomation.connect span in any server trace. previewAutomation.focusHost RPCs keep succeeding, so the panel's UI channel is still alive.
- Since then: 27+ more timeout or "no host" failures, each one a retry by the agent.
Suggested fixes
- Fail only the command that timed out. Don't interrupt the host connection because one evaluate timed out.
- If the host connection does drop, have the desktop reconnect automatically, for example when a webview re-registers.
- When there's no automation host, show it in the preview panel so the user knows the agent has lost access.
- Consider letting callers set their own evaluate timeout, or cancelling the page-side script when the timeout fires.
Workaround: reload or restart the T3 Code window (not yet confirmed).
Environment: T3 Code (Alpha) 0.0.42, macOS 26.5.1, Apple M5 Max. Local environment
3e58c8ff-0558-4f50-8b5d-7d436d0906fd.Summary
One
preview_evaluatecall that hits the server's 15-second timeout also kills the long-livedpreviewAutomation.connectstream between the desktop app and the server. The stream never comes back. From then on, every agent preview tool fails with "No preview automation host is available", includingpreview_statusandpreview_open, and including new tabs. The visible preview panel keeps working for the user, so the agent's tools are broken while everything looks normal.Steps to reproduce
preview_evaluatewith a script that runs longer than 15 seconds. Ours measured the frame rate repeatedly withrequestAnimationFrameover about 1.5 s each, and several runs added up to more than 15 s.Preview automation evaluate timed out after 15000ms.Expected: The one evaluate fails and later calls work. At worst the automation connection re-establishes itself.
Actual: Every later call fails with
No preview automation host is available for <op> in environment 3e58c8ff-…. Closing all tabs doesn't fix it, and neither does letting the agent open a new one. The user sees a working preview panel the whole time.Evidence
From
~/.t3/userdata/logs, 2026-09-24, times in PDT:PreviewAutomationBroker.awaitResponsestarts (span9dc02ace45fbc741, traced6e0d0596242af8e21a804c877bc5131).PreviewAutomationTimeoutError: Preview automation evaluate timed out after 15000ms(serverbin.mjs:164689).ws.rpc.previewAutomation.connect(spanc8709b146316e7c2) exitsInterrupted("All fibers interrupted without error"). That stream had been open for about 19.3 hours.PreviewAutomationBroker.disconnectandcloseConnectionrun twice (tracesa1600ede9acd6b06e8d6d323c979e76bandd6e0d0596242af8e21a804c877bc5131).evaluate.Runtime.evaluateon WebContents 2 fails (main.cjs:79854). About 0.1 s later the desktop re-registers the webview and creates a new control session. So the desktop side recovers, but it never re-openspreviewAutomation.connectto the server.previewAutomation.connectspan in any server trace.previewAutomation.focusHostRPCs keep succeeding, so the panel's UI channel is still alive.Suggested fixes
Workaround: reload or restart the T3 Code window (not yet confirmed).