Repository navigation
fix(preview): preview tool errors name the step that failed - #855
Merged
Merged
Conversation
Client-side preview waits (webview registration, navigation, viewport rendering) all reached agents as "timed out after 15000ms", the request deadline rather than the wait that failed, and desktop failures such as a stalled page capture became a generic "failed on client". Agents filled the gap by blaming the Browser tab not being visible. Add an allowlisted failure stage that crosses the client boundary next to the existing failure reason. The desktop app tags capture, control session, and navigation failures in its IPC message; the web host maps its own timeouts; the server names the step in the agent's error. A broker timeout with no client answer now says the desktop app did not respond. Capture timeouts report the TimeoutError reason, and the preview_status description says tools work on tabs the user cannot see.
Upstream divergenceBoth sides are compared with upstream at the in-order tip
Upstream files that start to differ (1)
Upstream files whose difference changes (7)
|
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
incognitojam
pushed a commit
that referenced
this pull request
Nov 7, 2026
) Co-authored-by: Claude Opus 5.5 <[email protected]> Fork adaptation: Keep fork step-specific and no-response timeout messages from fork #855, and append upstream's bounded click-target reason to that summary so both diagnostics survive. (cherry picked from commit 10f3657) Upstream-PR: 23489 Fork-Feature: fork-server-error-reporting
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.
When a preview tool failed in the desktop app, the agent's error rarely said why. The desktop app's own waits (for the browser tab to start, the page to load, or the tab to render) are 5 seconds or less, but all of them reached the agent as "timed out after 15000ms", the request's overall deadline. Desktop failures such as a stalled page capture became a generic "failed on client …". With no cause to go on, agents concluded that the Browser tab failed because it was not visible, and repeated that across threads. Preview tools are designed to work on hidden tabs.
Change
TimeoutErrorreason.preview_statusdescription no longer lists "visibility" without context: it says the field reports whether the tab is shown to the user, and that preview tools work on tabs the user cannot see.fork-server-error-reportingledger entry records the stage alongside the existing reason codes.Validation
page-capturestage and theTimeoutErrorreason.viewport-renderstage, and a desktop IPC capture failure serializes withpage-captureandTimeoutError.vp test runon the four affected files (178 tests) plus the MCP toolkit, tool presentation, and MCP HTTP server tests (30 tests). Typecheck passes for contracts, shared, server, web, and desktop.Not verified: I did not cause a real capture failure in a running desktop app. A stall is hard to trigger on purpose, so the full path from desktop app to agent is covered only by these per-boundary tests.
A related upstream fix for snapshots that time out or return stale images when the desktop window is minimized or covered, pingdotgg#13600, is tracked in #854.
Written by an agent (Claude Code, claude-opus-5-5).