Feature request: Auto-rename sessions based on first user prompt
Resolved 💬 2 comments Opened Mar 18, 2026 by Ziltosh Closed Mar 18, 2026
Problem
Currently, Claude Code sessions are not automatically named based on user input. The only auto-rename behavior occurs in Plan Mode when a plan is accepted. This makes it hard to find past sessions in history.
Current workarounds
- Manually name at launch:
claude -n "session-name" - Rename during session:
/rename session-name - Use Plan Mode (limited auto-rename on plan acceptance)
- Shell wrapper script (only works in non-interactive mode with
-p)
None of these solve the core UX problem of sessions being easy to identify at a glance.
Proposed solution
Automatically generate a short session name from the first user message, similar to how ChatGPT/Claude.ai name conversations. This could be:
- LLM-generated summary — use the model to generate a 3-5 word title from the first prompt (lightweight, could use Haiku)
- Simple extraction — take the first N characters of the first prompt as a fallback
- Hook support — allow
UserPromptSubmithooks to access prompt content and provide a mechanism to trigger/renameprogrammatically
Additional context
- Should not override names set explicitly via
-nor/rename - Could be an opt-in setting (e.g.
autoNameSessions: true)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗