[BUG] VS Code extension: terminal tab title never updates — terminal is created with a static name

Status Open
Reported on v2.1.228
Maintainer reply None cached
Activity 2 comments · opened Aug 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The tab created by Claude Code: Open in Terminal always reads "Claude Code". The session topic and /rename never reach it, although the CLI emits OSC 0 correctly and VS Code has had built-in support for exactly this since 1.117 — terminal.integrated.tabs.allowAgentCliTitle (default true), whose agent-CLI shell-type list already contains claude.

Root cause, extension.js 2.1.228:

createTerminal({name: process.env.CLAUDE_CODE_TERMINAL_TITLE || "Claude Code", …})
VS Code subscribes to xterm's onTitleChange only when the launch config has no name (or has a titleTemplate):

name && !titleTemplate ? setTitle(name, Api) : (subscribe to onTitleChange …)
With name set, _sequence stays undefined forever, so ${sequence} is always empty; staticTitle additionally short-circuits label computation for titles. Note that titleTemplate is not an option on your side either — extHost silently drops it unless the terminalTitle proposed API is enabled, which marketplace extensions don't have.

What Should Happen?

The tab title should follow the session topic and /rename, exactly as it does when claude is started in a regular terminal.

Error Messages/Logs

Steps to Reproduce

  1. VS Code 1.132.0, extension 2.1.228, Linux.
  2. Run Claude Code: Open in Terminal.
  3. Run /rename Foo.
  4. The tab still reads "Claude Code"; expected "Foo". For contrast, run claude in a plain terminal — there the title tracks the session.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.228

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Verified fix — drop the fallback so name stays undefined unless the user sets the variable:

createTerminal({name: process.env.CLAUDE_CODE_TERMINAL_TITLE, …})
I patched this locally in extension.js and the tab title now follows the session topic and /rename. CLAUDE_CODE_TERMINAL_TITLE keeps working as an opt-in static name. The terminal's name is only used by the extension for @-mentions (getMatchingTerminals), so nothing else depends on it.

User-side workaround: define a terminal profile pointing at the claude binary — profile terminals aren't created through the extension API, so titles work there.

Related: #81753, #72266, #37628, #11145.

View original on GitHub ↗

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