Support persistent sessionName and sessionColor in settings.json

Resolved 💬 3 comments Opened Mar 31, 2026 by valberhcustodio Closed Apr 4, 2026

Feature Request

Problem

/rename and /color are session-scoped — they are lost when running /clear (or /reset). There is no way to configure a persistent session name or color per project via settings.json.

For users working on multiple projects simultaneously, having a distinct name and color per project helps with quick identification of which terminal/session belongs to which project.

Proposed Solution

Add support for sessionName and sessionColor keys in project-level .claude/settings.json (or .claude/settings.local.json):

{
  "sessionName": "MyProject",
  "sessionColor": "green"
}

Behavior:

  • When a session starts in a directory with these settings, the name and color are applied automatically
  • /clear should preserve these values since they come from configuration, not session state
  • /rename and /color can still override them for the current session
  • Project-level settings override user-level settings (following existing precedence)

Alternatives Considered

  1. Shell aliases (alias proj="claude -n MyProject --color green") — works for startup but not after /clear
  2. Running /rename + /color after every /clear — tedious and error-prone
  3. HooksSessionStart hooks exist but cannot set session name/color programmatically

Additional Context

  • /rename and /color already work perfectly — this is just about making them configurable via settings
  • The --name and --color CLI flags exist but also don't survive /clear
  • This would follow the same pattern as other project-level settings in .claude/settings.json

🤖 Generated with Claude Code

View original on GitHub ↗

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