[FEATURE] Expose the session color to external tools (statusLine JSON, hook input, sessions/<pid>.json)

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 0 comments · opened Aug 16, 2026

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):

  • statusLine stdin JSON — no color field (docs, "Available data")
  • hook stdin JSON — no color field (docs, "Common Input Fields")
  • ~/.claude/sessions/<pid>.json — carries sessionId, name, cwd, status, version, messagingSocketPath, but no color
  • transcript .jsonl and ~/.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:

  1. ~/.claude/sessions/<pid>.json — cheapest, and that file already carries name and status and is already how external tools discover live sessions.
  2. statusLine stdin JSON — e.g. session.color, alongside session_id.
  3. 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

View original on GitHub ↗