Skip to content

feat: show Claude Code session title instead of directory name (#417) - #524

Closed
divingsbysangam wants to merge 1 commit into
vinzdg:mainfrom
divingsbysangam:feat/claude-session-title
Closed

divingsbysangam wants to merge 1 commit into
vinzdg:mainfrom
divingsbysangam:feat/claude-session-title

Conversation

@divingsbysangam

Copy link
Copy Markdown
Contributor

Resolves #417

Motivation

When multiple Claude Code sessions are open in the same workspace, each session was previously labeled with the folder name plus a short suffix (e.g. marketing-hub-e0), making it difficult to distinguish chats without switching to them.

Solution

Extract the session title from the Claude Code transcript (~/.claude/projects/<slug>/<sessionId>.jsonl) following the priority:

  1. User's manual /rename title (custom-title entry with customTitle)
  2. Latest auto-generated AI title (ai-title entry with aiTitle)
  3. Fall back to existing folder-based label (session.name)

Key Changes

  • ClaudeTranscript: Added title(at:) and title(in:) state machine to parse and extract the effective session title from transcript JSONL data.
  • ClaudeTranscriptReader: Integrated title(sessionID:cwd:) with the existing modification date and file size cache, avoiding extra disk reads or stat calls.
  • ClaudeSessionRecord: Added session(name:) and session(name:state:since:) helpers to update the display session name with the transcript title.
  • ClaudeSessionMonitor: Updated state(of:transcripts:) to apply the transcript title to both desktop and terminal sessions while preserving terminal-specific state (such as waitingFor: permission).
  • Unit tests added to ClaudeTranscriptTests and ClaudeSessionTests verifying precedence rules and fallback behaviors.

…g#417)

- Extract session titles from Claude Code transcripts
- Prefer manual /rename customTitle over generated aiTitle
- Fall back to folder-based name when no transcript title is recorded
- Cache transcript title reads alongside activity status in ClaudeTranscriptReader
@vinzdg

vinzdg commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Thanks! #510 fixed the same issue (#417) and is now merged: it reads the title from the 64 KB transcript tail Codenotch already reads, and only replaces names Claude Code derived itself, so I'm closing this as a duplicate.

@vinzdg vinzdg closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: show the Claude Code session title instead of the folder-based name

2 participants