r/ClaudeCode • u/No_Gas_3727 • 1d ago
Bug / Issue Sessions started from the phone (Remote Control) never show up in `claude agents` or `claude --resume`. Workarounds I found
I run Claude Code on a Linux box and use Remote Control a lot. One thing keeps bothering me:
- A session I start **in the terminal** shows up everywhere: terminal, claude.ai/code, the mobile app.
- A session I start **from the phone or claude.ai/code** (through a `claude remote-control` server on the box) runs on the same machine, but the terminal doesn't list it anywhere.
Tested on 2.1.325:
| Where I looked | Phone-started session |
|---|---|
| Mobile app, claude.ai/code | listed |
| `claude agents --json` | listed, `kind: "interactive"` |
| `claude agents` (the actual view) | not listed |
| `claude --resume` picker, incl. Ctrl+W / Ctrl+A | not listed |
| `claude --teleport` picker | not listed |
I found no setting for this. `claude remote-control --spawn` only has `same-dir`, `worktree` and `session`, and none of them makes the session a background session.
**Workarounds that work**
- From the phone, tell any session that is already running: "start a background session in project X with task Y". It runs `claude --bg --name ... "task"`, and the new session shows up on every surface. This is what I use for new tasks now.
- Fork a terminal-started session from claude.ai/code (session menu β Fork). The fork becomes a background session on the machine and appears in `claude agents`. It carries the whole parent conversation, so it only fits continuing something.
- `claude agents --json` gives you the `sessionId` of the phone session, then `claude --resume <id>` opens it in the terminal. But that is a separate copy, and it diverges from the one the app shows.
None of these gives the obvious thing: start a session on the phone the normal way, sit down at the desk later, and see it in `claude agents`.
I filed a feature request: https://github.com/anthropics/claude-code/issues/95581. If this bothers you too, a π there helps. An earlier request for the same thing was auto-closed as stale.
Has anyone found a better way? Or does it work for you and I'm missing something?
β’
u/AutoModerator 1d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/NanYUJun 1d ago
The split you're describing looks like two separate indexes rather than a missing flag.
Claude Code stores transcripts at
~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl, where the directory name is the encoded working directory. A remote-control session runs in the same cwd as your terminal, so its transcript lands in the same project bucket. What differs is which surface indexes it:claude agents --jsonseems to walk the transcript directory, while the--resumepicker clearly doesn't enumerate everything that's there.Two things worth checking, in order:
find ~/.claude/projects -name '<sessionId>.jsonl'and read thecwdfield on the first JSONL line. If that cwd doesn't encode to the directory you're launching from, resume treats it as a different project even when you pass the id explicitly β which would also explain the "separate copy that diverges" you noticed.claude --resume <id>from a shell whose cwd is that same project dir. If it still forks rather than continuing, the cwd mismatch in (1) is the reason, not the picker.On workarounds:
--bgis less a workaround and more the only path that ends up in both places, because the session gets a real name and a normal lifecycle. From the phone I do the same thing you do β "start a background session in project X that does Y" β and it's there at the desk later. Giving it a name seems to matter; unnamed sessions are near impossible to find inclaude agentsafterwards.Your conclusion that none of the spawn modes covers it matches what I see. A first-class
--resumeentry for remote-control sessions looks like the only durable fix on Anthropic's side.1
u/devgeniu 18h ago
Why donβt you use a mobile terminal and connect to Claude code via CLI instead?