macOS: `codex mcp login` can print OAuth URL without surfacing a browser window
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
Summary
On macOS, codex mcp login <server> can print the OAuth authorization URL and wait for the loopback callback, but no browser window/tab becomes visible. The command does not print the documented fallback (Browser launch failed; please copy the URL above manually.), so the client appears to believe browser launch succeeded.
This creates a high-friction MCP OAuth flow: users think the command is stuck until they manually copy the one-time URL into a browser.
Environment
- macOS 26.5.1 (arm64)
codex-cli 0.148.0-alpha.9from the Codex desktop bundle
Reproduction
- Configure an OAuth-capable remote MCP server.
- Run
codex mcp login <server> --scopes <scopes>. - Observe that the terminal prints
Authorize <server> by opening this URL in your browser:and waits. - No browser window/tab is brought forward.
- Manually opening the printed URL completes OAuth and reaches the local callback successfully.
Expected
The authorization page should be visibly opened in the user's default browser, or the CLI should reliably report that opening it failed and make the manual next step explicit.
Notes
Current source calls webbrowser::open(auth_url) after printing the URL, but this observed path appears to return success without making a browser tab visible. No OAuth URL, code, state, or account data is included here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the macOS MCP login path that calls webbrowser::open(auth_url) after printing the authorization URL. Reproduce codex mcp login <server> --scopes <scopes> on macOS and compare the browser-launch result with the visible fallback message. Done means the authorization page is visibly opened, or a failed launch reliably reports the manual URL step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100