[Feature Request] Support dynamic templates in session-name badge

Resolved 💬 2 comments Opened Jun 3, 2026 by bcs-vigneshk Closed Jun 7, 2026

Bug Description
' Feature request: support dynamic templates in the session-name badge (top-right of the prompt area)

Today, the small badge that sits above the prompt input — top-right corner, shows the renamed session string — only displays the static session name. It can be changed via /rename,
but the value is fixed for the life of the session.

The statusline (bottom of the screen) already supports a user-customizable script that receives session_id, transcript_path, workspace.current_dir, model, agent, context_window, etc.
via stdin JSON, and emits dynamic colored output on every prompt render.

Please extend the same mechanism to the top-right session badge. Concretely:

  • Allow a sessionBadge (or similarly named) setting in ~/.claude/settings.json that points at a script or template, mirroring how statusLine works today
  • Same JSON input contract as the statusline script
  • Same color/ANSI passthrough

Use case: I'd like the badge to show cwd ⎇ branch # short-session-id so that which of several open Claude Code sessions I'm looking at is identifiable at a glance, even when the
session name itself stays generic. Right now the badge area is wasted real estate — it always shows the same string and never reflects the actual working context.

Bonus if multi-line / styled content is supported.
'

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.160
  • Feedback ID: ed620496-86dd-4701-87cc-5f41fc0b9e3e

Errors

[]

View original on GitHub ↗

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