Closed bug report

Default-browser detection reads stale UserChoice key: Windows 11 default Firefox detected as Edge

kaleymer · 11d ago ·closed by John Lauer

ah 1.0.680 (build fa90efd1) · adom-bridge CLI 1.13.23 · Windows 11 (10.0.26200.9711)

What happened

Links opened from a Claude Code thread in Hydrogen to domains with no Browser Picker pref (alibaba.com, color-king.net, t-shirtforums.com) opened in Microsoft Edge. The user's Windows default browser is Firefox: Settings → Apps → Default apps shows Firefox for both HTTP and HTTPS.

GET /browser-profiles agrees with the wrong answer:

[{"browser":"edge","dir":"Default","isDefault":true,...},
 {"browser":"firefox","dir":"Default","isDefault":false,...}]

Cause

Hydrogen appears to read the legacy UserChoice key. On this Windows 11 build, Settings writes the user's choice to UserChoiceLatest, and the legacy key is left stale:

HKCU\...\UrlAssociations\https\UserChoice           ProgId = MSEdgeHTM                    <- stale
HKCU\...\UrlAssociations\https\UserChoiceLatest\ProgId  ProgId = FirefoxURL-308046B0AF4A39CB   <- real
HKCU\...\UrlAssociations\http\UserChoice            ProgId = MSEdgeHTM                    <- stale
HKCU\...\UrlAssociations\http\UserChoiceLatest\ProgId   ProgId = FirefoxURL-308046B0AF4A39CB   <- real

(full path prefix: HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\)

Expected

Default-browser detection should prefer UserChoiceLatest\ProgId when it exists and fall back to UserChoice. Better still, ask Windows directly (AssocQueryString(ASSOCF_IS_PROTOCOL, ASSOCSTR_PROGID, L"https", ...)), which resolves whichever key the current build uses. With that, isDefault would be Firefox and unsaved domains would open in Firefox.

Notes

  • Related, closed: adom/hydrogen#32 (login window not opening in the default browser). This may be the same root cause on newer Windows builds.
  • Workaround for now: per-domain prefs (PUT /browser-picker/prefs) or %APPDATA%\hd-browser-bias.txt.

2 Replies

John Lauer · 11d ago

Thanks for the precise diagnosis, it was exactly right. Hydrogen only read the legacy UserChoice key, which Windows 11 leaves stale once you pick a browser in Settings, so it decided Edge was your default.

Fixed: Hydrogen now reads UserChoiceLatest\ProgId first (https, then http) and falls back to UserChoice on older Windows builds. It covers both /browser-profiles (isDefault) and links with no picker preference. A unit test pins your exact registry state (Edge in the legacy key, Firefox in the new one).

It ships in the next insiders build after 1.0.687. I'll update this issue when it's out. Until then, your per-domain picker prefs workaround still applies.

John Lauer · 9d ago

This is now public in Hydrogen 1.0.701: the default browser is read from UserChoiceLatest first, so links with no picker preference open in Firefox for you. It reaches you through the normal update. Thanks again for the exact diagnosis. Everything else in this release: What's new in 1.0.701. Closing.

John Lauer closed this · 9d ago

Log in to reply.