[BUG] OAuth login fails with "unknown scope: user:sessions:claude_" on SSH session

Resolved 💬 3 comments Opened May 8, 2026 by RomainDupouy Closed May 11, 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?

When running claude in an SSH session and trying to log in with a Claude Pro account via OAuth, the generated authorization URL contains an unknown scope user:sessions:claude_ (note the trailing underscore), causing the OAuth flow to fail with "Requête OAuth invalide".

What Should Happen?

Successful login with Claude Pro account

Error Messages/Logs

OAuth fails, login impossible

Steps to Reproduce

Install Claude Code via npm on a remote Linux machine
Connect via SSH
Run claude and attempt to log in
Open the provided OAuth URL in a browser
See "Invalid OAuth request — Unknown scope: user:sessions:claude_"

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.133

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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