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 --chrome for 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 --chrome connects 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_browser exists 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:

  1. A way to target a specific named browser in --chrome mode (e.g., --chrome-browser "n100")
  2. Or auto-prefer the local machine's Chrome over remote ones
  3. Or a non-interactive switch_browser that can specify a target by name

This would make --chrome reliable for unattended automation on multi-machine setups.

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗