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

> Source: <https://dev.to/apoorvdarshan/i-built-a-cookie-bridge-then-changed-my-entire-agent-setup-3e2>
> Published: 2026-10-11 06:18:19+00:00

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

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](https://github.com/apoorvdarshan/browser-cookie-bridge)

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.

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:

// Detect dark theme var iframe = document.getElementById('tweet-2108313693696188526-473'); if (document.body.className.includes('dark-theme')) { iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2108313693696188526&theme=dark" }

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

// Detect dark theme var iframe = document.getElementById('tweet-2108314389170516471-245'); if (document.body.className.includes('dark-theme')) { iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2108314389170516471&theme=dark" }

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:

// Detect dark theme var iframe = document.getElementById('tweet-2109099239699890312-532'); if (document.body.className.includes('dark-theme')) { iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=2109099239699890312&theme=dark" }

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](https://x.com/vercel), [@v0](https://x.com/v0) and [@rauchg](https://x.com/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](https://agent-browser.dev). Chrome profile details: [https://agent-browser.dev/sessions](https://agent-browser.dev/sessions).

Originally published on [X](https://x.com/apoorvdarshan/status/2109119525954216286).
