Terminal tab/window title not cleared after exit

Resolved 💬 4 comments Opened Feb 20, 2026 by aleh Closed Mar 21, 2026

Description

After exiting Claude Code, the terminal tab/window title remains set to "Claude Code" instead of being restored to its previous value or cleared.

Steps to Reproduce

  1. Open a terminal tab/window (note the current title).
  2. Run claude to start Claude Code.
  3. Exit Claude Code (e.g. Ctrl+C or /exit).
  4. Observe that the tab/window title still reads "Claude Code".

Expected Behavior

On exit, Claude Code should restore the terminal title to what it was before launch, or at minimum emit a reset escape sequence to clear the title it set.

Actual Behavior

The terminal title remains "Claude Code" indefinitely after the process exits.

Likely Cause

Claude Code appears to set the terminal title via an OSC escape sequence (e.g. \033]0;Claude Code\007) on launch but does not emit a corresponding reset/restore sequence on exit.

Environment

  • Claude Code version: 2.1.49
  • macOS version: 26.3 (Build 25D122)
  • Terminal: Apple Terminal (Terminal.app)
  • Shell: /bin/bash

View original on GitHub ↗

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