fall back to the AI-generated title, and mark Remote Control sessions

Author: davotoulaCreated Sep 17, 2026Updated Sep 17, 2026
Labelsenhancement

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:

typescript
// 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:

json
{"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

json
{"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

  1. Resolve the session name as custom-titleai-titleslug, keeping the last ai-title seen. An explicit /rename still wins, and the generated title fills the gap instead of rendering nothing.
  2. Optionally, add a Remote Control indicator — say RC beside the session name, behind a display.showRemoteSession flag, set when the transcript holds a bridge-session record. The record's presence is enough; bridgeSessionId and ownerAccountUuid are 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 /rename in every session. Works, since it writes the custom-title the 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.ts locally. A ten-line change, but it lives in plugins/cache/…/0.8.0 and any plugin update wipes it.
  • Treat it as a Claude Code issue instead. The ai-title record 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_DIR pointed at a non-default directory
  • Config: display.showSessionName: true (the default is false, src/config.ts:347)