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:

  1. LLM-generated summary — use the model to generate a 3-5 word title from the first prompt (lightweight, could use Haiku)
  2. Simple extraction — take the first N characters of the first prompt as a fallback
  3. Hook support — allow UserPromptSubmit hooks to access prompt content and provide a mechanism to trigger /rename programmatically

Additional context

  • Should not override names set explicitly via -n or /rename
  • Could be an opt-in setting (e.g. autoNameSessions: true)

View original on GitHub ↗

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