[BUG] VS Code extension: session tab title is truncated to 25 chars before it reaches VS Code, so the tab tooltip is truncated too

Status Open
Reported on v2.1.250
Maintainer reply None cached
Activity 1 comment · opened Aug 29, 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?

In the VS Code extension, a session's editor tab label is cut to 24 characters + in the webview, before it is sent to the extension host. The host assigns that already-shortened string to WebviewPanel.title and sets nothing else on the tab.

VS Code derives a tab's hover tooltip from title, so the tooltip shows the same truncated string as the label. Hovering a tab reveals nothing the label didn't already show, which makes the tooltip useless for its one job — telling apart sessions whose titles share a prefix.

The text is not being clipped by VS Code's rendering. It is discarded one process earlier, so nothing downstream can recover it.

What Should Happen?

The extension should pass the full session title to WebviewPanel.title and let VS Code elide it visually.

VS Code already truncates tab labels to fit the available width and shows the complete title on hover, so dropping the pre-truncation costs nothing in the tab's appearance and makes the tooltip informative.

Error Messages/Logs

Steps to Reproduce

  1. In VS Code with the Claude Code extension, open a session as an editor tab (the tab-rename path is gated on openNewInTab, so a sidebar session has no tab title at all).
  2. Give the session a name longer than 25 characters — e.g. /rename weather panel refresh scheduling — or let a long auto-generated title stand.
  3. Look at the tab label: it reads weather panel refresh sc….
  4. Hover the tab and wait for the tooltip.
  5. Actual: the tooltip reads weather panel refresh sc… — identical to the label.

Expected: the tooltip reads weather panel refresh scheduling.

Claude Model

_No response_

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.250 (Claude Code); VS Code extension 2.1.233

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Where it happens

Traced in the shipped marketplace bundle, anthropic.claude-code-2.1.233-darwin-arm64.

1. Truncation — webview/index.js (~byte offset 3,208,691):

Gn(() => {
  let r = this.activeSession.value,
      s = r?.summary.value,
      l = (s && s.length > 25 ? s.substring(0, 24) + "…" : s) || "Claude Code",
      c = (r?.permissionRequests.value.length ?? 0) > 0,
      d = this.hasUnseenCompletion.value;
  ny(() => t.renameTab(l, c, d))
});

l is the truncated string, and it is the only title the host ever receives.

2. Assignment — extension.js (~byte offset 2,745,872):

else if (e.request.type === "rename_tab") {
  if (this.panelTab) {
    this.panelTab.title = e.request.title;
    let r;
    if (e.request.hasPendingPermissions) r = "claude-logo-pending.svg";
    else if (e.request.hasUnseenCompletion) r = "claude-logo-done.svg";
    else r = "claude-logo.svg";
    this.panelTab.iconPath = ke.Uri.file(mi.join(this.context.extensionPath, "resources", r))
  }
  …

panelTab is only ever given .title and .iconPath — there is no description or tooltip carrying the full text:

$ grep -o 'panelTab\.[a-zA-Z]*' extension.js | sort | uniq -c
   1 panelTab.iconPath
   1 panelTab.reveal
   1 panelTab.title
   1 panelTab.viewColumn

Reproducing the trace

d=~/.vscode/extensions/anthropic.claude-code-<version>-<platform>
grep -o '.\{0,60\}length>25?.\{0,140\}' "$d/webview/index.js"
grep -o '.\{0,40\}"rename_tab".\{0,220\}' "$d/extension.js"

Suggested fix

Send the untruncated summary in the rename_tab message. If the 25-character cap is wanted for some other surface, apply it there rather than at the point the tab title is produced.

Related

  • #74956 — long session titles elided in Quick Open with no way to read them. Same underlying cause (the full title never reaches VS Code as a separate field), different surface; a fix here would likely help there too.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗