[FEATURE] Include session name in terminal title (critical for tmux -CC + iTerm2)

Resolved 💬 1 comment Opened May 1, 2026 by Conceptron Closed Jun 1, 2026

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

When running 10+ Claude Code sessions in parallel via tmux -CC + iTerm2, every tab displays "⠐ Claude Code" — making them completely indistinguishable.

iTerm2 in tmux control mode uses the pane title (set via OSC escape sequences) as the tab's "Session Name". Claude Code continuously overwrites this title with its spinner animation, preventing any external renaming.

The current workflow requires me to manually click into each tab to figure out which session is which, or memorize window numbers.

Proposed Solution

When a session has a name (via /rename or --name), include it in the terminal title that Claude Code sets via OSC escape sequences:

⠐ slate-skill — Claude Code

Or expose a config/env var to customize the format:

CLAUDE_CODE_TERMINAL_TITLE_FORMAT="{spinner} {session_name} — Claude Code"

Sessions without a name would continue showing "⠐ Claude Code" as today.

Alternative Solutions

  • tmux rename-window — doesn't work because iTerm2 -CC mode uses pane_title, not window_name
  • tmux select-pane -T "name" — Claude Code overwrites it on the next spinner tick
  • CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 — prevents title setting entirely but doesn't allow user control
  • printf '\033]0;name\007' — immediately overwritten by Claude Code
  • iTerm2 "Applications in terminal may change the title" unchecked — disables Claude Code's spinner entirely
  • Manually renaming via Cmd+I — works but tedious with 12 tabs, and doesn't survive tab recreation

Related closed issues with no canonical tracking issue: #18326, #20441, #23647, #23998, #15802

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

  1. I'm an engineer running 12 Claude Code sessions on a remote devpod via tmux -CC + iTerm2
  2. Each session works on a different task: SLATE testing, diff review, oncall investigation, etc.
  3. I use /rename to name each session (e.g., /rename slate-skill, /rename oncall-bug)
  4. With this feature, each iTerm2 tab would show "⠐ slate-skill — Claude Code" instead of "⠐ Claude Code"
  5. I could instantly identify and switch to the right session without clicking into each tab

Additional Context

tmux -CC (control mode) is the recommended way to use tmux with iTerm2 — it maps tmux windows to native iTerm2 tabs. In this mode, the OSC terminal title becomes the only mechanism for tab naming. This affects anyone using Claude Code over SSH with tmux integration.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗