anthropics / anthropics/claude-code

[FEATURE] Let me find and resume Remote Control sessions locally: show them in /resume and add `claude rc list-sessions`

Open
#94,369 0 comments 1 reaction 0 assignees View on GitHub
area:cli enhancement
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

## Summary

When I run `claude rc` on my computer and start a session from my phone, I can never find that session again on the computer. `/resume` and `claude --resume` don't list it, and there is no command that does. The transcript is saved locally like any other session — the picker just hides it, and there's no way to look up its ID.

Proposed fix: show these sessions in `/resume` (marked as Remote Control sessions), and add `claude rc list-sessions` (or similar) that prints the local session ID, name, directory and first prompt, so `claude --resume ` / `claude rc --session-id ` become usable.

## Problem Statement

Sessions that the Remote Control server spawns for a phone/web client are written to `~/.claude/projects//.jsonl` with `"entrypoint":"sdk-cli"`. The resume picker filters every such session out. `claude --resume --debug-file …` confirms it:

```
Session ed9f1863-… filtered from /resume: entrypoint=sdk-cli
Session dcf41b86-… filtered from /resume: entrypoint=sdk-cli
Session 5f0da884-… filtered from /resume: entrypoint=sdk-cli
```

Consequences:

- `/resume`, `claude --resume` and Ctrl+A ("all projects") never show them — the same filter runs on every entry.
- `claude rc -c` only works for the last session and only for ~4 h.
- `claude rc --session-id ` and `claude --resume ` work, but nothing prints the ID. claude.ai/code lists the sessions but its URL uses a different id (`session_01K…`), not the local UUID.
- The only mapping is `~/.claude/sessions/.json` (`sessionId` ↔ `bridgeSessionId`), which is deleted when the process exits.

Today the workaround is grepping transcripts for `"entrypoint":"sdk-cli"` — not something a user should have to know.

## Proposed Solution

1. `/resume` and `claude --resume`: include `sdk-cli` sessions that were created by `claude remote-control` (they carry a `bridgeSessionId`), with a marker such as `· remote` in the row. If hiding headless SDK sessions is intentional for other SDK uses, scope the exemption to Remote Control-spawned ones.
2. `claude rc list-sessions` (or `claude rc --list`): print local session ID, session name (e.g. `my-repo-26`), cwd, status (if running), last modified, first prompt — for the current directory by default, `--all` for every project. Output should be usable directly with `claude --resume ` and `claude rc --session-id `.

## Alternative Solutions

- A flag `claude --resume --include-remote` / `--all-entrypoints` if changing the default is undesirable.
- Show the local session UUID somewhere in claude.ai/code / the mobile app.

## Environment

Claude Code 2.1.270 (also seen on 2.1.269), Linux, `claude rc` with default `--spawn same-dir`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the /resume and claude --resume filtering described for ~/.claude/projects//.jsonl, then inspect the session mapping in ~/.claude/sessions/.json. Compare the existing remote-control entrypoint and bridgeSessionId data with the proposed claude rc list-sessions output. Done means remote sessions are discoverable and their local IDs can be used with the documented resume commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli
Issue type
Feature
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.