Expose auto-generated session title in statusline JSON

Resolved 💬 3 comments Opened Apr 17, 2026 by heiselbenz Closed Apr 21, 2026

Summary

The custom statusline script receives a JSON blob via stdin with session metadata. The session_name field is only populated when the user manually sets a name via --name or /rename. However, Claude Code also auto-generates session titles (visible in claude --resume) — these are not exposed in the statusline JSON.

Request

Please include the auto-generated session title in the statusline JSON input, so custom statusline scripts can display it.

Current behavior

  • session_name is only set for manual renames (/rename or --name flag)
  • Auto-generated titles (derived from conversation content) are not passed to the statusline script
  • Auto-generated titles are only visible when browsing session history via claude --resume

Expected behavior

A field (e.g. session_title or reuse session_name) that always contains the session's display title — whether manually set or auto-generated.

Why this matters

Custom statuslines are a great way to keep track of what you're working on at a glance. The auto-generated title is often more descriptive than nothing, and it would be useful to display it in the status bar without requiring a manual /rename every time.

Workaround attempted

We tried reading from sessions-index.json and the JSONL transcript, but auto-generated titles appear to be computed on-the-fly (likely from firstPrompt) and aren't persisted in a way that's accessible to the statusline script.

🤖 Generated with Claude Code

View original on GitHub ↗

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