Skip to content

v0.6.0 — dynamic terminal tab title

Choose a tag to compare

@michalekz michalekz released this 11 Jun 13:04
· 107 commits to main since this release

Minor release adding dynamic terminal tab title that tracks each peer's `displayName` (ai-title) automatically. End of "all my Claude tabs look identical" — orchestrators with 4+ worker terminals can finally tell them apart at a glance without manual `--name` flags or right-click renames.

Added

When a peer's `displayName` resolves or changes (typically when Claude Code emits the `ai-title` event 5-10 seconds after the first user prompt), the plugin writes `\x1b]2;\x07` to the parent Claude Code process's controlling tty. VS Code's integrated terminal (and every standard terminal emulator) honors this in its tab title.

Platform coverage

Platform Mechanism Status
Linux Parse `/proc//stat` field 7 → `/dev/pts/`
macOS `ps -p -o tty=` → `/dev/` (no /proc)
Windows Requires Win32 `AttachConsole` + `WriteConsoleW` (or native helper) not yet — silent no-op

VS Code Extension chat tabs use their own internal rendering (read `ai-title` directly from CC) and don't need this feature.

Why this instead of Claude Code itself

Anthropic closed the upstream feature requests to emit OSC 2 from Claude Code:

The plugin already monitors `ai-title` events for peer-name purposes, so it's the natural place to emit OSC.

Opt-out

Set `CLAUDE_BRIDGE_EMIT_TERMINAL_TITLE=0` (or `false`) in the environment before starting Claude Code if you'd rather not have your tab titles overwritten by the plugin.

Verification

  • 17 new unit tests in `tests/unit/terminal-title.test.ts` (tty_nr decoding edge cases, OSC file write, env opt-out, platform dispatch).
  • 230/230 unit tests pass (up from 213).
  • Typecheck clean, biome clean.
  • Build size: `dist/bundle.cjs` 738.5 KB (+2.5 KB).

See CHANGELOG.md for the full record.