[FEATURE] Programmatic session rename API for skills/agents

Resolved 💬 1 comment Opened Jun 1, 2026 by heidi-alps Closed Jul 4, 2026

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

Summary

Claude Code currently has no agent-callable mechanism to rename the current session.
Only the user can run /rename. This blocks skill/agent flows that want to reflect
work context (e.g. a Jira issue key) in the session title automatically.

Use case

Our team has a skill (isv-start) that:

  1. Verifies/creates a Jira ticket
  2. Creates a matching git branch (e.g. isv/1234)
  3. Wants to rename the session to ISV-1234 so the sidebar/tab matches the work

The skill's bash script emits a marker like <<RENAME-SESSION KEY=ISV-1234>> and the
SKILL.md instructs the host agent to "rename the session". Today this requires the
user to manually type /rename ISV-1234, which breaks the otherwise-automated flow.

What we tried

  • mcp__ccd_session__mark_chapter — only sets a chapter divider inside the session,

not the session title in the sidebar/tab.

  • PostToolUse / Stop hooks — cannot execute slash commands.
  • systemMessage JSON output from hooks — informational only, no action.

Proposed APIs (any of these would work)

  1. MCP tool: mcp__ccd_session__rename taking { name: string }.
  2. Hook output field: e.g. hookSpecificOutput.sessionRename: "ISV-1234".
  3. Permission rule: a tool like SessionRename(...) that can be approved

per-skill so the host can call it without user typing.

Why this matters

  • Improves multi-session workflows (multiple Jira tickets in parallel)
  • Removes the manual /rename step from automated skill flows
  • Mirrors terminalTitleFromRename semantics already supported in settings.json

Environment

  • Claude Code v2.1.154 (current as of writing)
  • macOS / WSL

Thank you!

Proposed Solution

Proposed APIs (any of these would work)

  1. MCP tool: mcp__ccd_session__rename taking { name: string }.
  2. Hook output field: e.g. hookSpecificOutput.sessionRename: "ISV-1234".
  3. Permission rule: a tool like SessionRename(...) that can be approved

per-skill so the host can call it without user typing.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗