Update terminal window/tab title when session is renamed
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
## Feature Request
When using /rename to give a Claude Code session a human-readable name, it would be helpful if the terminal window/tab title was also updated to reflect this name.
### Current Behavior
/rename my-session-nameupdates the session name internally- The status line can be configured to show the session name
- The terminal tab/window title remains unchanged
### Technical Notes
Most terminal emulators support OSC sequences for setting window titles:
- OSC 0: Set icon name and window title
- OSC 2: Set window title
This would complement the existing status line configuration without requiring any user setup.
Proposed Solution
### Desired Behavior
- When
/renameis used, emit an OSC escape sequence to update the terminal title - Example:
\e]0;Claude Code - my-session-name\aor similar - This would allow terminal emulators (Ghostty, iTerm2, etc.) to display the session name in tabs
Alternative Solutions
_No response_
Priority
Low - Nice to have
Feature Category
Other
Use Case Example
### Use Case
When working with multiple Claude Code sessions in different terminal tabs, it's difficult to identify which tab contains which session. Being able to see the renamed session name in the tab title would greatly improve workflow organization.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗