feat(connect): make auto-connect to user's Chrome the default behavior

- Auto-connect is now ON by default (was opt-in via --auto-connect)
- Added --launch/--new flags to explicitly start a fresh browser
- CI environments (CI env var) automatically use --launch mode
- Friendly error message with platform-specific Chrome relaunch guide
- Mentions Chrome 144+ runtime CDP toggle (chrome://inspect)
- --cdp and --provider flags implicitly disable auto-connect
- AGENT_BROWSER_NO_AUTO_CONNECT=1 to disable, AGENT_BROWSER_FORCE_LAUNCH=1 to force

Track 3 of native-stealth migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
leeguooooo
2026-05-08 23:48:50 +09:00
co-authored by Claude Opus 4.6
parent 77616a209c
commit 7ee3d5fb94
5 changed files with 104 additions and 45 deletions
+3 -2
View File
@@ -3076,8 +3076,9 @@ Authentication:
(or AGENT_BROWSER_SESSION_NAME env)
--state <path> Load saved auth state (cookies + storage) from JSON file
(or AGENT_BROWSER_STATE env)
--auto-connect Connect to a running Chrome to reuse its auth state
Tip: agent-browser --auto-connect state save ./auth.json
--auto-connect Connect to a running Chrome (DEFAULT - shares cookies/sessions)
Tip: enable CDP via chrome://inspect/#remote-debugging
--launch, --new Launch a fresh browser instead of connecting to existing
--headers <json> HTTP headers scoped to URL's origin (e.g., Authorization bearer token)
Options: