fall back to the AI-generated title, and mark Remote Control sessions
Summary
display.showSessionName renders nothing in sessions that were never /renamed, even when Claude Code has already generated a title for them. The parser reads custom-title and slug, but ignores the ai-title record. Separately, nothing in the HUD shows when a session is being driven through Remote Control.
Problem to Solve
parseTranscript resolves the session name from two record types only:
// src/transcript.ts:558
if (entry.type === 'custom-title' && typeof entry.customTitle === 'string') {
customTitle = entry.customTitle;
} else if (typeof entry.slug === 'string') {
latestSlug = entry.slug;
}Claude Code also writes its own generated title as a separate record:
{"type":"ai-title","aiTitle":"DevOps brief 0.1.22 community store update","sessionId":"…"}In the session I checked, that record was the only name present — no custom-title, and "slug" appeared 0 times in the entire transcript. So the setting was on, a name existed, and the element rendered empty (src/render/session-line.ts:146 and src/render/lines/project.ts:134 both guard on a non-empty sessionName).
A related gap: a session driven from Remote Control carries records like
{"type":"bridge-session","sessionId":"…","bridgeSessionId":"cse_…","ownerAccountUuid":"…"}Nothing surfaces them, so a local terminal and a remotely driven session look identical in the HUD.
Proposed Solution
- Resolve the session name as
custom-title→ai-title→slug, keeping the lastai-titleseen. An explicit/renamestill wins, and the generated title fills the gap instead of rendering nothing. - Optionally, add a Remote Control indicator — say
RCbeside the session name, behind adisplay.showRemoteSessionflag, set when the transcript holds abridge-sessionrecord. The record's presence is enough;bridgeSessionIdandownerAccountUuidare identifiers and shouldn't be rendered.
Happy for item 2 to become its own issue if you'd rather keep them separate.
Alternatives Considered
- Run
/renamein every session. Works, since it writes thecustom-titlethe parser already reads, but it makes the user do by hand what Claude Code has already done. - Put the title in
display.customLine. Static, so it can't follow the session. - Patch
transcript.tslocally. A ten-line change, but it lives inplugins/cache/…/0.8.0and any plugin update wipes it. - Treat it as a Claude Code issue instead. The
ai-titlerecord is already written into the transcript; nothing upstream needs to change.
Additional Context
- claude-hud 0.8.0, installed as a Claude Code plugin
- macOS,
CLAUDE_CONFIG_DIRpointed at a non-default directory - Config:
display.showSessionName: true(the default isfalse,src/config.ts:347)
Source: jarrodwatts/claude-hud