[BUG] OAuth token exchange fails on ARM64 (Raspberry Pi)

Resolved 💬 7 comments Opened Apr 14, 2026 by spiveym Closed May 27, 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?

OAuth authentication always fails on ARM64 Raspberry Pi with "OAuth error: Invalid code. Please make sure the full code was copied." The authorization step works fine, whereby the browser authenticates and returns an auth code. The failure appears to be in the token exchange itself.

Note there are no issues with the URL, or pasting the code back to authenticate.

What Should Happen?

Pasting the authorization code should complete the OAuth flow and authenticate successfully.

Error Messages/Logs

OAuth error: Invalid code. Please make sure the full code was copied

Manual curl test of the token endpoint:
- POST https://claude.com/cai/oauth/token → HTTP/2 405

Steps to Reproduce

  1. Install Claude Code on Raspberry Pi (ARM64, Ubuntu Server) via curl -fsSL https://claude.ai/install.sh | bash
  2. Run claude
  3. Copy the generated OAuth URL
  4. Open URL in browser on another machine, authenticate, copy the returned code
  5. Paste the code into the "Paste code here" prompt
  6. Error appears every time

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.105

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

The workarounds in #27405 work correctly to get claude code running.

View original on GitHub ↗

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