Repository navigation
Wait for page discovery after sharing an existing browser tab - #346638
Merged
Kyle Cutler (kycutler) merged 1 commit intoNov 6, 2026
Merged
Kyle Cutler (kycutler) merged 1 commit into
Kyle Cutler (kycutler) merged 1 commit into
Conversation
openBrowserPage called getSummary right after sharing an existing tab, which scans once and failed with 'Page not found' before Playwright had registered the page. Use waitForPageAndGetSummary like new pages do. Also surface a client tool's error message to Claude when the result has no content, instead of the SDK's generic 'Unknown error'. Ref: #341248 Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require resolution.
No open issues 🎉
What changed in this PR
Addresses #341248 by waiting for Playwright to discover an existing browser tab after sharing it and preserving error details in Claude client-tool results.
Changes:
- Uses the existing page-readiness wait and timeout before returning a newly shared tab’s summary.
- Adds error-message text when a tool result has no content.
- Adds regression tests for both behaviors.
| File | Description |
|---|---|
src/vs/workbench/contrib/browserView/test/electron-browser/tools/openBrowserTool.test.ts |
Tests the readiness wait after sharing an existing tab. |
src/vs/workbench/contrib/browserView/electron-browser/tools/openBrowserTool.ts |
Waits for page discovery before retrieving the shared tab’s summary. |
src/vs/platform/agentHost/test/node/clientTools/claudeClientToolResult.test.ts |
Tests error-message fallback for empty tool results. |
src/vs/platform/agentHost/node/claude/clientTools/claudeClientToolResult.ts |
Preserves error messages as text when result content is empty. |
Review effort: Balanced
Kyle Cutler (kycutler)
marked this pull request as ready for review
November 6, 2026 23:09
Kyle Cutler (kycutler)
enabled auto-merge
November 6, 2026 23:09
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
Joaquín Ruales (@jruales)Matched files:
|
Ross Wollman (rwoll)
approved these changes
Nov 6, 2026
Kyle Cutler (kycutler)
deleted the
kycutler/341248-browser-openbrowserpage-fails-with-page
branch
November 6, 2026 23:48
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.
openBrowserPage→ "Yes, share" calledgetSummary, which scans once and threwPage "…" not foundbefore Playwright registered the newly shared page. It now useswaitForPageAndGetSummary(..., OPEN_PAGE_READY_TIMEOUT_MS), like new pages.Also,
convertToolCallResultnow adds the error message as a text block when a failed result has no content, so Claude no longer sees only "Unknown error".Tests:
./scripts/test.sh --run openBrowserTool.test.ts --run claudeClientToolResult.test.tspass; eslint clean.Fixes #341248