OAuth login fails with 'Invalid OAuth Request - Unknown scope: user:i' when logging into second Max account

Resolved 💬 4 comments Opened Mar 14, 2026 by Wernerina Closed Apr 11, 2026

Description

When attempting to log into a second Max account via Claude Code CLI (/login or claude auth login), the OAuth flow fails with:

"Invalid OAuth Request — Unknown scope: user:i"

Environment

  • Claude Code v2.1.76
  • Platform: WSL2 (Windows)
  • Both accounts are on Max plan (confirmed in billing settings)
  • The first account (shiraniabranches@gmail.com) works fine
  • The second account (Werner85@gmail.com) has been used with CLI for months — this is a regression

Steps to Reproduce

  1. Have an active Claude Code session logged in with Account A
  2. In a separate terminal, attempt to log in with Account B using either:
  • HOME=/tmp/other-account claude auth login --email other@gmail.com
  • Or launching a fresh claude instance and running /login
  1. Copy the OAuth URL and open it in a browser (including private/incognito window logged into Account B)
  2. Result: "Invalid OAuth Request — Unknown scope: user:i" error page

Analysis

The OAuth URL generated by the CLI contains correct scopes:

scope=org%3Acreate_api_key+user%3Aprofile+user%3Ainference+user%3Asessions%3Aclaude_code+user%3Amcp_servers+user%3Afile_upload

The error message Unknown scope: user:i suggests the server is incorrectly parsing the scope parameter, possibly truncating user:inference to user:i.

This is NOT a URL line-wrapping issue — the full URL was verified and pasted correctly into the browser. The same user has successfully completed this OAuth flow many times before with the same account.

Expected Behavior

OAuth flow should complete successfully and return an auth code for the CLI, regardless of which Max account is being authenticated.

Impact

  • Cannot use CLI with second Max account ($200/month subscription unusable for CLI)
  • No built-in multi-account support means users paying for multiple Max subscriptions cannot use them simultaneously in CLI without workarounds
  • Logging out of the working account to try the broken one risks losing active sessions

Additional Context

There is also no native multi-account/profile support in Claude Code. Users paying for multiple Max subscriptions ($200+/month each) should be able to switch between accounts without hacks like separate HOME directories. A claude auth login --profile <name> or similar would be very welcome.

View original on GitHub ↗

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