[Bug] Automatic browser window launch on CLI startup with experimental MCP enabled
Bug Description
Claude Code CLI is automatically launching a browser window to "http://localhost:8000/oauth/callback" every time I open the app.
What's Happening
- I type "claude" to open the Claude Code CLI.
- A browser window immediately and automatically opens to: http://localhost:8000/oauth/callback?error=invalid_scope&state=<uuid>
- The "localhost:8080" page fails to load.
- The browser shows "Error: No authorization code received".
It appears that Claude is trying to automatically reauthenticate or reconnect to an existing MCP server that is failing.
Expected Behavior
If MCP authentication errors are happening, that should be displayed in the CLI and handled through the normal "/mcp" flow. After a user goes that way, if a browser window needs to be launched to re-authenticate, that's expected. But not in a way that causes a browser window to open _as soon as_ the user types "claude" and the app starts up.
Experimental MCP Environment
Note that I'm using this value:
ENABLE_EXPERIMENTAL_MCP_CLI=true
This feature has been great! But I mention it here because I only started seeing this funky automatic browser window launch behavior after enabling that.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.70
- Feedback ID: ff8094a3-fc29-4d19-8d08-3152177427b7
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗