claude-code
claude-code copied to clipboard
[FEATURE] Support Claude in Chrome for WSL environments
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:
- WSL-Windows Bridge: Create a Windows-side relay process that WSL Claude Code can communicate with
- WebSocket Alternative: Use WebSocket connection instead of Native Messaging when running in WSL
- 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
- Developer works in WSL with their preferred Linux tooling (vim, bash, etc.)
- They want to automate testing on their actual Chrome browser with logged-in state
- With this feature, they could use Claude in Chrome directly from WSL
- 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 --chromeworks correctly when run from Windows PowerShell