Include session name in terminal tab title after /rename
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 Ohmstores acustom-titleevent in the transcript JSONL:{"type": "custom-title", "customTitle": "Ohm", "sessionId": "..."}- The
SessionStarthook payload includestranscript_pathbut 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:
⠐ Ohm — Claude Code
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,
_GreenCRTprofile) - Hook type:
SessionStartcommand hook
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗