[Feature Request] Use OSC 2 escape sequences for terminal title instead of process.title

Resolved 💬 2 comments Opened Jan 28, 2026 by germaneguise Closed Feb 28, 2026

Bug Description
The ask is straightforward: emit OSC 2 escape sequences to set the terminal title, instead of (or in addition
to) using process.title.

Instead of:
process.title = "Notification Timer Focus";

Do:
process.stdout.write("\x1b]2;Notification Timer Focus\x07");

Why:

  • process.title on Windows calls SetConsoleTitle() — a Win32 API that no terminal emulator reads
  • process.title on Linux/macOS modifies argv[0] — only some terminals check this, and it requires reading

/proc or sysctl

  • OSC 2 (\x1b]2;TITLE\x07) is the standard VT sequence for setting the terminal/tab title — every terminal

emulator already supports it: WezTerm, Windows Terminal, iTerm2, Alacritty, kitty, etc.

No patching needed on any platform, any terminal. It just works.

Could keep process.title as a fallback and add OSC 2 as the primary mechanism. One line of code on their
side eliminates the need for our patches entirely.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.19
  • Feedback ID: 4b7ba877-08d2-49e9-a679-9325ba8f3221

View original on GitHub ↗

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