[FEATURE] Expose the session color to external tools (statusLine JSON, hook input, sessions/<pid>.json)
What's missing
A session has a color (/color), but that color is not readable by anything outside Claude Code's own UI. Verified on 2.1.233 (macOS 26.6.1):
statusLinestdin JSON — no color field (docs, "Available data")- hook stdin JSON — no color field (docs, "Common Input Fields")
~/.claude/sessions/<pid>.json— carriessessionId,name,cwd,status,version,messagingSocketPath, but no color- transcript
.jsonland~/.claude.json— no color anywhere
Use case
I run several Claude Code sessions inside a terminal multiplexer (herdr). Its sidebar already shows each session's name, which it gets from the terminal title and the session state file. Users set a color per session in Claude Code precisely to tell those sessions apart at a glance — and the obvious expectation is that the multiplexer's sidebar entry carries the same color. Today it can't: the color exists only inside the pane, so the one place you scan to find a session is the one place the color can't reach.
The same applies to statusline scripts (tint the statusline to match the session), tmux/zellij status bars, and any dashboard built over ~/.claude/sessions/.
Proposal
Expose the resolved current session color as a color field in:
~/.claude/sessions/<pid>.json— cheapest, and that file already carriesnameandstatusand is already how external tools discover live sessions.statusLinestdin JSON — e.g.session.color, alongsidesession_id.- Hook stdin JSON — same common-fields treatment as
session_id.
A resolved value is what matters: a hex string such as #e07a5f, or the palette name plus its hex. A palette name on its own works too, as long as the palette is documented so a consumer can map it.
Updating it live on /color would be ideal, but even a value written once at session start covers most of the use case.
Not a duplicate
The existing color issues are all about setting or persisting a color (#36928, #58588, #74352, #75406, #78203, #82936, #86353). This one is about reading the color a session already has, from outside the process. Closest precedent in shape: #80590 (expose an activity/state field in statusLine stdin JSON).
Environment
- Claude Code 2.1.233, macOS 26.6.1 (darwin 25.6.0), CLI in a terminal multiplexer