DEV Community

Cover image for I built a cookie bridge, then changed my entire agent setup
Apoorv Darshan
Apoorv Darshan

Posted on Originally published at x.com

I built a cookie bridge, then changed my entire agent setup

I wanted my coding agents to use the websites I was already logged into. That small problem ended up changing my whole setup.

Chrome, Brave, and a cookie bridge

I started with the Codex desktop app and its in-app browser. Importing my Chrome session was convenient: the agent could work with sites where I was already signed in.

Then I switched to Brave, and the import option I needed was missing. My accounts were signed in over there while the agent was working somewhere else.

So I built Browser Cookie Bridge, a macOS app that started by moving Brave cookies into Codex and grew to support more Chromium browsers.

When I tried Grok Bot later, I used Cookie Bridge there too, exporting a cookie bundle into its browser. I kept wanting the same thing: let the agent start from the session I already have.

The code: https://github.com/apoorvdarshan/browser-cookie-bridge

Moving into cmux

The RAM usage of the Codex desktop app eventually pushed me toward terminal interfaces. I started using cmux, which also had an in-app browser with session import built in.

That helped, but I still had to sync often. Some Google sessions did not come across properly, and some passkey flows did not work as expected.

I would start a task and end up spending time getting the browser signed in again. Cookie transfers helped, but they could not carry everything, including passkeys.

The rule I use now

Eventually I tried agent-browser from Vercel Labs and added this rule to my AGENTS.md:

Use the agent-browser MCP for web browsing by default (headless, logged out). If a site needs my login, relaunch it with --profile Default to reuse my Chrome logins.

Most browsing starts without my accounts. When a task needs a login, the agent uses the Chrome profile flow. That flag launches a temporary copy of the profile, so session reuse becomes part of the workflow instead of another import I have to arrange by hand.

I still handle a fresh login or passkey approval when needed. But now I can use Claude Code, Codex or OpenCode in cmux with the same browser rule.

I shared the setup on October 9:

Guillermo Rauch replied, "This is the way. more to come!" A nice surprise after all that fiddling with browser sessions.

It became part of my daily work

I checked my saved agent threads before writing this. Across October 8 to 11, the audit found 616 recorded agent-browser calls and command batches in 11 threads. That includes retries and batches with multiple actions, so it is a usage count, not 616 completed tasks.

Those threads covered the Omi website and leaderboard, a ringtone editor, my portfolio and resume, marketing, and research. I knew I was using it a lot. The history made that obvious.

This was my follow-up:

Browser Cookie Bridge still helps when I want sessions inside an in-app browser. For everyday work, I now prefer terminal agents with a browser tool they can call when needed.

Thanks @vercel, @v0 and @rauchg for the work you're putting into tools for builders. agent-browser has saved me a lot of time. I get to spend more of it actually shipping.

I wanted to build apps. I did not expect browser logins to shape so much of how I build them.

Try it: https://agent-browser.dev. Chrome profile details: https://agent-browser.dev/sessions.

Originally published on X.

Top comments (0)