Allow disabling or customizing terminal tab title (currently locked to CC version)

Resolved 💬 3 comments Opened May 7, 2026 by saifulveri Closed May 10, 2026

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)

  1. --name <name> flag — only updates the in-CC cyan badge and /resume picker. Does not emit an OSC sequence to update the host terminal title.
  2. SessionStart hook writing OSC to /dev/tty — fires too early; CC overwrites afterward.
  3. UserPromptSubmit hook + Stop hook 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.
  4. Background loop in shell wrapper continuously emitting OSC every 1s to /dev/tty — same; CC re-asserts faster.
  5. 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.
  6. Searched docs / --help / env for any disable option — none documented.

Request

Please add one of the following:

  1. Env var to disable: CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 skips OSC title emission entirely, letting the host terminal/IDE manage the title via its own setting (e.g. terminal.integrated.tabs.title in VS Code/Cursor).
  2. CLI flag: --no-terminal-title (same effect as above).
  3. 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.

View original on GitHub ↗

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