Remote Control: Bridge poll returns 401 despite valid OAuth login (Max subscription)

Resolved 💬 2 comments Opened Mar 2, 2026 by jmlallier Closed Mar 2, 2026

Bug Description

Remote Control feature consistently fails with a 401 authentication error during the bridge poll step, even after re-authenticating via /login. This is from the CLI directly (not the VS Code extension).

Error Message

BridgeFatalError: 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. Please use `/login` to sign in with your claude.ai account.

Steps to Reproduce

  1. Run claude from the CLI (not VS Code)
  2. Verify auth: claude auth status shows logged in with Max subscription
  3. Remote Control bridge attempts to start automatically
  4. Bridge registration succeeds (200) but poll immediately fails with 401

Debug Log Sequence

The logs show a consistent pattern across multiple attempts:

[bridge:api] POST /v1/environments/bridge -> 200 (registration succeeds)
[bridge] Session creation request failed: Request failed with status code 503
[bridge:work] Starting poll loop
[ERROR] BridgeFatalError: Poll: Authentication failed (401): Invalid OAuth token.
[bridge:api] DELETE /v1/environments/bridge/env_... (cleanup)

Key observations:

  • Bridge registration succeeds with 200 and returns a valid environment_id and environment_secret
  • Session creation fails with 503 (sometimes 500)
  • Poll then fails with 401 "Invalid OAuth token"
  • This happens across multiple projects/directories simultaneously
  • Full claude logout + claude login does not resolve the issue

Auth Status

{
  "loggedIn": true,
  "authMethod": "claude.ai",
  "apiProvider": "firstParty",
  "subscriptionType": "max"
}

Normal API usage (conversations) works fine — only the Remote Control bridge is affected.

Attempted Fixes

  • claude logout followed by claude login (full re-auth)
  • Running only a single CLI instance at a time
  • Updating to latest version (2.1.63)

Environment

  • Claude Code version: 2.1.63
  • OS: macOS 26.3 (Tahoe), arm64 (Apple Silicon)
  • Runtime: Bun 1.3.7
  • Auth method: claude.ai OAuth (Max subscription)
  • Usage context: CLI only (no VS Code extension)

View original on GitHub ↗

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