Feature request: persistent project-level session name

Resolved 💬 3 comments Opened Mar 11, 2026 by cristoslc Closed May 27, 2026

Feature Request

Problem

When working in a project, I want the session window to always be named a specific thing (e.g., the project name). Currently, /rename is the only way to set the session name, but it resets on /clear since that creates a new session.

Attempted workarounds

  • SessionStart hooks: Can inject additionalContext asking Claude to run /rename, but Claude can't invoke slash commands programmatically
  • Skills: No exposed API or storage mechanism for session metadata, so a custom skill can't replicate /rename
  • CLAUDE.md instructions: Would burn tokens every turn just to remind Claude to rename

Proposed solution

A project-level setting in .claude/settings.json for a default session name:

{
  "sessionName": "swain"
}

This would automatically apply the name on startup, clear, and resume events without requiring manual /rename each time.

Alternatives considered

  • A --session-name CLI flag (useful but doesn't help with /clear)
  • Making /rename survive /clear (would require changing /clear semantics)
  • A hookable setSessionName() API exposed to skills/hooks

View original on GitHub ↗

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