Conversation
The optional 500ms status read disconnected the only preview host, so the next Codex preview tool reported that no browser was available.
Owner
Author
|
Opened upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes pingdotgg#12778
Problem
On Windows desktop (T3 0.0.42), asking Codex to use the T3 browser fails with “no preview automation host is available in this environment.” The screenshot is that broker error after a short turn that also read page metadata. Codex then stops, because the error tells the model not to retry.
The desktop browser host was registered. The next
preview_*call had nobody to route to.Change
After most preview tools, the server does a best-effort page-icon
statuswith a 500ms deadline.PreviewAutomationBroker.awaitResponsetreated every unanswered deadline as host death and disconnected that client. Swallowing the timeout inPreviewToolkit.invokedid not undo the disconnect. A desktop session has one host, so the following preview tool returnedPreviewAutomationNoAvailableHostError.Optional reads can now set
disconnectOnTimeout: false. The metadata lookup does. An unanswered primary operation still drops the host, because the client may have applied the action before becoming unreachable.This is the same eviction as pingdotgg#12273. pingdotgg#12535 already completes the registration stream so the desktop re-registers about a second later, which is why a later turn can work. It does not help the in-flight turn: the error says not to retry, so Codex stops inside that gap.
Windows
.cmdspawn, MCP URL quoting, and the WSL bind address were traced and are not this failure. The tool reached the server and returned the broker’s no-host error, so the MCP session was up.Scope and approval
Triaged in pingdotgg#12778 (accepted, via-triage) as a real desktop preview-host failure. The change is the optional-read timeout path in the preview broker and the metadata lookup that uses it. Primary timeouts still disconnect. No contract, client, or provider-adapter change.
Verification
vp test run src/mcp/PreviewAutomationBroker.test.ts src/mcp/McpHttpServer.test.tsfromapps/server: 57 passed, includingpreview_clickstill returns success when the following metadata status times out, and a laterpreview_statusis not an errordisconnectOnTimeout: falseremoved from the metadata lookup, the MCP follow-uppreview_statusis an error (isError: true). Restoring the flag makes that assertion pass.vp fmtandvp linton the four touched files.vp check/ full typecheck. Residual risk: a primary timeout (for example a 15sevaluate, zoomedpreview_resize, orpreview_wait_fordeadline race) still evicts the only host for about a second, and a session whose host never registered is unchanged.Model and harness: Grok 4.7 in Cursor cloud agent.