Feature request: set session color at launch (--session-color flag or sessionColor setting)
Is your feature request related to a problem?
I run several concurrent Claude Code sessions, each dedicated to a lane of work (local test runner, remote test deploys, mobile builds, ticket triage), and I use /color to tell the sessions apart at a glance. Each lane is launched from a shell wrapper (claude --blue, claude --green, ...) that passes a lane-specific slash command as the startup prompt.
The session colour can't be set the same way. /color is interactive-only:
- no CLI flag (
--session-coloror similar) - no environment variable
- no settings.json key
- SessionStart hooks can only return context/metadata, they can't execute slash commands
- only one startup prompt can be passed positionally, so you can't chain
/color bluewith another command
The only workaround I found is macOS System Events keystroke injection from the wrapper (sleep 4, then literally type /color blue⏎ into the window), which needs Accessibility permission and breaks if the window loses focus during launch.
Describe the solution you'd like
Any one of:
- a
--session-color <color>CLI flag - a
sessionColorsettings.json key (usable via--settings) - hooks being able to queue slash commands at session start
Option 1 is the simplest and composes with wrapper scripts.
Additional context
Claude Code v2.1.211, macOS (Warp terminal). Colour-per-lane makes multi-session workflows much easier to keep straight; would be great for this to be scriptable.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗