claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Support Claude in Chrome for WSL environments

Open shostako opened this issue 1 week ago • 6 comments

Problem Statement

When running Claude Code in WSL (Windows Subsystem for Linux), the "Claude in Chrome" feature fails with the error:

Error: Claude in Chrome Native Host not supported on this platform

WSL is a popular development environment, especially for web developers who use Linux tooling but work on Windows machines. Currently, WSL users cannot use the Claude in Chrome feature to control their Windows Chrome browser, forcing them to either:

  • Switch to Windows-native Claude Code for browser automation tasks
  • Use separate MCP servers (Playwright/Puppeteer) which launch isolated browser instances without user session data

Proposed Solution

Add support for WSL environments to connect to Windows Chrome via Native Host. This could be achieved by:

  1. WSL-Windows Bridge: Create a Windows-side relay process that WSL Claude Code can communicate with
  2. WebSocket Alternative: Use WebSocket connection instead of Native Messaging when running in WSL
  3. Cross-platform Detection: Detect when running in WSL and automatically use the appropriate connection method

Alternative Solutions

Current workarounds:

  • Use Claude Code from Windows PowerShell/cmd.exe (works but loses WSL dev environment)
  • Use Playwright/Puppeteer MCP servers (works but creates isolated browser without user session)

Priority

Medium - Would be very helpful

Feature Category

MCP server integration

Use Case Example

  1. Developer works in WSL with their preferred Linux tooling (vim, bash, etc.)
  2. They want to automate testing on their actual Chrome browser with logged-in state
  3. With this feature, they could use Claude in Chrome directly from WSL
  4. This would allow seamless browser automation while staying in the WSL environment

Additional Context

  • Tested on Claude Code v2.0.71
  • Windows 11 with WSL2 (Ubuntu)
  • Chrome extension is installed and working on Windows side
  • claude --chrome works correctly when run from Windows PowerShell

shostako avatar Dec 17 '25 20:12 shostako