Programmatic session naming — hook-callable rename + Skill tool as hook target

Open 💬 5 comments Opened Apr 7, 2026 by alex-modrongroup

Problem

When running multiple sessions across repos and skills, session titles default to generic names, creating working memory tax when switching between them. Manually renaming is possible but breaks flow.

Two missing pieces block automation:

  1. No hook-callable rename — \/rename\ exists but is interactive-only. Hooks (shell commands) have no mechanism to set or update the session title.
  2. Skill tool isn't hookable — \PreToolUse\/\PostToolUse\ support named tools (\Bash\, \Edit\, \Agent\, etc.) but \Skill\ isn't a matchable target, so there's no hook point when a skill is invoked.

Proposed solution

  • Expose session rename via hook output — e.g., a structured JSON field hooks can return: \{"session_title": "wolf-way goforit"}\
  • Add \Skill\ as a matchable tool name in \PreToolUse\/\PostToolUse\ hooks, with \tool_input.skill\ in the hook payload

Desired behavior

A \PreToolUse\ hook on \Skill\ fires, reads \tool_input.skill\, sets the session title to \{repo} {skill}\ — session is named before the skill even runs. Zero manual steps.

Scope

Applies to Claude Code CLI today. Claude Desktop would benefit from the same platform capability once available.

View original on GitHub ↗

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