claude-code - 💡(How to fix) Fix [FEATURE] Allow /rename and /color to be set programmatically at session start [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58588Fetched 2026-05-14 03:44:25
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
2
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Root Cause

Cleanest, because the name and colour travel with the repo.

Fix Action

Fix / Workaround

  • project config (.claude/settings.json)
  • a CLI flag
  • a SessionStart hook
  • a skill
  • the initial prompt (claude '<prompt>' only dispatches one slash command — chaining /rename and /color after /start-session doesn't work; the second command gets consumed as text)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

note: related issues #35378, #40393, #44245 exist but are stale or partial — this consolidates the use case

I run 10+ Claude Code sessions in parallel, each launched from its own Windows Terminal profile in WSL2. Every profile runs claude '/start-session' and opens a fresh, unnamed, uncoloured session. To make the sessions distinguishable I have to manually type /rename <project> and /color <colour> in every tab, every time.

The tab-title side of this is already a known WSL2 limitation — escape sequences from Claude Code subprocesses don't reach Windows Terminal, so the in-Claude session name is the only reliable identifier I can rely on. And I can't automate it.

There is currently no way to set the session name or colour from:

  • project config (.claude/settings.json)
  • a CLI flag
  • a SessionStart hook
  • a skill
  • the initial prompt (claude '<prompt>' only dispatches one slash command — chaining /rename and /color after /start-session doesn't work; the second command gets consumed as text)

Proposed Solution

Any one of these would solve it. Listed in order of preference:

  1. Project config in .claude/settings.json: { "session": { "name": "manager", "color": "grey" } }

Cleanest, because the name and colour travel with the repo.

  1. CLI flags: claude --session-name manager --session-color grey '/start-session'

  2. SessionStart hook output — let a hook emit a JSON directive that Claude Code applies (similar to how some hooks inject context).

Alternative Solutions

Tried and ruled out:

  • SessionStart hook running shell commands — can't drive client-side UI commands like /rename.
  • Custom skill (/start-session) — skills produce model tool calls; no tool can invoke /rename or /color.
  • Chained slash commands in initial prompt — claude '/rename foo /color grey' treats everything after the first command as text. Confirmed by direct test.
  • Manual /rename + /color after launch — current workflow, doesn't scale to 10+ tabs.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

  1. I have Windows Terminal profiles for each of my projects: manager, oksitmgt, phoenix, flexilife, salesending, etc.
  2. Each profile launches claude '/start-session' in the project directory.
  3. I open 5–10 tabs at once at the start of the day.
  4. With this feature, each tab would already be named after its project and colour-coded by category (work = grey, personal = green, etc.) the moment it opens.
  5. Today I have to manually /rename and /color in every tab — ~30 seconds of friction per tab, every launch.

Additional Context

Related existing issues (mostly stale or partial — none cover the combined name + colour + project-config angle):

  • #35378 — /rename settable via --name flag or hooks (stale)
  • #40393 — --color CLI flag for session color
  • #44245 — statusline scripts setting color and name via JSON control messages
  • #47332, #44618, #36928 — project-level session colour config (duplicate / stale)

Environment: Claude Code CLI on WSL2 (Ubuntu 24.04) inside Windows Terminal, multi-project workflow.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Allow /rename and /color to be set programmatically at session start [2 comments, 3 participants]