Feature: Hook output field to set session title (setSessionTitle)
Resolved 💬 3 comments Opened Apr 5, 2026 by gssptraders Closed Apr 8, 2026
Summary
Add a setSessionTitle (or similar) JSON output field for hooks — specifically SessionStart — so users can programmatically name their conversations.
Use Case
As a power user running multiple concurrent Claude Code terminal sessions, I want to name each session at startup so I can identify them later in the session picker. Currently:
- Session titles are auto-generated from the first message
- There's no way to override or set a title programmatically
- No hook output field exists for session metadata
Proposed Behavior
A SessionStart hook could return JSON like:
{
"sessionTitle": "Web UI Reorganization"
}
Or combined with an elicitation/prompt to ask the user:
{
"additionalContext": "Please name this session",
"sessionTitle": "<user-provided value>"
}
Why Hooks?
The hook infrastructure already supports SessionStart events and JSON output with fields like additionalContext and decision. Adding a metadata field like sessionTitle would be a natural extension.
Alternatives Considered
- Manual rename command (e.g.
/rename) — would also work but hooks allow automation - Branch name as proxy — works for git repos but not general purpose
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗