[BUG] Claude Code Authentication Broken on Android + Codespaces (OAuth Redirect Issue)
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?
I am writing to report a critical issue with Claude Code authentication that makes the product unusable for Android users accessing GitHub Codespaces.
Problem:
Claude Code's OAuth flow redirects to localhost:PORT/callback
Android browsers cannot connect to localhost (ERR_CONNECTION_REFUSED)
claude setup-token also fails with the same localhost redirect
This makes Claude Code completely inaccessible for remote development on Android
Environment:
Device: Android phone
IDE: GitHub Codespaces
Claude subscription: Pro (paid)
Claude Code version: 2.1.168
Expected behavior:
OAuth redirect should work without localhost (e.g., to platform.claude.com/oauth/callback)
Or provide a non-interactive authentication method for headless environments
Or document a workaround for Android users
What I paid for:
I purchased Claude Pro specifically to use Claude Code, but I cannot authenticate it on the only device I'm currently using for development.
Workaround used:
Had to resort to Python scripts to write files instead of using Claude Code's intended features.
This is a significant product limitation that should be documented or fixed.
Best regards,
What Should Happen?
Claude
Error Messages/Logs
I am writing to report a critical issue with Claude Code authentication that makes the product unusable for Android users accessing GitHub Codespaces.
Problem:
Claude Code's OAuth flow redirects to localhost:PORT/callback
Android browsers cannot connect to localhost (ERR_CONNECTION_REFUSED)
claude setup-token also fails with the same localhost redirect
This makes Claude Code completely inaccessible for remote development on Android
Environment:
Device: Android phone
IDE: GitHub Codespaces
Claude subscription: Pro (paid)
Claude Code version: 2.1.168
Expected behavior:
OAuth redirect should work without localhost (e.g., to platform.claude.com/oauth/callback)
Or provide a non-interactive authentication method for headless environments
Or document a workaround for Android users
What I paid for:
I purchased Claude Pro specifically to use Claude Code, but I cannot authenticate it on the only device I'm currently using for development.
Workaround used:
Had to resort to Python scripts to write files instead of using Claude Code's intended features.
This is a significant product limitation that should be documented or fixed.
Best regards,
Steps to Reproduce
I am writing to report a critical issue with Claude Code authentication that makes the product unusable for Android users accessing GitHub Codespaces.
Problem:
Claude Code's OAuth flow redirects to localhost:PORT/callback
Android browsers cannot connect to localhost (ERR_CONNECTION_REFUSED)
claude setup-token also fails with the same localhost redirect
This makes Claude Code completely inaccessible for remote development on Android
Environment:
Device: Android phone
IDE: GitHub Codespaces
Claude subscription: Pro (paid)
Claude Code version: 2.1.168
Expected behavior:
OAuth redirect should work without localhost (e.g., to platform.claude.com/oauth/callback)
Or provide a non-interactive authentication method for headless environments
Or document a workaround for Android users
What I paid for:
I purchased Claude Pro specifically to use Claude Code, but I cannot authenticate it on the only device I'm currently using for development.
Workaround used:
Had to resort to Python scripts to write files instead of using Claude Code's intended features.
This is a significant product limitation that should be documented or fixed.
Best regards,
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗