[Bug]: Preview automation host disappears mid-session ("No preview automation host is available for <op> in environment …") and never reconnects
Summary
During a long agent session the preview automation host silently disappears. Every preview tool call (preview_open, preview_status, preview_evaluate, preview_navigate) then fails with:
No preview automation host is available for <op> in environment 3327ef5d-c1f1-4d71-8797-edb75589bfe1.The T3 Code window is still open, the collaborative browser tab is still visible to the user, and the user is actively looking at it, but the agent can no longer drive it. The host never reconnects for the rest of the session. The only recovery is presumably restarting the app (not tried, session in progress).
Environment
- T3 Code (Nightly) 0.0.43-nightly.20260916.1811, Windows 10 Pro 10.0.19045
- Agent: Claude Code via the claudeAgent provider (Fable 5.1)
- Preview tabs used in the session: ~11 (tab_1 … tab_b), created with
preview_open(reuseExistingTab: falseseveral times)
Timeline (single session, ~12 h)
- Preview automation worked for hours on
http://localhost:5173(a dev server) and a Portainer instance: navigate, click, type, evaluate, snapshot. preview_snapshotstarted failing intermittently on tall pages withPreviewAutomationExecutionErrorand oncePreviewAutomationTimeoutError, whilepreview_evaluateon the same tab kept working. Closing/reopening tabs did not change that.- Some
preview_evaluatecalls failed withPreview automation evaluate failed on client preview-f3e97ff86f65d5f30253a4d560504301.— after that the affected tab id was dead, but a new tab (reuseExistingTab:false) worked. - Later, on a new tab pointed at
https://api.slack.com/apps(signed-in Slack app settings), a sequence ofpreview_click+preview_evaluateworked, then onepreview_evaluatereturnedNo preview automation host is available for evaluate in environment …. - From that point on, every preview tool (
preview_open,preview_statuswith and withouttabId) fails with the same message.device_listreports "Agent device access is turned off for this environment" (expected, it was never enabled). - The user confirms the T3 window and the Slack tab are still open and usable by hand.
Expected
Either the automation host reconnects (or a new host is attached to the environment) and tool calls resume, or the tool error tells the agent/user what to do (e.g. "reopen the preview panel", "restart the app") so the session can recover without guessing.
Actual
Permanent No preview automation host is available … for the rest of the session; no hint about recovery; the user sees a working browser tab while the agent cannot reach it.
Possibly related
- #11167 (routing to a suspended client) — similar symptom class, but here no client is selectable at all.
- #11295 — the session had many large
preview_snapshotoutputs before the failure; if the host crashes on big snapshot payloads, that could be the trigger.
Happy to run a debug build or collect logs from ~/.t3/userdata/logs if you point me at which file the preview host writes to (the provider events.*.log only contains agent events).
Source: pingdotgg/t3code