Expose /rename as a tool so skills/commands can set session names programmatically

Status Closed — not planned
Maintainer reply None cached
Activity 5 comments · opened Mar 11, 2026 · closed Apr 30, 2026

Problem Statement

Custom slash commands (skills) know exactly what they're doing at invocation time, but have no way to name the session they're running in. /rename is a built-in CLI command that only works when typed manually by the user — it's not available as a tool, via Bash, or through any programmatic interface.

This means a command like /daily (a daily planning check-in) can't auto-name itself daily — Wed Mar 11 even though the context is obvious from the first moment.

Use Case

I have a /daily slash command that runs a structured daily check-in. Every time I use it, I want the session named daily — [date] so I can find it later in claude --resume. Today I have to manually type /rename daily — Wed Mar 11 after the command starts, which defeats the purpose of automation.

Proposed Solution

Any of these would work:

  1. Expose /rename as a tool that Claude can call programmatically (e.g. SessionRename tool)
  2. Allow frontmatter in command .md files to specify a session name template:

``yaml
---
name: daily
session-name: "daily — {{date}}"
---
``

  1. Expose a Bash-callable interface like claude session rename "daily — Wed Mar 11"

Option 1 is the most flexible since it works for any skill at any point in the conversation.

Related Issues

  • #32548 — Session naming templates in CLAUDE.md (similar spirit, different mechanism)
  • #32434 — Auto-naming during plan mode

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗