anthropics / anthropics/claude-code
Remote Control session drops intermittently even when desktop-side connection is stable
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
## Summary
Using Claude Desktop's Remote Control feature (view/control a Mac session from the Claude iOS app), the mobile app repeatedly shows the remote session as disconnected, even while actively viewing the screen in the foreground. This happens on both Wi-Fi and cellular data, ruling out network-type as the cause, and happens mid-use (not just after backgrounding the app), ruling out iOS background suspension.
## Environment
- Claude Desktop (macOS), Apple Silicon
- Remote Control feature (`remoteToolsDeviceName` device bridge over `wss://bridge.claudeusercontent.com`)
- Claude iOS app viewing the remote session
## Investigation done
- A separate prior issue (two Macs both using the device name `imac-lan`, causing `socket closed: 4000 Superseded by newer connection` every ~5 min) was identified and fixed by giving each Mac a unique `remoteToolsDeviceName` and restarting the app.
- After that fix, `~/Library/Logs/Claude/main.log` on the Mac shows **zero** `socket closed` / `Superseded` events for 3+ hours of continuous uptime, and the desktop-to-bridge TCP connection stays `ESTABLISHED` throughout (verified via `lsof`).
- Despite the Mac-side connection being fully stable, the phone-side session still drops:
- Happens on both Wi-Fi and mobile data (not a network-switching issue)
- Happens while actively viewing the screen in the foreground (not an iOS background-suspension issue)
- Since the Mac's local log shows no trace of the drop, the disconnect appears to originate either on the relay/bridge server side, or in the iOS app's own connection handling — something not diagnosable from the Mac's local files/logs.
## Expected behavior
The Remote Control session on the phone should remain stable as long as the desktop-side connection is healthy, or at minimum should recover/reconnect gracefully and quickly without requiring manual intervention.
## Actual behavior
Mobile app repeatedly reports the remote session as disconnected while the desktop-side bridge connection shows no errors.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
The report names ~/Library/Logs/Claude/main.log, lsof output, and the wss://bridge.claudeusercontent.com endpoint, but no repository file or test. Start by locating the Remote Control connection and reconnect handling, then reproduce the foreground disconnect while checking the desktop log and bridge connection. Done means identifying the phone-side or relay cause and keeping the session stable or recovering it without manual intervention.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, macos
- Lĩnh vực
- distributed-systems, mobile-dev, networking
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100