#12146·t3code

[Bug]: Preview automation host disappears mid-session ("No preview automation host is available for <op> in environment …") and never reconnects

Author: GoblinRulesCreated Sep 16, 2026Updated Sep 18, 2026
Labelsbugacceptedvia-triage

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: false several times)

Timeline (single session, ~12 h)

  1. Preview automation worked for hours on http://localhost:5173 (a dev server) and a Portainer instance: navigate, click, type, evaluate, snapshot.
  2. preview_snapshot started failing intermittently on tall pages with PreviewAutomationExecutionError and once PreviewAutomationTimeoutError, while preview_evaluate on the same tab kept working. Closing/reopening tabs did not change that.
  3. Some preview_evaluate calls failed with Preview automation evaluate failed on client preview-f3e97ff86f65d5f30253a4d560504301. — after that the affected tab id was dead, but a new tab (reuseExistingTab:false) worked.
  4. Later, on a new tab pointed at https://api.slack.com/apps (signed-in Slack app settings), a sequence of preview_click + preview_evaluate worked, then one preview_evaluate returned No preview automation host is available for evaluate in environment ….
  5. From that point on, every preview tool (preview_open, preview_status with and without tabId) fails with the same message. device_list reports "Agent device access is turned off for this environment" (expected, it was never enabled).
  6. 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_snapshot outputs 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).