Back to browse
GitHub Repository

Auto-generated session titles + per-session colors in the Claude Code statusline.

31 starsShell

Auto-generated titles and colors for parallel Claude Code sessions

by julien421·Apr 20, 2026·3 points·0 comments

AI Analysis

●●SolidCozySolve My Problem

Auto-titles from Haiku in ~10ms so parallel Claude sessions stay visually distinct.

Strengths
  • Background Haiku call returns in ~10ms without blocking prompt submission
  • Session ID hash produces consistent per-session colors across restarts
  • Dispatcher pattern handles plugin updates without breaking statusline config
Weaknesses
  • Only works for Claude Code users — extremely narrow audience
  • Requires three restarts and manual setup command to wire statusline
Category
Target Audience

Developers running multiple Claude Code sessions

Post Description

I run three to seven Claude Code sessions in parallel terminals, and I kept losing track of which was doing what, especially toward the end of the day when your mind is so tired with the constant context-switching.

which-claude-code is a small plugin that adds a title and color to each Claude Code, so you know right away which Claude Code session does what.

1. On every prompt submit, a UserPromptSubmit hook forks a background claude -p --model haiku call that reads the last few transcript turns and writes a 3-6 word title to ~/.claude/which-claude-code/titles/<session_id>.txt. The hook returns in ~10ms so the prompt isn't delayed.

2. A statusline script prints ● <title> · <model> · <cwd> (<branch>) on every render. The dot and title are tinted from a 20-color palette hashed off the session ID.

Enjoy!

Similar Projects