Repository navigation
[Bug]: preview_open still returns visible: false after explicit open/show request #17015
Description
Activity
Note
Grok responding on behalf of Julius.
Thanks for the precise call sequence. I checked this against current
main(d720210). In short,preview_opennever waits for a client to actually show the tab, andvisibleonly counts streamed viewers. Details below.What's confirmed on main
- Since feat(preview): run the browser on the environment server #15328 (Oct 6),
preview_openis served by the environment's own browser, which registers as the preferred automation host (ServerBrowser.ts L2150-L2158). Withopen/showset, it publishes a reveal request and then returns status right away (L1536-L1551).requestRevealonly updates the session snapshot and emits an event, and nothing comes back (Manager.ts L468-L497). The app opens the panel later, when it sees that event, and only for the active thread (ChatView.tsx L5513-L5543). - In both
preview_openandpreview_status,visibleis justtab.viewers.size > 0(L1117). It means "some client has a frame stream open for this tab." The streamed surface only connects while it's shown (ServerBrowserSurface.tsx L367), so a status read immediately after the reveal request will usually sayfalse. A laterpreview_statussaystrueonce the panel has connected. That matches what you saw. - In the desktop app talking to its own local server, server tabs render natively in a
<webview>and are not streamed (previewRuntime.ts L26-L42, PreviewView.tsx L167-L170). There, no viewer is ever added, sovisiblestaysfalseeven while the tab is on screen, unless another client is also streaming it. The server's own pointer code already assumes "a desktop-rendered tab is always on screen" (L1366-L1368), but status doesn't take that into account. The desktop channel only reportsattached/detached/cdp, with no shown/hidden signal (desktopBrowser.ts L21-L28). - The docs gap is real.
preview_statuslists "visibility" without defining it (tools.ts L65-L67), and the schema field has no description (previewAutomation.ts L77). Also, theopenparameter says it "Defaults to true," but the handler deliberately leaves it unset so the user's auto-show preference decides (handlers.ts L36-L53).
Relation to #3718
#3718 was closed after #9484 merged. That fix lived in the old client-side automation host (
PreviewAutomationHosts.tsx). That host also waited up to 500 ms for the surface to report visible before returning, and returnedfalsewithout any error if it timed out. #15328 deleted that file, so neither the fix nor the settle wait applies to the server-hosted path.Which path you hit (unconfirmed)
The response you pasted has no
control,dialog,fileChooserortabsfields, which main's server status always includes (L1115-L1155). Itsfreeform 1280×800viewport also matches the old client host's default for agent tabs. So your build may predate #15328, in which case the likely cause is that 500 ms settle timing out. Could you share the T3 Code version, and say whether this was the desktop app or a browser? Either way, current main still shows the mismatch for the reasons above.Possible fixes (not yet tried)
- After a reveal request, have
preview_openwait a short, bounded time for the tab to actually be shown (as the old host did) before reporting status. - Give desktop-rendered tabs a real visibility signal, for example a shown/hidden event on the desktop browser channel, so
visibleisn't tied to streaming. - Report "reveal requested" separately from confirmed
visible, and documentvisibleas "a T3 client is currently displaying this tab."
Workaround
Don't treat
visible: falseright afterpreview_openas proof the user can't see the tab. Re-check withpreview_statusafter a moment. In the desktop app with a local environment,visibleisn't reliable at all right now. To check whether the tab is usable for automation, look atavailable,urlandtitle, notvisible.Related
- feat(preview): run the browser on the environment server #15328: introduced the server-hosted path.
- fix(web): keep agent browser preview visible #9484 / [Bug]: preview_open(show: true) can load a tab without showing it to the user #3718: the earlier fix.
- Open PR fix(server): agent browser tools stop bloating history, fall back sensibly, and respect ownership #16956 touches this same code and keeps the
viewers.size > 0meaning. Open PRs feat(server,desktop): browser tools report why a page failed to load #16835 and fix(server): environment-hosted browser tabs behave like a normal browser #16963 also modifyServerBrowser.ts. None of them changes howvisibleis computed. - [Bug]: Leaving a thread detaches its browser preview and can leave automation unusable #6355, [Bug]: Failed browser preview remains as a blank floating panel #7212 and [Bug]: Agent and browser panel show two different browser pages for the same browser tab #16901 are in the same area, with different symptoms.
- Since feat(preview): run the browser on the environment server #15328 (Oct 6),
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
on Oct 8, 2026
Related issue
Possible recurrence of #3718, which is closed. This report captures a new observation on 2026-10-08.
Area
Collaborative browser / preview MCP tools.
Steps to reproduce
In a T3 Code thread using the Codex provider, ask the agent to open T3's browser and go to Google. The following exact tool sequence was executed:
preview_status({})returnedavailable: false,visible: false, andtabId: null.preview_open({"url":"https://www.google.com"})returned the response below.preview_open({"tabId":"tab_1","open":true,"show":true})returned the same response, includingvisible: false.Actual behavior
Both open calls succeeded and returned:
{ "available": true, "visible": false, "tabId": "tab_1", "url": "https://www.google.com/", "title": "Google", "loading": false, "viewportSetting": {"_tag":"freeform","width":1280,"height":800}, "viewport": {"width":1280,"height":800} }The agent reported that the preview was not visible. The user then asked what visibility meant and to whom. The exposed tool descriptions describe visibility but do not specify its observer or whether it is an immediate/eventually updated panel state. Therefore the agent could not justify interpreting
visible: falseas proof that the user could not see the browser.This report does not establish that the user-facing panel was actually hidden; the confirmed observation is the returned status after the explicit open/show request. A later read-only
preview_status({"tabId":"tab_1"})returnedvisible: truewith a different page, so the initial false state was not permanent. No intervening user interactions were captured.Expected behavior
After an explicit
open: true/show: truerequest, return visibility matching the resulting user-facing preview state, or clearly distinguish a pending display request from confirmed visibility. Document exactly whatvisiblemeasures and whose view it describes, so agents can report it accurately.Impact
Confusing user-facing status: a successful request to open the browser leads the agent to report that it is not visible, without enough information to explain that claim.
Environment
Linux, T3 Code with Codex harness, GPT-6.1-Sol. T3 Code version/commit was not captured.