Claude Code status line
which-claude-code
Adds auto-generated session titles and a distinct colour per session to the status line.
Install
/plugin marketplace add jbarbier/which-claude-codegit clone https://github.com/jbarbier/which-claude-code.gitFrom the README
which-claude-code Auto-generated session titles + per-session colors in the Claude Code statusline. If you run several Claude Code sessions in parallel terminals, you've probably asked yourself: *which tab was the one fixing the auth bug? which was the one writing tests?* This plugin answers that question automatically, without you having to name anything. After every prompt you submit, a tiny background Haiku call distills your intent into a 3-6 word title. It shows up in the statusline, tinted with a color uniquely hashed from the session ID. Same session = same color, forever. Different sessions = visually distinct at a glance. The trailing ctx: / 5h: / 7d: segments show current context-window, five-hour, and seven-day usage. Each segment renders only when Claude Code provides the corresponding field, so older builds are unaffected. A freshly-reset window shows .txt. The hook itself returns in ~10ms so your prompt is never delayed. 2. Statusline (bin/statusline.sh) — reads that file on every render, printing ● · · (). The title is colored from a 20-color palette, indexed by cksum(session_id), so the mapping is stable for the life of the session. State lives under ~/.claude/which-claude-code/ (overridable via $WHICH_CLAUDE_CODE_STATE_DIR). Nothing else is touched. Defensive note for maintainers — recursive Claude subprocess calls If you fork this plugin or write a similar one: read this. Any hook that shells out to claude -p (or any Claude Code subprocess) can trigger unbounded recursion. The child claude -p inherits the user's ~/.claude/settings.json and enabled plugins, so its own UserPromptSubmit event fires — re-invoking the same hook, which spawns another claude -p, and so on. Detached and disowned, the chain survives the user closing…
How status lines work
- A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
- Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
- Or run /statusline inside Claude Code and describe what you want.
Details
- Repository
- jbarbier/which-claude-code
- Type
- Status lines
- Language
- Shell
- License
- MIT
- Last updated
- 24 April 2026
FAQ
What is which-claude-code?
Adds auto-generated session titles and a distinct colour per session to the status line. It is a status line for Claude Code, from jbarbier/which-claude-code on GitHub.
How do I install which-claude-code?
Run /plugin marketplace add jbarbier/which-claude-code inside Claude Code, then follow the setup in the README.
Is which-claude-code popular?
jbarbier/which-claude-code has 33 GitHub stars and 8 forks. It was last updated on 24 April 2026.
More status lines
Ccpet
64terryso/ccpet
A virtual pet for your Claude Code status line.
Claude Statusline
54videvjs/claude-statusline
Custom status line for Claude Code — folder, git branch, model, context & rate limits
claude-usage-line
40canack/claude-usage-line
A status line with rate limits, git branch, cost and diff stats.
CC-Statusline-Builder
34denki-san/CC-Statusline-Builder
A web-based builder where you pick a status line theme and copy a one-line install command.
Headroom
70henchmarketing-rgb/headroom
Know your headroom. Context window usage bar for Claude Code.
tail-claude-hud
33kylesnowschwartz/tail-claude-hud
A terminal status line HUD for Claude Code sessions.
Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.