fix(agent): start and clean up the CDP browser host on Windows#199
Open
luminary19 wants to merge 3 commits into
Open
fix(agent): start and clean up the CDP browser host on Windows#199luminary19 wants to merge 3 commits into
luminary19 wants to merge 3 commits into
Conversation
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.
Summary
The browser host never came up on Windows: port enumeration used POSIX
tooling, the DevTools ws endpoint was read only from Chrome's stderr (empty
when Windows de-elevates the browser out of an elevated parent), and orphaned
profile browsers from crashed hosts blocked relaunch (
pkillcleanup isPOSIX-only). Adds
netstat -anoenumeration, falls back to the profile'sDevToolsActivePortfile for the endpoint, and sweeps/revalidates orphanedprofile browsers before launch. Fixes #198.
Validation
npm --prefix frontend run typecheckclean (covers the agent-runtime sources);check:qualityruns as the pre-push gate. The Windows behavior —netstat -anoport enumeration,
DevToolsActivePortendpoint fallback, orphan-profile sweep —was verified live on Windows 11 (embedded browser navigates/snapshots from
/agent; killing the host mid-session and relaunching recovers). Linux/macOS isunchanged: the stderr endpoint path runs first and short-circuits, and cleanup
keeps its existing behavior.
UI changes
None.
Risks / rollout notes
dedicated
local-studio-browser-profiledir — it cannot touch userbrowsers.