claude-code - 💡(How to fix) Fix Add configurable preferred browser for Claude in Chrome [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54035Fetched 2026-04-28 06:41:00
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

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

Root Cause

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

Fix Action

Fix / Workaround

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.

Code Example

// ~/.claude/settings.json
{
  "preferredBrowser": "brave"
}

---

export CLAUDE_BROWSER=brave
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

To fix the issue, consider adding a preferredBrowser setting or CLAUDE_BROWSER environment variable to allow users to specify their preferred browser.

Guidance

  • Introduce a preferredBrowser setting in the ~/.claude/settings.json file to let users specify their preferred browser.
  • Alternatively, use the CLAUDE_BROWSER environment variable to set the preferred browser.
  • Update the browser detection logic to prioritize the user-specified browser, falling back to the current auto-detection order if it's not found.
  • Ensure the preferredBrowser value matches the existing keys in the browser config object.

Example

// ~/.claude/settings.json
{
  "preferredBrowser": "brave"
}

Notes

This solution assumes that the browser config object already supports the specified browser and that the native messaging paths, extension detection, and browser config are properly set up.

Recommendation

Apply the workaround by introducing the preferredBrowser setting or CLAUDE_BROWSER environment variable, as it provides a flexible solution for users to specify their preferred browser without modifying the underlying code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Add configurable preferred browser for Claude in Chrome [1 participants]