[BUG] OAuth error: protocol mismatch on macOS

Resolved 💬 2 comments Opened Apr 16, 2026 by monokid11 Closed May 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Unable to authenticate with Claude Code via OAuth. After completing browser authorization successfully (browser shows "You're all set up for Claude Code. You can now close this window."), the terminal returns:

OAuth error: protocol mismatch

What I tried

  • Uninstalled and reinstalled Claude Code
  • Cleared ~/.claude and ~/Library/Application Support/ClaudeCode
  • Tried claude auth login from terminal
  • Tried manually copying the OAuth URL to browser
  • Browser authorization always succeeds but terminal always fails with the same error

What Should Happen?

Authentication should complete successfully after browser authorization, and Claude Code should start normally.

Error Messages/Logs

Steps to Reproduce

  1. Run claude and enter /login
  2. Select option 1 (Claude account with subscription)
  3. Browser opens and authorization completes successfully
  4. Terminal shows OAuth error: protocol mismatch

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.110 (npm-global)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗