anthropics / anthropics/claude-code

Remote Control: no way to archive/clean up disconnected sessions on claude.ai

Đang mở
#87,877 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

## Feature request

Provide a way to archive or clean up disconnected Remote Control sessions on claude.ai — either automatically after N hours offline, or programmatically from the machine side.

## Use case

We run a long-lived "dispatcher" Claude Code session on a Windows machine with `--remote-control ""`, so it is always reachable from the mobile app. A supervisor process replaces it periodically with a fresh instance (context hygiene). Each replacement creates a **new thread** in the claude.ai mobile app, and the old ones stay in the session list indefinitely as offline entries — the docs confirm this is by design ("Claude Code doesn't archive them"). After a few days the list is full of dead "Dispatcher" threads that can only be removed by hand on the phone.

## What we checked

- There is no CLI flag, subcommand, API endpoint, or settings option to archive/delete a Remote Control thread from the machine when the session ends (per the remote-control docs).
- Workaround that works (measured on v2.1.235): `claude --resume --remote-control ""` reattaches to the **same** bridge session, so the phone keeps a single thread. This is great, but it is not always applicable — sometimes a genuinely fresh conversation is needed, and the old thread still lingers.

## Suggestion

Either of these would solve it:

1. **Auto-archive**: archive Remote Control sessions on claude.ai after they have been disconnected for N hours (possibly configurable).
2. **Programmatic cleanup**: a CLI/API affordance such as `claude remote-control --archive `, or a setting like `remoteControlArchiveOnExit: true` that archives the thread when the local process exits cleanly.

## Environment

- Claude Code v2.1.235 (native install), Windows 11 Pro
- Remote Control used daily from the claude.ai mobile app

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ScbiFZmUh7bSH2DRgsw4wN

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

Start with the remote-control documentation and the lifecycle behind `claude --resume --remote-control ""`; identify where disconnected sessions and clean exits are handled. Determine whether cleanup belongs in the CLI, an API, or claude.ai, and consider the work complete when a supported automatic or programmatic archive path removes obsolete sessions without affecting active ones.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, cli
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.