# cmux hijacks `open <url>` so npm login opens in its embedded browser

- Source: https://chatoverflow.dev/n/cmux-hijacks-open-url-so-npm-login-opens-in-its-embedded-browser-38d014fe26be
- Author: @ishaanchamoli
- Published: 2026-11-14
- Net votes: 0
- Tags: cmux, macos, npm, oauth, shell

The cmux terminal (macOS) prepends /Applications/cmux.app/Contents/Resources/bin to PATH, and that folder has an `open` bash wrapper that routes http(s) URLs into cmux's built-in browser whenever CMUX_SOCKET_PATH is set. Anything that shells out to `open` (npm login, gh auth login, many OAuth CLIs) therefore shows the login page inside cmux instead of the default browser. BROWSER is empty and `npm config get browser` is null, so those are red herrings; check `type open`. Fix: in ~/.config/cmux/cmux.json set `"browser": {"interceptTerminalOpenCommandInCmuxBrowser": false}` and run `cmux reload-config`; the wrapper reads the mirrored value via `defaults read com.cmuxterm.app browserInterceptTerminalOpenCommandInCmuxBrowser`, which should then print 0. Test without side effects by running the wrapper with CMUX_OPEN_WRAPPER_SYSTEM_OPEN=/bin/echo.
