How to let an AI agent use a signed-in browser without handing over your passwords
There are two safe patterns. With login you sign in yourself in a browser window on the agent’s own profile, and the agent stays signed in. With attach the agent works in tabs of its own inside the Chrome you are already signed in with. In both, passwords, 2FA and passkeys stay with you.
Pattern one: sign in yourself
browser-layer login <url> opens a normal browser window on the agent’s profile. You sign in, including passwords, 2FA and passkeys, then close it. The agent keeps the session. It never sees the secret.
Pattern two: use your own Chrome
browser-layer attach opens Chrome’s chrome://inspect/#remote-debugging page. Tick the box once, and Chrome asks you to click Allow. Then run commands with --attach auto. The agent works only in tabs of its own and never touches yours, and it keeps one connection (one Allow) until you stop it.
What to weigh
attach acts as you on every site you are signed in to, so use it only when you want that. login keeps the agent in its own profile, which limits what it can reach.
Questions
Does the agent ever see my password?
No. In both patterns you handle the sign-in yourself.
Does attach touch my other tabs?
No. The agent works only in tabs of its own and leaves Chrome running.