Problem
The built-in Browser panel initially opens and supports successful automation. Later attempts to reuse it fail because the preview automation host is no longer available. The agent then cannot inspect or control the browser, including closing it, even though it was previously usable.
This interrupted UI verification and before/after screenshot capture during project-agent work. The user had to close and reopen the app/browser manually to try to restore access.
Observed behavior
- Opening the internal browser and using it initially succeeds.
- Later calls to preview tools fail with an error such as
No preview automation host is available for status in environment <environment-id>.
- The same failure has affected waiting for page content and taking subsequent snapshots.
- The user reports that the agent cannot close the browser after access is lost.
- The exact trigger is not established. Server restarts and later reuse occurred during the session, but neither has been confirmed as the cause.
Expected behavior
The agent should retain access to its existing browser across subsequent tool calls, or recover the connection automatically when the host reconnects. A disconnected state should explain what happened and offer a reliable recovery path. Closing the browser should remain possible or recoverable without requiring the user to restart T3 Code.
Investigation and acceptance criteria
- Reproduce successful open/use followed by later reuse and determine why the automation host registration becomes unavailable.
- Check browser-host lifecycle and reconnection across panel close/reopen, application reconnect, and development-server restarts without assuming any one is the cause.
- Reuse the existing tab after recovery without leaving orphaned panels or stale tab references.
- Verify navigation, snapshot, interaction, and close after recovery.
- Add focused regression coverage for the confirmed lifecycle failure.
- Capture evidence of the failure and recovery in the real built-in Browser panel.
Separate from #3, whose implementation is paused pending browser recovery and a before screenshot.
Problem
The built-in Browser panel initially opens and supports successful automation. Later attempts to reuse it fail because the preview automation host is no longer available. The agent then cannot inspect or control the browser, including closing it, even though it was previously usable.
This interrupted UI verification and before/after screenshot capture during project-agent work. The user had to close and reopen the app/browser manually to try to restore access.
Observed behavior
No preview automation host is available for status in environment <environment-id>.Expected behavior
The agent should retain access to its existing browser across subsequent tool calls, or recover the connection automatically when the host reconnects. A disconnected state should explain what happened and offer a reliable recovery path. Closing the browser should remain possible or recoverable without requiring the user to restart T3 Code.
Investigation and acceptance criteria
Separate from #3, whose implementation is paused pending browser recovery and a before screenshot.