[Bug]: preview_open(show: true) can load a tab without showing it to the user #3718
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
Start T3 Code Desktop.
Open a Codex-backed thread with the T3 preview MCP tools available.
Save this minimal page as
open-visible-repro.html:<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>T3 Preview Open Visibility Repro</title> </head> <body> <h1>T3 Preview Open Visibility Repro</h1> <p id="ready">Loaded</p> </body> </html>Serve the directory containing that file:
python -m http.server 8000Call
preview_status.Call
preview_openwithshow: true,reuseExistingTab: true, and the page URL:{ "show": true, "reuseExistingTab": true, "url": "http://localhost:8000/open-visible-repro.html" }Optionally call
preview_openagain withshow: trueand the returnedtabId:{ "show": true, "reuseExistingTab": true, "tabId": "<returned tabId>" }Verify that the loaded page is still available to automation:
({ title: document.title, ready: document.querySelector("#ready").textContent })
Expected behavior#
When preview_open(show: true) returns, the preview panel should be displayed to the user and the returned status should report visible: true.
If the browser cannot be shown, the tool should report a clear failure or return a state that explains why the tab is not visible.
Actual behavior#
preview_open(show: true) returned a usable tabId, loaded the URL, and allowed later automation, but reported visible: false:
{
"available": true,
"visible": false,
"tabId": "tab_h",
"url": "http://localhost:8000/open-visible-repro.html",
"title": "T3 Preview Open Visibility Repro",
"loading": false,
"viewportSetting": { "_tag": "fill" },
"viewport": { "width": 1280, "height": 800 }
}
Calling preview_open(show: true) again with the same tabId still returned visible: false.
The page was loaded and available to automation despite visible: false:
{
"title": "T3 Preview Open Visibility Repro",
"ready": "Loaded"
}
Later operations in the same session caused the same tab's visibility state to move between false and true, so agents cannot infer from show: true that the user can actually see the preview.
Impact#
Major degradation or frequent failure
Version or commit#
T3 Code desktop 0.0.28-1 via t3code-bin AUR package.
Environment#
Arch Linux x86_64, kernel 7.0.13-arch1-1, T3 Code desktop AppImage package via t3code-bin, Codex provider.
Logs or stack traces#
No stack trace. The relevant evidence is the returned preview_open status above.
Screenshots, recordings, or supporting files#
Minimal repro page attached above. A screenshot can show whether the human-visible preview panel opened, but the core bug is visible in the tool return state: show: true returns a loaded tab with visible: false.
Workaround#
Treat visible as user display state only, not as an agent automation capability signal. Verify whether the tab is usable with preview_evaluate, preview_wait_for, or URL/title fields from preview_status. If the user-visible browser matters, manually reopen or create a fresh tab.
Reproduced on a newer build:
- T3 Code Desktop
0.0.38-nightly.20260831.1236, x86_64 AppImage - Arch Linux, Codex provider
preview_open({ open: true, show: true, reuseExistingTab: false, url: "https://example.com" })returnsavailable: true,visible: false, with a valid fresh tab ID.- Repeating
preview_openwith that tab ID andshow: truestill returnsvisible: false. preview_evaluatesucceeds and returnsdocument.readyState === "complete", the expected title, and body text.preview_snapshoton the same minimal page immediately returnsPreview snapshot failed.. The server trace classifies it asPreviewAutomationExecutionErrorfor operationsnapshot.- Fully quitting and restarting T3 Code, then creating a fresh preview tab, does not restore visibility or snapshots.
- The Browser/right-panel menu action also fails to display the preview surface.
This matches #3713 as well, but in this run evaluation remains responsive. The current workaround is targeted
preview_evaluatecalls in a hidden tab. All thread, environment, client, and page-session identifiers have been omitted.- T3 Code Desktop
resolved by #9484, merged as 12e8997e58dbca8f1bd8c63b67d662eb69cf0e0d.
Sign in to join this conversation.
I'm experiencing this too.