anthropics / anthropics/claude-code

[BUG] Remote Control session stuck disconnected after auth token missing required scope, no way to reconnect from UI

Open
#95,001 0 comments 0 reactions 0 assignees View on GitHub
area:auth area:desktop bug platform:windows
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

Remote Control (mobile app ↔ desktop Claude Code) stops connecting sessions. All sessions in the mobile app's session list show "Disconnected", including one actively running on desktop.

Root cause: one of my device's auth tokens (Settings → Claude Code → Auth Tokens) was missing the `user:sessions:claude_code` scope that newer tokens have — it seems this scope was added later and wasn't retroactively granted to existing tokens.

Revoking the old token and re-authenticating fixed the scope, but a session that was already created while the scope was missing stayed with remote control off indefinitely — it did not auto-retry, and there was no button/setting anywhere to reconnect it manually. The only way I found to fix it was via an internal session tool that isn't exposed in the UI.

### What Should Happen?

When an auth token's scopes are updated (e.g. adding `user:sessions:claude_code`), existing sessions that failed to connect to Remote Control should automatically retry and reconnect once a valid token becomes available — or at minimum, there should be a visible "Reconnect" button in the UI so the session doesn't stay stuck disconnected indefinitely.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Have a Claude Code account whose device auth token predates the `user:sessions:claude_code` scope (check Settings → Claude Code → Auth Tokens — an older token may be missing this scope while newer ones have it).
2. Start a Claude Code session on desktop.
3. Open the mobile app's session list (코드 tab) — the session shows as "Disconnected" even though it's actively running on desktop.
4. Go to Settings → Claude Code → Auth Tokens, revoke the old token missing `user:sessions:claude_code`, and re-authenticate on the device.
5. Return to the mobile app and refresh the session list — the already-running session still shows "Disconnected". It never auto-reconnects, and there is no button anywhere in the UI to manually reconnect it.

Note: The only workaround I found was toggling Remote Control off/on again for that specific session (not exposed as a normal UI action).

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

Unknown — worked before creating a Cloud Environment; stopped working afterward

### Claude Code Version

2.1.274

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

PowerShell

### Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with a token missing user:sessions:claude_code, then re-authenticate and refresh the mobile app's session list. Trace the Remote Control session behavior around the Settings → Claude Code → Auth Tokens flow and the existing off/on workaround. Done means an affected session reconnects after a valid token becomes available or exposes a visible Reconnect action.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, python
Domain
authentication, desktop, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.