-
feat(adopt): read a pre-existing tab without opening a new one
released this
2026-06-17 12:18:01 +00:00 | 8 commits to main since this releaseNew
chrome-use adopt <url-substring|targetId>: drive a tab the user (or
another session) already has open, with ZERO new tabs. After group-scoped
isolation (#40) a session can't see foreign tabs, so adopt adds an explicit,
opt-in path:- Relay (relay.rs):
ABRelay.getAllTargetsreturns every attached target
UNSCOPED (ignores group scoping), so the agent can find a specific tab by URL
or targetId. +1 unit test. - Daemon (browser.rs):
collect_all_targets(unscoped, falls back to scoped on
older relays) +adopt_existing_target— matches by exact targetId or
case-insensitive URL substring, attaches it (the relay re-tags it into the
adopter's group, so isolation holds), pins it; never creates a tab. On no
match it errors AND lists the open tabs it can see, rather than launching.
discover_and_attach_targets honors AGENT_BROWSER_ADOPT at first connect, so no
about:blank is ever created. - CLI (main.rs):
adoptsets the env, forces a fresh daemon, and rewrites into
connect <relay-url>(likeextension connect) so the daemon attaches to the
user's real Chrome before parse_command.
Extension (ab-connect 0.4.11):
reannounceAttachedTabsnow re-sends each tab's
url/title (it previously sent neither) so the relay's target list stays matchable
by URL after the MV3 service worker reconnects — otherwise reannounced tabs show
a blank url andadopt <url>can't find them. Repacked upload zip + crx.Mechanism verified live (enumerated all 11 of the user's open tabs incl. the
target). 862 tests pass.Downloads
- Relay (relay.rs):