Session naming: allow CLAUDE.md or settings to define a session title template

Resolved 💬 3 comments Opened Mar 9, 2026 by awesomeboris Closed Apr 22, 2026

Feature Request

Allow users to define a session naming convention via CLAUDE.md or settings.json, so that sessions are auto-titled with a consistent format rather than being derived from the first message content.

Use Case

I work across multiple projects (CAD modeling, 3D printing pipelines, robotics, etc.) and want sessions to be immediately identifiable by project in the sidebar. Currently all sessions get generic auto-titles like "Fix color map bug" with no project context.

Desired format: BEADVASE: Fix color map bug — project name in caps, then description.

Currently the only way to name sessions is manually via /rename or pressing R in the resume picker, which is easy to forget and adds friction.

Proposed Solution

A sessionNameFormat setting (in settings.json or as a CLAUDE.md directive) that supports template variables:

{
  "sessionNameFormat": "{PROJECT}: {summary}"
}

Or in CLAUDE.md:

## Session Naming
Format: "{PROJECT}: {summary}"

Where:

  • {PROJECT} = derived from the working directory name or a project-level config value
  • {summary} = the auto-generated session description (current behavior)

Alternatives Considered

  • A SessionCreate hook event that could set session metadata — would also work but is more complex
  • A --session-name CLI flag — useful for scripted launches but doesn't help with interactive use
  • CLAUDE.md instruction to Claude — Claude can't actually set the session title programmatically, so this doesn't work

Additional Context

Users with multiple projects would benefit most. The sidebar currently gives no visual indication of which project a session belongs to, making it hard to find past sessions.

View original on GitHub ↗

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