Feature request: Allow skills/hooks to set session title programmatically
Resolved 💬 4 comments Opened Mar 29, 2026 by lucascaro Closed Apr 30, 2026
Feature Request
Problem
When using skills (slash commands) to automate workflows — e.g., a /work skill that picks up the next sprint task — there's no way to update the session title to reflect what's being worked on. This makes it hard to identify sessions at a glance in the session picker.
Desired Behavior
A mechanism for skills or hooks to set the session title programmatically. For example:
- A
SetSessionTitletool available within skill execution - A hook output field that allows setting the title (e.g., in
PostToolUseor a newPostSkillhook) - A CLI flag like
claude session rename --id <id> --title "S1-07: Wave spawner"
Use Case
A /work skill that:
- Finds the next undone sprint task (e.g.,
S1-07: Wave Spawner System) - Creates a branch and starts implementation
- Sets the session title to something like
S1-07: Wave Spawner Systemso the user can identify the session later
This is especially useful in multi-agent/multi-session workflows where many sessions are created and the auto-generated titles don't capture the task context.
Alternatives Considered
- Writing to a file-based state file — works for context recovery but doesn't help with session identification in the UI
- Status line updates — useful but separate from session naming
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗