Claude --chrome connects to wrong browser when multiple Chrome instances on LAN
Resolved 💬 10 comments Opened Feb 13, 2026 by wstock Closed Apr 17, 2026
Description
When running claude --chrome on a machine with multiple Chrome instances on the same LAN (each with the Claude extension installed), the connection can go to the wrong browser. There's no way to specify which Chrome instance to connect to.
Environment
- Ubuntu host (n100) running Claude Code with
--chromefor automated token renewal via systemd timer - Windows gaming PC (BIGRIG) on the same LAN, also running Chrome with the Claude extension
- Both machines logged into the same claude.ai account
Behavior
claude --chromeconnects to whichever Chrome extension responds first- The automated renewal script on the Ubuntu host connected to BIGRIG's Chrome instead of the local one
switch_browserexists but requires manual user interaction (clicking "Connect"), making it unsuitable for unattended/automated use- No way to specify a target browser by name, hostname, or ID programmatically
Workaround
Added a navigator.platform check after connecting to detect if the browser is on the expected OS (Linux vs Win32) and log a warning. The OAuth flow works regardless of which browser handles it, so we proceed with a warning rather than failing.
Feature Request
It would be useful to have:
- A way to target a specific named browser in
--chromemode (e.g.,--chrome-browser "n100") - Or auto-prefer the local machine's Chrome over remote ones
- Or a non-interactive
switch_browserthat can specify a target by name
This would make --chrome reliable for unattended automation on multi-machine setups.
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗