[BUG] claude remote-control dies with 401 when mobile client connects (token valid but poll fails)
Resolved 💬 4 comments Opened Mar 2, 2026 by KOOKSIL-SSV Closed Mar 31, 2026
Bug Description
claude remote-control starts successfully and registers a bridge, but immediately dies with 401 the moment a mobile Claude app client connects. The OAuth token is confirmed valid via direct API testing.
Environment
- OS: macOS Darwin 25.3.0 (Mac Mini, Apple Silicon)
- Claude Code: v2.1.63 (latest)
- Subscription: Claude Max (claude.ai OAuth)
- Shell: zsh
- Node: via homebrew
Reproduction Steps
claude auth login(success, claude.ai method)claude remote-control→ shows✔ Readywith bridge URL- Open Claude mobile app → select the Mac Mini environment
- Immediately:
````
Error: Poll: Authentication failed (401): Invalid OAuth token.
The provided token was not found or is malformed.
Remote Control is only available with claude.ai subscriptions.
- Process exits
Critical Evidence
The OAuth token stored in macOS Keychain is valid:
# Direct API test with the token from Keychain
$ curl -H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
https://api.anthropic.com/v1/environments/bridge -X POST
# Returns 400 (Field required) — NOT 401
# This proves the token authenticates successfully
But claude remote-control gets 401 during the Poll phase when a client connects. This suggests:
- The CLI may not be sending the token correctly during poll requests
- OR the token gets rotated/invalidated when a mobile client connects and the CLI fails to handle the refresh
Additional Context
- The command previously worked, then was force-killed. After that, it never worked again.
- Fresh logout → login → new token → same issue
- Deleting Keychain entry → fresh login → same issue
- Reinstalling Claude Code via npm → same issue
- Without any mobile client connecting,
claude remote-controlruns indefinitely with no errors - The 401 happens specifically during the Poll phase, not during initial bridge registration
Possibly Related Issues
- #30096 — Same 401 error on macOS with remote-control
- #28827 — OAuth token refresh fails in non-interactive/headless mode
- #21765 — OAuth refresh token not used in headless environments
- #12447 — OAuth token expiration disrupts autonomous workflows
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗