Repository navigation
Description
After a T3 Code server restart, preview_status and preview_evaluate on an Environment browser tab opened before the restart end at the tool's 15 s limit ("Preview automation … timed out after 15000ms"). The page itself is alive and answers over DevTools at the same moment, so the hang is in T3 Code's connection to the Environment browser, not in the page.
What was observed
Seen on a hosted Personal Environment on 0.1.10-preview.20261127.1 (de55ba21), after the server restart of an update (t3 update, 2026-11-28 12:29:31Z).
t3_preview_listlists the thread's four tabs, with a newserverEpoch,revision0 andnavStatusIdle.preview_statusandpreview_evaluateon one of them, a long-lived signed-in web app tab, time out after 15000 ms. This happened on three attempts between 13:01Z and 13:03Z, and on every call since. Before the restart (12:05Z) the same reads worked.- At 13:13Z, a raw DevTools client on
127.0.0.1:9222(/json/list, thenRuntime.evaluateon the target'swebSocketDebuggerUrl) answered at once:visibility: "visible",wasDiscarded: false,readyState: "complete". The target still has the same id. The page is not frozen, not discarded and shows no dialog that blocks evaluation. - The Environment browser is a separate Chromium outside
t3code.service. On another Environment it has run in its own scope since 2026-11-21 and survived two T3 restarts on 2026-11-28. Its pages and their sign-ins outlive a T3 restart, so the only new party after the restart is T3 Code's Playwright connection.
Not new in the preview build
apps/server/src/lazurio/environmentBrowserConnection.ts, environmentBrowserPage.ts and threadTabs.ts are identical between v0.1.10-lazurio.6 (7915fe9a) and de55ba21. environmentBrowser.ts changed only in preview_open/navigate (Lazurio account refusals, #265). The same is expected after any restart on .6.
Where it can hang (from the code, de55ba21)
environmentBrowser.tskeeps one shared connection for the server's lifetime (sharedBrowser). The connection is rebuilt only when it ends (connection.closed) or fails to connect. A connection that is up but no longer drives some pages is never replaced.status→tabOf(targetId)→connection.tab(targetId)→findPage, which loops overcontext.pages()and awaitstargetIdOf(page)for each one (context.newCDPSession(page)+Target.getTargetInfo).PAGE_ATTACH_TIMEOUT_MSbounds only the loop, not the awaits inside it. One page whose CDP session never resolves blocksfindPagefor every tab.tab.state()→page.evaluate(...)has no timeout of its own. Its.catchcovers a rejection, not a promise that never settles.inTab(used byevaluate) goes through the sametabOf→findPage.
The tool then hits its 15 s limit, and the error does not say which step waited.
Proposal
- Bound each await in
findPage(targetIdOf) and intab.state(). On expiry, fail with an error that names the step, for example "the Environment browser connection did not attach page within N s". - When a bounded step expires, drop the shared connection (
browser = undefined) and disconnect it, so the next call connects again (connectOverCDPattaches to the existing pages again). Today only a new server restart does that. - A test with a fake connection whose
newCDPSessionnever resolves for one page:statuson another tab still answers, and a second call reconnects.
Open questions for whoever takes this
- Which await hangs (
targetIdOfof some page, orpage.evaluateon this one)? The server trace of the affected Environment (t3 trace, spansLazurioEnvironmentBrowser.status) can answer that. I have not read it. - Does a tab opened after the restart work in the same thread? If it hangs too, the whole shared connection is stuck. If it answers, only pages that existed before the connection was made are affected.
Workaround until then: read the page through DevTools directly (read-only Runtime.evaluate), or open a new tab. A new tab uses the same browser profile, so its site sign-ins stay.
Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:57942b76-ee73-4e62-b152-1b92ea2a0812
Activity
immakermatty commentedon Nov 28, 2026
Update after more data from the affected Environment (2026-11-28 13:15Z):
preview_statuswithouttabIdtimes out too, with the same broker message "Preview automation status timed out after 15000ms".t3_preview_listanswers at once (4 tabs). So it is not one page. Every automation request of that thread hangs.handleRequestinenvironmentBrowser.tsanswers within its own budget (answerBudgetMs, 13.5 s for a 15 s request) with "The Environment browser did not finish … in … ms". The 15000 ms message is the broker'sPreviewAutomationTimeoutError, so no host answered at all. Either the Environment browser host is not registered after the restart, or its requests never reachhandleRequest. The unboundedfindPage/page.evaluatewaits from the issue text are still real, but they would show the host's message, not this one.~/.t3/userdata/logs/boot-service.log) shows "T3's browser tools drive the Environment browser" 2–3 s after each of two restarts today (12:09:57 and 12:12:31), andlazurio browser link --jsonanswers with its link.lazurio browser link --jsonanswers. The host only registers while the Environment declares its browser (browserDeclaration, checked every 60 s, link check 10 s).Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:57942b76-ee73-4e62-b152-1b92ea2a0812
immakermatty commentedon Nov 28, 2026
Second update (2026-11-28 14:12Z), from the affected Environment:
The host did register after the restart.
boot-service.loghas "T3's browser tools drive the Environment browser" at 12:29:34.762, 3 s after the restart (12:29:31Z), and no later line. The host's stream therefore has not ended since: the loop logs that line again whenever it registers again.lazurio browser link --jsonanswers with its link (kind: browser-link). The declaration is in place.So the host is registered and its stream is up, yet every automation request of the thread ends at the broker's 15 s limit, never at the host's own answer after 14 s (
answerBudgetMs(15000)is 14000; the first update said 13.5 s, which was wrong). That leaves two places to look:preferred: trueregistration,hostConnectionId).broker.responddoes not reach the waiting request.A page that does not answer is ruled out: a raw DevTools client gets
Runtime.evaluateanswered on the same tab.The server trace will not show it. On this build
server.trace.ndjsonrecords noLazurioEnvironmentBrowser.*spans; of the browser tools onlyPreviewAgentActivity.beginappears (checked on another Environment with a workingpreview_status). Whoever takes this needs a debug log aroundhandleRequest/broker.respond, or a test that makes the broker route a request after a host re-registers under the same client id.Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread mcp:57942b76-ee73-4e62-b152-1b92ea2a0812