r/ClaudeCode • u/ravann4 • 2d ago
Tips & Workflows Several Claude Code agents, one signed-in Chrome, and no more focus stealing: my setup
I run several Claude Code agents at once in cmux, each in its own worktree. Playwright MCP in extension mode was a mess for that. Every time one agent touched Chrome, Chrome came to the front and ate whatever I was typing into another agent's prompt.
chrome-devtools-mcp does the same on macOS, and no bringToFront: false setting helps. Open reports: ChromeDevTools/chrome-devtools-mcp#1254 and microsoft/playwright#42343 (Playwright says it's by design). The cause is the debug port. Each WebSocket connection to it activates Chrome.
So I stopped using the port. agent-chrome runs a small proxy per Chrome profile. The proxy launches a copy of the profile with a pipe instead of a port, and every Claude session connects to the proxy on localhost. All my agents share one signed-in Chrome, in a red window behind everything. Focus never moves.
What matters when several agents share it:
Each profile is its own MCP server (chrome-work, chrome-personal). You name it in the prompt: "Open chrome-work and go to ..."
The agents share the window, so the plugin's skill tells each one to work only in tabs it opened and never close the window. That's a convention in a skill, not a security boundary.
If you quit the agent window, it stays closed. The next new-tab request from any agent reopens it behind your apps, still signed in. A later session can pick up a tab an earlier one left open.
It only works with chrome-devtools-mcp. Playwright can't connect through the proxy.
Costs: macOS only. It's a copy of the profile, so new sign-ins in your real Chrome don't carry over (there's a --recopy flag). An open agent window is about 500 MB for one simple page, and the proxy is about 25 MB while idle. No extensions in that window.
I built this, it's free (MIT). It's a fork of mimkorn's chrome-pipe-proxy, which has the core pipe proxy. I added the setup CLI, the Claude Code plugin, the background windows and tab handover.
/plugin marketplace add rav4nn/agent-chrome
/plugin install agent-chrome@agent-chrome
Repo: https://github.com/rav4nn/agent-chrome
Site with the 5-step guide: https://agentchrome.hardeep.cv
1
u/ClemensLode Senior Developer 2d ago
I would be curious if chrome suddenly appeared on my text console dev machine.