Skip to content

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

Description

@burtherman

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:
    ---
    name: daily
    session-name: "daily — {{date}}"
    ---
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions