feat: Enable `--chrome` integration for Dia browser by adding browser detection and NM host path support
Dia browser has every API that claude --chrome requires — connectNative, sidePanel, nativeMessaging permission — but Claude Code never connects because Dia isn't in the browser detection list and the native messaging host config isn't installed to Dia's lookup path.
---
The Problem
Claude Code's --chrome integration detects supported browsers by checking /Applications/<appName>.app against a hardcoded list: Google Chrome, Brave Browser, Arc, Chromium, Microsoft Edge, Vivaldi.
Dia (The Browser Company's Chromium-based successor to Arc, built on ArcCore) is not in this list. This causes two silent failures:
- Claude Code never starts the bridge connection. The browser detection function checks
/Applications/Dia.appagainst the known app names, finds no match, and never initializes the Chrome MCP server. The user sees "Extension: Not detected" with no diagnostic output explaining why.
- The native messaging host config is never installed to Dia's directory.
claude --chromewrites the manifest to~/Library/Application Support/Google/Chrome/NativeMessagingHosts/(and other detected browsers), but not to~/Library/Application Support/Dia/NativeMessagingHosts/where Dia looks.
Both blockers are detection-side — every required capability works in Dia.
Every Required API Works in Dia
We verified each component of the integration pipeline from the extension's service worker console:
| Component | Result |
|-----------|--------|
| typeof chrome.runtime.connectNative | "function" |
| typeof chrome.sidePanel | "object" |
| chrome.permissions.contains({permissions:["nativeMessaging"]}) | true |
| connectNative("com.anthropic.claude_code_browser_extension") | Pong received |
| Native host socket creation | /tmp/claude-mcp-browser-bridge-chrisren/<PID>.sock created |
| MCP execute_tool request over socket | Valid response: {"result":{"content":[...]}} |
| chrome.storage.local bridge device ID | UUID present |
| mcpConnected storage flag | false — bridge pairing never completes |
The native messaging host spawns, creates its socket, responds to MCP requests, and returns valid tool results. The extension has the nativeMessaging permission granted and connectNative is a real function. The only thing that doesn't happen is Claude Code connecting to the bridge — because it never gets past browser detection.
What Needs to Change
Browser detection config — Add Dia to the app name list so claude --chrome recognizes /Applications/Dia.app and initializes the Chrome MCP server:
// Current: no Dia entry
qd6 = {
chrome: { macos: { appName: "Google Chrome" }, ... },
brave: { macos: { appName: "Brave Browser" }, ... },
arc: { macos: { appName: "Arc" }, ... },
// ...
}
// Fix: add Dia
dia: { name: "Dia", macos: { appName: "Dia" }, ... }
NM host installation path — Add ~/Library/Application Support/Dia/NativeMessagingHosts/ to the directories where claude --chrome writes the native messaging host manifest.
Reproduction
- Install Dia browser with the Claude extension (v1.0.62+)
- Run
claude --chrome - Status bar shows "Chrome extension not detected"
/chromecommand shows "Status: Enabled, Extension: Not detected"- Toggling the Claude extension off/on in
dia://extensionshas no effect
Debug log confirms the gap (claude --chrome --debug-file /tmp/debug.log):
Bridge URL: wss://bridge.claudeusercontent.com
MCP server "claude-in-chrome": In-process Chrome MCP server started
MCP server "claude-in-chrome": Successfully connected to stdio server in 9ms
Claude Code connects to the bridge, but since browser detection failed, it never pairs with the extension.
Workaround Attempted
We manually placed the NM host config in Dia's NativeMessagingHosts/ directory and confirmed native messaging works end-to-end. The native host spawns, responds to pings, creates a Unix socket, and serves valid MCP responses over it. The sole remaining blocker is Claude Code's browser detection gate — without a match in qd6, the Chrome MCP server never starts polling for the extension's socket.
Environment
- Claude Code v2.1.79
- Dia (ArcCore/Chromium-based, The Browser Company)
- macOS Darwin 24.6.0, Apple Silicon
- Claude extension v1.0.62 (
fcoeoabgfenejglbffodgkkbkcdhcgfn)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗