Sync terminal tab title with /rename
Problem
Running /rename my-new-name updates Claude Code's internal session label but does NOT update the terminal tab title (e.g., Windows Terminal tab, iTerm tab, GNOME Terminal tab). The two stay out of sync, which is confusing — users expect "rename the session" to also rename the tab they're looking at.
This is especially annoying when juggling many tabs/sessions: the only way to find the right one visually is by tab title, but /rename doesn't propagate there.
Current behavior
❯ /rename release notes
⎿ Session renamed to: release notes
Tab title at top of Windows Terminal: still Ubuntu (or whatever it was at launch).
Why it's not "just an escape sequence"
On Windows Terminal specifically, sessions spawned with --suppressApplicationTitle will ignore any \033]0;...\007 / \033]2;...\007 the app emits. So even if Claude Code tried to push a title change, WT would silently drop it. Many shared tooling setups (including ours) launch tabs with that flag to prevent background processes from flickering tab titles.
Suggested fix
When /rename runs:
- Emit the standard OSC 0/2 escape sequence (
\033]0;<name>\007) so terminals that respect app-set titles update automatically. - Additionally, if running inside Windows Terminal (detectable via
WT_SESSIONenv var) AND the tab was launched with--suppressApplicationTitle, document that users will need to right-click → "Rename Tab" manually, OR consider shelling out towt.exeto update the title via the WT command palette / API if one becomes available.
At minimum, doing #1 would fix the common case for iTerm, GNOME Terminal, Alacritty, Kitty, and Windows Terminal tabs launched WITHOUT --suppressApplicationTitle.
Workaround today
Right-click the tab → "Rename Tab" → type the new name manually. Doable but easy to forget, and defeats the convenience of /rename.
Environment
- Claude Code 2.1.126
- WSL2 Ubuntu in Windows Terminal
- Linux 6.6.87.2-microsoft-standard-WSL2
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗