Add configurable preferred browser for Claude in Chrome
Feature request
Claude in Chrome currently selects the browser by iterating a hardcoded priority list (["chrome", "brave", "arc", "edge", "chromium", "vivaldi", "opera"]) and picking the first one found in /Applications/. Users who don't use Chrome as their primary browser have no way to override this — the only option is patching cli.js directly, which gets overwritten on every update.
Proposed solution
Add a preferredBrowser setting (or CLAUDE_BROWSER environment variable) that lets users specify which browser to use. For example:
// ~/.claude/settings.json
{
"preferredBrowser": "brave"
}
Or:
export CLAUDE_BROWSER=brave
The value would match the existing keys in the browser config object (chrome, brave, arc, edge, chromium, vivaldi, opera). If set, that browser would be tried first; if not found, fall back to the current auto-detection order.
Context
Brave is already fully supported in the codebase — it has complete native messaging paths, extension detection, and browser config. The only issue is the priority order. Many Chromium-based browser users (Brave, Arc, Vivaldi) have the Chrome extension installed and working but can't use /chrome without it launching Google Chrome instead of their actual browser.
🤖 Generated with Claude Code
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗