[BUG] OAuth login broken on headless/HPC SSH environments — redirect URI not supported`
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?
Claude Code OAuth login is broken on headless HPC/SSH environments. The browser-based OAuth flow fails with:
Authorization failed
Redirect URI https://platform.claude.com/oauth/code/callback is not supported by client.
This redirect URI error appears to be a server-side regression — the callback URL is not being accepted by Anthropic's OAuth server. This worked previously.
Attempting the workaround of extracting the OAuth token from a working local machine and setting ANTHROPIC_AUTH_TOKEN fails with:
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}
This leaves Pro subscribers on HPC systems with no viable authentication path:
- The browser redirect is broken server-side
- The token env var workaround is blocked by the OAuth deprecation
- API keys require a separate paid Console account (not included with Pro)
What Should Happen?
Expected Behavior
Either:
- The OAuth redirect URI works correctly, OR
- A manual code-paste fallback is shown in the browser when the redirect fails
Impact
This affects all Pro/Max subscribers using Claude Code on HPC clusters (NERSC, XSEDE, university clusters, etc.) — a significant user group for research computing. These environments are inherently headless and cannot use browser-redirect OAuth flows.
Workaround
None currently available for Pro subscribers. API key auth requires a separate Console billing account.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Install Claude Code on a headless Linux HPC system (e.g. NERSC Perlmutter) accessed via SSH
- Run
claudeand attempt/login - Copy the login URL and open it in a local browser
- Authenticate successfully — browser shows redirect failure:
Redirect URI https://platform.claude.com/oauth/code/callback is not supported by client.
- No code is shown to paste back into the terminal
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.97 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗