Include session name in terminal tab title after /rename

Resolved 💬 3 comments Opened Feb 7, 2026 by superfluidic Closed Feb 11, 2026

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:

⠐ 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, _GreenCRT profile)
  • Hook type: SessionStart command hook

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗