Feature Request: Include session name in status line data

Resolved 💬 3 comments Opened Feb 27, 2026 by jlu-barracuda Closed Mar 2, 2026

Feature Request

Add session name/ID to the status line output

Current Behavior

The status line (via /status-line or --status-line-fd) provides context window usage and cost information, but doesn't include session identification.

Requested Behavior

Include the session name (or session ID as fallback) in the status line JSON output. This would allow users to:

  1. Identify which Claude Code session is running in their terminal/tmux status bar
  2. Distinguish between multiple concurrent sessions
  3. Have meaningful session context visible at a glance

Suggested Implementation

Add to the status line JSON:

{
  "session_id": "abc123def",
  "session": {
    "name": "my-feature-work"
  }
}

Use Case

When using tmux or terminal status bars with custom status line scripts, users can display:

  • my-session | $0.42 | 15.2K/200K tokens (7.6%)
  • Or with ID fallback: abc123def | $0.42 | 15.2K/200K tokens (7.6%)

This makes it easy to track which session is which when working on multiple tasks.

Additional Context

Session names can be set via /name <session-name> command, so this data already exists within Claude Code.

View original on GitHub ↗

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