[FEATURE] Keep the remote-control server name in generated titles of spawned sessions
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I run several claude remote-control servers on one machine, each for a different repository, each with --spawn worktree so that every session gets its own worktree. From the phone or claude.ai/code I end up with a list of sessions such as "App responsiveness and performance", "Security review", "Take a look at this game", and there is nothing in the title that says which server or repository the session runs in.
When something goes wrong (in my case a long session kept returning 529 Overloaded and I wanted to find its debug log on the host), I had to grep the systemd journal for the session title, then map that back to a session ID, host, and worktree. On the machine the only reliable identifiers are the spawned process's --session-id argument and its working directory; none of that is visible in the app.
Today the title is chosen in this order (per the Remote Control docs): the name passed to --name, a /rename, the last meaningful message, then an auto-generated placeholder. In spawn mode --name names the server, not the sessions it spawns, and --remote-control-session-name-prefix only affects the placeholder, which is replaced by the generated title after the first prompt. So the server name is lost from the title before the user ever sees it.
Proposed Solution
For sessions spawned by a claude remote-control server, keep the server's name as a prefix on the generated title, for example carbidelist: App responsiveness and performance. The prefix should survive the automatic title refresh from the first prompt, and a /rename should still replace the whole title.
A flag on the server would keep current behavior for anyone who prefers it, for example --spawn-title-prefix <text> defaulting to the --name value, or an opt-out.
Alternative Solutions
- Let a hook set the session title.
SessionStartalready receives the working directory and could return asessionTitle(or similar) field. Hooks can set the terminal window title today but not the session title. - Renaming manually with
/renameat the start of every session. This works but depends on remembering to do it. - Grouping in the app by environment does show the server, but the session list and notifications show only the title.
- On the host I wrote a small script that reads each spawned process's
--session-idand working directory from/procand prints the parent server's--name. That solves it on the machine, not in the app.
Priority
Medium - Would improve my workflow
Additional Context
Claude Code 2.1.257 on Linux, servers run as systemd user units with --spawn worktree --no-create-session-in-dir --capacity N.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗