[BUG] Invalid OAuth Request - Unknown scope: user:sessions%

Resolved 💬 7 comments Opened Feb 19, 2026 by abukreev-dev Closed Apr 14, 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?

Bug: Invalid OAuth Request - Unknown scope: user:sessions%

Version: 2.1.47 (also reproduced on 2.1.45)
OS: Ubuntu Server (headless, no browser)

Description

When attempting to authenticate via OAuth (option 1 - Claude account with subscription), the generated authorization URL contains a malformed scope parameter. Opening the URL in a browser results in:

Invalid OAuth Request Unknown scope: user:sessions%

The scope user:sessions appears to be URL-encoded incorrectly, resulting in a trailing % character in the scope string.

Steps to Reproduce

  1. Install Claude Code on Ubuntu Server: npm install -g @anthropic-ai/claude-code
  2. Run claude
  3. Select login method: "1. Claude account with subscription"
  4. Copy the generated OAuth URL and open in browser
  5. See error: "Invalid OAuth Request - Unknown scope: user:sessions%"

Expected Behavior

OAuth authorization should complete successfully.

Actual Behavior

Browser shows "Invalid OAuth Request" with "Unknown scope: user:sessions%"

Workaround

None available for users with Claude subscription (Pro/Max). Only API key login works as a workaround.

What Should Happen?

Description

When attempting to authenticate via OAuth (option 1 - Claude account with subscription), the generated authorization URL contains a malformed scope parameter. Opening the URL in a browser results in:

Invalid OAuth Request Unknown scope: user:sessions%

The scope user:sessions appears to be URL-encoded incorrectly, resulting in a trailing % character in the scope string.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Install Claude Code on Ubuntu Server: npm install -g @anthropic-ai/claude-code
  2. Run claude
  3. Select login method: "1. Claude account with subscription"
  4. Copy the generated OAuth URL and open in browser
  5. See error: "Invalid OAuth Request - Unknown scope: user:sessions%"

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.47 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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