[BUG] Claude in Chrome extension cannot connect to Claude Code running inside a VS Code DevContainer

Resolved 💬 4 comments Opened Feb 13, 2026 by davidatorres Closed Mar 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude in Chrome Extension Cannot Connect to Claude Code Inside a VS Code DevContainer

Description

The "Claude in Chrome" browser extension cannot establish a connection to Claude Code when Claude Code is running inside a VS Code DevContainer (Docker-based remote development environment). The extension reports "Browser extension is not connected" on every connection attempt, with no additional error details or troubleshooting guidance specific to this scenario.

Environment

  • Claude Code version: 2.1.41
  • Claude Code binary: /home/vscode/.local/share/claude/versions/2.1.41
  • Claude Code launch command: claude --chrome
  • Claude model: Claude Opus 4.6 (claude-opus-4-6)
  • VS Code: Remote - Containers (DevContainer)
  • Host OS: MacOS Tahoe 26.3 (with Docker Desktop)
  • Container OS: Linux (Debian-based, linux-arm64)
  • Node.js (container): v20.20.0
  • Browsers tested: Google Chrome, Microsoft Edge (both on latest builds and extension installed and connected to Claude.ai)
  • Extension source: Installed from claude.ai/chrome

Steps to Reproduce

  1. Open a project in VS Code using a DevContainer (Dev Containers extension)
  2. Open a terminal inside the DevContainer
  3. Run claude --chrome in the container terminal
  4. Claude Code starts and spawns the --claude-in-chrome-mcp subprocess (confirmed via ps aux)
  5. Open Chrome or Edge on the host machine
  6. Install the Claude in Chrome extension and log into claude.ai with the same account
  7. Click "Reconnect" in the extension — nothing happens
  8. Claude Code reports: Browser extension is not connected

Expected Behavior

The Chrome extension should be able to discover and connect to the Claude Code instance running inside the DevContainer, similar to how VS Code's port forwarding allows other services (e.g., web servers, APIs) to be accessed from the host browser.

Actual Behavior

The extension never connects. Clicking "Reconnect" produces no visible feedback in the browser or in Claude Code's output.

Research Conducted

We investigated the container's network state to understand the connection failure:

1. The --claude-in-chrome-mcp process does not open a TCP port

$ ss -tlnp | grep claude
(no output)

The MCP subprocess (PID 15465) communicates with Claude Code via stdio pipes, not a network socket. There is no TCP listener for the Chrome extension to connect to.

2. All Claude Code network connections are outbound only

$ ss -tnp | grep claude
ESTAB  172.18.0.5:39494  160.79.104.10:443   (claude, pid=14965)
ESTAB  172.18.0.5:53704  160.79.104.10:443   (claude, pid=14965)
... (all outbound to Anthropic API)

Claude Code connects outbound to Anthropic's API but does not listen for inbound connections from the Chrome extension.

3. VS Code port forwarding cannot help

Since there is no port to forward, adding entries to devcontainer.json's forwardPorts array is not a viable workaround. The Chrome extension's discovery mechanism (likely local file-based or loopback-based) cannot bridge the Docker container boundary.

4. Container port listeners confirmed

Other services inside the DevContainer (e.g., Vite on 0.0.0.0:5173, Uvicorn on 0.0.0.0:8000) are accessible from the host via VS Code port forwarding — confirming the general port forwarding mechanism works. The issue is specific to the Chrome extension's discovery/connection protocol.

Suggested Fix

Consider one or more of the following:

  1. WebSocket listener mode: Allow the --claude-in-chrome-mcp process to optionally listen on a configurable TCP port (e.g., --chrome-port 9222) so it can be forwarded by VS Code's DevContainer port forwarding
  2. Cloud relay: Use Anthropic's cloud infrastructure as a relay/signaling server so the Chrome extension and Claude Code can discover each other regardless of network topology
  3. Documentation: At minimum, document that Claude in Chrome is not supported inside DevContainers/remote environments, so users don't spend time troubleshooting a known limitation
  4. Improved error messaging: When running inside a container (detectable via /.dockerenv or cgroup inspection), show a specific warning like: "Claude in Chrome is not supported inside containers. Run Claude Code on your host machine to use this feature."

Additional Context

DevContainers are a widely adopted development pattern, especially in enterprise environments where reproducible, containerized dev environments are standard. Supporting Claude in Chrome from within DevContainers would significantly expand the feature's reach.

What Should Happen?

Expected Behavior

The Chrome extension should be able to discover and connect to the Claude Code instance running inside the DevContainer, similar to how VS Code's port forwarding allows other services (e.g., web servers, APIs) to be accessed from the host browser.

Error Messages/Logs

`Browser extension is not connected`

Steps to Reproduce

Steps to Reproduce

  1. Open a project in VS Code using a DevContainer (Dev Containers extension)
  2. Open a terminal inside the DevContainer
  3. Run claude --chrome in the container terminal
  4. Claude Code starts and spawns the --claude-in-chrome-mcp subprocess (confirmed via ps aux)
  5. Open Chrome or Edge on the host machine
  6. Install the Claude in Chrome extension and log into claude.ai with the same account
  7. Click "Reconnect" in the extension — nothing happens
  8. Claude Code reports: Browser extension is not connected

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.41

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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