Allow disabling or customizing terminal tab title (currently locked to CC version)
Problem
Claude Code 2.1.132 emits an OSC 0/2 escape sequence setting the host terminal's tab/window title to the CC version (e.g. "2.1.132") and re-asserts it continuously. This makes it impossible to identify which project a CC session belongs to when multiple are open in IDE-integrated terminals.
In Cursor / VS Code's integrated terminal, multiple side-by-side CC sessions all show identical tab titles ("2.1.132", "2.1.132", "2.1.132"), defeating the purpose of having multiple terminals.
What I've tried (all fail)
--name <name>flag — only updates the in-CC cyan badge and/resumepicker. Does not emit an OSC sequence to update the host terminal title.SessionStarthook writing OSC to/dev/tty— fires too early; CC overwrites afterward.UserPromptSubmithook +Stophook writing OSC — does not propagate to the host terminal title parser; CC's own emission appears to win the race or Cursor prioritizes the foreground process's OSC name over external writes.- Background loop in shell wrapper continuously emitting OSC every 1s to
/dev/tty— same; CC re-asserts faster. - Cursor
terminal.integrated.tabs.title = "${cwdFolder}"— works for non-CC terminals (node, shell) but Cursor uses the OSC name from the foreground process when set, overriding the template for CC terminals specifically. - Searched docs /
--help/ env for any disable option — none documented.
Request
Please add one of the following:
- Env var to disable:
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1skips OSC title emission entirely, letting the host terminal/IDE manage the title via its own setting (e.g.terminal.integrated.tabs.titlein VS Code/Cursor). - CLI flag:
--no-terminal-title(same effect as above). - Settings.json key: e.g.
"terminalTitle": "off" | "version" | "<custom-template>"where<custom-template>supports tokens like${cwd},${cwdFolder},${branch},${name},${version}.
Option 3 is most flexible — allows users to set "terminalTitle": "${cwdFolder} [${branch}]" to get titles like bukujanji [dev] automatically per session.
The existing -n/--name flag should also be wired to actually emit OSC if/when titles aren't disabled, since the docs already state it sets "the terminal title".
Environment
- Claude Code: 2.1.132
- Host terminal: Cursor IDE integrated terminal (
TERM_PROGRAM=vscode, version 3.2.16) - Shell: zsh, macOS 24.5.0 (Darwin)
- Workflow: 5+ concurrent CC sessions across different projects/branches in one IDE workspace
Use case
Multi-project workflow: several CC sessions running in parallel across different repos/branches in the same IDE workspace. Currently impossible to distinguish them at a glance. Right-click → Rename in Cursor works but is manual and lost on session reload.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗