Dynamic session context label with color coding for multi-session workflows

Resolved 💬 5 comments Opened Mar 22, 2026 by dakevinci Closed May 23, 2026

Current Behavior

Session titles automatically update and show in terminal window title now but I can't find a way to have it show above the textbox input in Terminal like using "/rename".

/rename only allows static manual hardcoding now and isn't based on session. I can't find documentation to show the SessionStart title. If it can be dynamic it'd be even better (colors for workflow efficiency). Also, having it appear where /rename appears in Terminal is more logical when managing multiple sessions.

The terminal tab title auto-generates from the first message (v2.1.79), but the in-terminal context label above the text field does not update dynamically. There is no documentation for making /rename dynamic or for changing the label color.

Screenshot — two sessions side by side, identical teal labels:

(see attached screenshot)

Problem

In multi-session workflows (4-6 concurrent terminals), every session looks identical — same teal color, and the context label only shows if manually set via /rename. Visual differentiation requires reading text, not glancing at colors. The terminal tab title (top of window) auto-generates but the in-terminal label (above the input field) does not.

Proposal

1. Dynamic session context label

Allow the in-terminal session label to update as the conversation evolves — not just at session start or via manual /rename. The title generation logic from v2.1.79 already works for terminal tabs. Apply it to the in-terminal label too, and re-run it periodically or on topic shift.

2. Color-coded session labels

Let users assign colors to the session label — manually per session, or automatically by project directory. Example: blue for frontend, red for security, green for research. Instant visual identification without reading text.

Security Consideration

I understand the label is likely static for security reasons — computing it mid-session requires access to conversation context, which has prompt injection and data leakage implications (a malicious tool result could influence the title, or the title computation could leak session content through side channels).

Patterns that could make mid-session updates safe:

  • Privilege separation (Provos et al., 2003): Title generation runs in a sandboxed subprocess that receives only a sanitized conversation digest, not raw content. Same principle as OpenSSH's privilege separation — the title generator has read access to a summary, not the full conversation.
  • Differential privacy for topic extraction: Pass only a noisy bag-of-keywords to the title generator instead of conversation content. The title reflects the general topic without exposing specifics. Used in Apple's telemetry (WWDC 2016) and Google's RAPPOR.
  • Opt-in with explicit risk acknowledgment: Users who want dynamic titles accept the tradeoff — similar to how skipDangerousModePermissionPrompt works today. Power users managing 6+ sessions benefit enough to accept the risk. Default remains static.
  • Merkle-verified context summaries: A system like Engram (brain-modeled tiered memory with PQC encryption and Merkle integrity verification) could provide verified session summaries to the title generator. The Merkle proof ensures the summary is authentic and untampered. The encryption ensures the summary pipeline doesn't leak data at rest. This keeps the title generator's input integrity-verified while maintaining least-privilege access.

Prior Art

  • VS Code: color-codes workspace folder tabs
  • tmux: per-window status bar colors
  • iTerm2: tab colors configurable per profile
  • Chrome/Arc: Tab Groups with color labels
  • Claude Code v2.1.79: already auto-generates terminal tab titles from first message — this proposal extends that to the in-terminal label

Environment

  • macOS, Claude Code v2.1.81
  • Typical workflow: 4-6 concurrent Claude Code sessions across different projects

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗