[FEATURE] allow skills to programmatically rename 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
Skills can instruct Claude to perform actions using tools (read/write files, run bash commands), but they cannot interact with Claude Code's own session management. Specifically, there's no way for a skill to rename the current session.
Proposed Solution
Provide a mechanism for skills (or Claude in general) to programmatically rename the current session. Some options:
- Expose
/renameas a tool that Claude can invoke during a conversation - Add a session management tool with actions like rename, that skills can reference
- Allow bash access to session metadata via an env var or file path that can be written to
Any of these would let skills automate session naming as part of their workflow.
Alternative Solutions
The skill outputs a suggested /rename command for the user to copy-paste manually.
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
I have a custom /save-issue skill that saves conversation content to a dated markdown file (e.g., 2026-02-11-01-claude-code-session-rename-feature-request.md). It would be natural for the skill to also rename the session to match the saved filename, so my session list stays organized.
Additional Context
_No response_
11 Comments
This would be VERY useful. Any of the "Proposed Solution" options would be good, I think "Alternative Solutions" would not work as the session can't rename itself that way can it?
+1
would be very helpful
Created a workaround for vs code tabs + info in statusline
https://github.com/dxrayhq/claude-session-labels
<img width="400" height="400" alt="Image" src="https://github.com/user-attachments/assets/0e753cad-e306-43ed-a83b-7741b1a6c486" />
+1 from a power user running 6 concurrent sessions on an ultrawide monitor.
My setup: I run 6 Claude Code VS Code sessions tiled in a 3x2 grid on a 3440x1440 ultrawide. Each session handles a different task. I built a nudge system that speaks reminders ("Hey James, back over here on the Postgres session, the red one"), shakes the window, and flashes a colored border when a session needs attention.
The missing piece: tab names go stale fast. A session that started as "Pull all updates" might pivot to error handling audits 10 minutes in, but the tab still says "Pull all updates." With 6 panels competing for attention, accurate names are critical for navigation.
What I would use:
/rename "new title") callable from within the sessionThe infrastructure is already there — the extension generates and sets a title from the first message. Exposing that for updates would be a small change with big UX impact for multi-session workflows.
Coming at this from running ~50 Claude Code sessions per week where the session title is the workflow state. If the name is wrong, Resume Session becomes a guessing game across 8 active projects. So I built the workaround and have been living on it for 2 days.
Option 3 from the OP works. Option 1 does not, because the Skill tool rejects \
/rename\with \rename is a UI command, not a skill\.What works today
name\field lives at \~/.claude/sessions/<pid>.json\. The file has keys pid, sessionId, cwd, startedAt, version, kind, entrypoint, name.name\key persists immediately. The next session-picker load shows the new name.Our helper (~100 lines of bash and Python, shipped in production)
~/.claude/sessions/*.json\by sessionIdname\field via tempfile and \os.replace\This has been running for two days across multiple sessions with zero issues. But it is structurally fragile because the \
sessions/<pid>.json\schema is undocumented implementation detail. One CC upgrade that renames \name\to \title\or changes the file location silently breaks it.Specific asks in priority order
session.rename\as a first class tool) is the cleanest. ~30 LOC of Tool handler./rename\slash command should keep its current allowlist behavior (manual user input only). Mid session refinement via Skill or Tool needs a separate path because \/rename\is cognitively invisible to agents.Can open-source the helper if maintainers want a reference implementation against the undocumented schema.
It would be a very effective and good method.
+1 Would be really useful in combination with skills
+1000 please!
When using routines combined with the remote control in the phone app, it is very difficult to tell which session is which because they are assigned random names.
Allowing the agent to rename its session would massively improve usability!
Bump. This seems like a must-have when automating workflows
Including this would be very helpful.