[BUG] OAuth login fails with "Missing scope parameter" then persistent 401 loop on Windows

Resolved 💬 0 comments Opened Jun 24, 2026 by sahilsharma82229-bot Closed Jun 24, 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?

Running /login redirects to browser for email sign-in, but the browser returns an "Invalid OAuth Request — Missing scope parameter" error page. After closing/returning to the terminal, login shows "Login interrupted." All subsequent attempts to use Claude Code fail with "Please run /login · API Error: 401 Invalid authentication credentials" — including immediately after running /login again. The /feedback command itself also fails with a 401 when trying to submit, which is why this report is being filed here instead.

What Should Happen?

/login should open the browser, complete email sign-in without an OAuth scope error, and return a valid authenticated session in the terminal.

Error Messages/Logs

Browser: "Invalid OAuth Request — Missing scope parameter"
Terminal: "Login interrupted"
Terminal (persistent after): "Please run /login · API Error: 401 Invalid authentication credentials"
/feedback attempt: "Couldn't send feedback (server returned 401)."

Steps to Reproduce

  1. Open Claude Code terminal (npm-global install on Windows)
  2. Run /login
  3. Browser opens for email sign-in, then returns "Invalid OAuth Request — Missing scope parameter"
  4. Return to terminal — shows "Login interrupted"
  5. Run claude update — completes successfully (2.1.185 → 2.1.187)
  6. Run /login again — same failure persists
  7. Any command now returns: "Please run /login · API Error: 401 Invalid authentication credentials"
  8. Tried: claude logout, full terminal restart, claude update — none resolved it

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

2.1.187

Claude Code Version

2.1.187

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Even claude --version now fails with the same 401 error, suggesting the auth check is blocking commands that shouldn't require live authentication.

View original on GitHub ↗