[FEATURE] Feature request: expose a "rename session" tool to the agent (ccd_session_mgmt)
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
The cloud-synced session list is great for controlling multiple machines from the mobile app, but it does not indicate which machine each session belongs to. Titles are auto-generated from conversation content, so sessions from different machines look identical in the list.
I asked Claude to establish a naming convention — prefixing every session title with the machine's username, e.g. (g2950) Unity project — so I can tell my machines apart at a glance. However, Claude cannot apply it: the session management tools exposed to the agent (ccd_session_mgmt) only include list_sessions, search_session_transcripts, send_message, and archive_session. There is no rename/retitle tool, even though renaming already exists in the app UI (and is arguably lower-risk than archive_session, which is already exposed).
Proposed Solution
Add a rename_session (or set_session_title) tool to ccd_session_mgmt, accepting a session ID (or the literal "self" for the current session) and a new title string.
With that, users could set up automatic naming conventions in their CLAUDE.md (e.g. "always prefix the session title with $env:USERNAME") and the agent could enforce them without any manual steps.
Alternative Solutions
- A user-level setting like
sessionTitlePrefixthat the app automatically prepends to auto-generated titles on each machine — this would solve my specific case without exposing a new agent tool. - Showing the origin machine (hostname) as metadata next to each session in the app's session list, so no naming convention is needed at all.
- Current workaround: Claude generates the desired title as copyable text and I rename the session manually in the app UI — works, but defeats the point of an automated convention across many sessions and machines.
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
I keep several Windows machines (home desktop, office PC, a remote standby workstation) running Claude Code desktop, and control them remotely from my phone via the cloud-synced session list. Every new session should be titled (<machine username>) <topic>, e.g. (g2950) Unity project.
Desired flow: a rule in CLAUDE.md says "on every new session, rename it with the machine-name prefix" → Claude calls rename_session("self", "(g2950) Unity project") at the start of the session → I can instantly tell my machines apart from my phone.
Today Claude can only print the suggested title and ask me to rename manually, for every single session.
Additional Context
- Claude Code desktop on Windows 10 Pro, version 2.1.202
- Multi-machine setup, sessions accessed remotely from mobile via cloud sync
- This request came out of an actual conversation where Claude searched its available tools, confirmed no rename capability exists, and drafted this issue as the workaround. 🐀👨🍳
...
This request was actually made by my AI agent; I'm currently no different from a young chef being controlled by rats.
4 Comments
I have a similar use case writing tooling and I want to programatic rename sessions or trigger the autorename.
So basically the same functionality as
/rename, though accessible from outside.Ideally there would a
claudesubcommand which would allow this.Something like:
or similar.
The rename-session gap compounds quickly when you're running parallel sessions across machines or git worktrees. Auto-generated titles based on first-message content work fine for single-session use but become actively misleading once you have 3-4 sessions running: two of them might open with identical messages ("implement the auth changes") and become indistinguishable in the list.
The
/renameslash command exists in the TUI, which confirms the underlying data model supports custom titles. Exposing that to agents viaccd_session_mgmtis the logical next step.A few related gaps worth calling out in the same ticket scope:
autorenametrigger. The suggestion above about a programmatic autorename (let the model pick a title based on accumulated context) would be more useful mid-session than at start, since the first message is often too generic.The
create_sessionFR (#66126) is upstream of this one -- if orchestrators can spin up sessions programmatically, they can pass a meaningful title at creation time rather than patching it after the fact.Adding a measured data point from Claude Code v2.1.219 (desktop app, Windows):
ccd_session_mgmtdoes now exposeset_session_title— but it is scoped to other sessions only, so the ask in this issue is still unmet.Measured today:
| Attempt | Result |
|---|---|
| Rename another session (idle or actively running) | works |
| Rename the current session |
Refusing to rename the current session from within itself.|| Find the current session's own id |
list_sessionsexcludes it;get_sessionreturnsRefusing to return the current session; use list_sessions for other sessions or your own session context for this one.|| Rename the parent session from a subagent | identical refusal — a subagent is treated as being inside the parent session, so that is not a workaround |
| Nonexistent id (control) |
Session <id> not found.— a different message, so the refusal above is a deliberate guard rather than a lookup failure |That last row is the point: the store plainly supports retitling a live session, since it does exactly that for other running sessions. Only the caller-is-self path is blocked. So the
"self"literal proposed here is precisely the missing piece.A second use case, in case it helps weigh this. I keep a coordinate-based backlog (
R-139 (session-title-convention)) and want every session titled@<date> <coordinate> (<name>), where the leading@means "this coordinate is still open". The agent can derive that entire string from the backlog files on the first turn — it simply cannot apply it to itself, so a human retypes it every session. Renaming other sessions does not substitute: judging whether a different session's work is finished is a separate call, and an unrelated new session is the wrong place to make it.One precedent that may be relevant: accepting a plan in plan mode already names the session from model-generated content. A model→title path therefore exists in the harness; this request is essentially to make it callable directly.
+1 — hit this exact wall today, with a concrete unattended use case and some test results that may save others time.
We run scheduled/unattended Claude Code sessions through a roadmap pipeline (claim → RFC → build → PR → review). The one participant that knows the pipeline state at each moment is the session itself — but it's the only one that can't put that state in the session list:
set_session_titlewith the session's own id:Refusing to rename the current session from within itself.session_id: "self": not supported — even thougharchive_sessionalready has aselfsentinel, so the concept exists in the server.Why it matters for unattended fleets: auto-titles summarize the first prompt, so every scheduled run of the same routine gets an identical title, and a run that stops blocked on a human keeps its opening-prompt title — it reads as finished-clean in the session list, which is the worst possible failure mode for "does anything need me?".
Workarounds we tested, all dead ends:
planPathbut lefttitle/titleSource: autountouched, so it appears to be a CLI-surface feature; and the accept needed a human click anyway.A
self-capable rename (or lifting the self-restriction, opt-in via permission rule if impersonation is the concern) would let sessions surface pipeline state — e.g.🤖🔴 <item> — BLOCKED: needs human— exactly where humans scan for it.