Summary
When a session is renamed via /rename, the terminal tab title should include the custom name (e.g. Ohm — Claude Code instead of ⠐ Claude Code).
Current Behavior
Claude Code continuously sets the terminal tab's custom title property to ⠐ Claude Code (with rotating spinner). This overwrites any externally set title on every tick.
Attempted Workarounds (all failed)
| Approach |
Result |
SessionStart hook with ANSI \033]0;title\007 to stdout |
Captured by Claude Code, never reaches terminal |
Same escape sequence to /dev/tty |
Immediately overwritten by Claude Code's title loop |
osascript setting Terminal.app custom title + title displays custom title |
Overwritten — Claude Code resets custom title on every spinner tick |
Investigation
/rename Ohm stores a custom-title event in the transcript JSONL: {"type": "custom-title", "customTitle": "Ohm", "sessionId": "..."}
- The
SessionStart hook payload includes transcript_path but not the session name
- Terminal.app confirms Claude Code owns the title:
custom_title=⠐ Claude Code | displays_custom=true
Proposed Solution
When customTitle is set, include it in the terminal title string that Claude Code manages:
Or at minimum, expose customTitle in the SessionStart hook payload so users can set it themselves (though this still requires Claude Code to not overwrite it).
Environment
- Claude Code 2.1.36
- macOS (Terminal.app,
_GreenCRT profile)
- Hook type:
SessionStart command hook
Summary
When a session is renamed via
/rename, the terminal tab title should include the custom name (e.g.Ohm — Claude Codeinstead of⠐ Claude Code).Current Behavior
Claude Code continuously sets the terminal tab's
custom titleproperty to⠐ Claude Code(with rotating spinner). This overwrites any externally set title on every tick.Attempted Workarounds (all failed)
SessionStarthook with ANSI\033]0;title\007to stdout/dev/ttyosascriptsetting Terminal.appcustom title+title displays custom titlecustom titleon every spinner tickInvestigation
/rename Ohmstores acustom-titleevent in the transcript JSONL:{"type": "custom-title", "customTitle": "Ohm", "sessionId": "..."}SessionStarthook payload includestranscript_pathbut not the session namecustom_title=⠐ Claude Code | displays_custom=trueProposed Solution
When
customTitleis set, include it in the terminal title string that Claude Code manages:Or at minimum, expose
customTitlein theSessionStarthook payload so users can set it themselves (though this still requires Claude Code to not overwrite it).Environment
_GreenCRTprofile)SessionStartcommand hook