claude-code - 💡(How to fix) Fix VSCode extension: file attachment chip should show full path (or in tooltip)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

  • The VSCode extension does not render the configured statusLine from ~/.claude/settings.json (which is terminal-only). So the standard CLI workaround of putting cwd + CLAUDE.md path into a status line is unavailable in the extension.
  • There is no context strip in the chat panel showing the active cwd or the auto-attached file.

Code Example

// parent passes only basename to chip
createElement(aD, { label: d.file.name, ... })

// chip span uses the same value as the tooltip
createElement("span", { className: ZH.label, title: Z }, Z)
RAW_BUFFERClick to expand / collapse

Problem

When the VSCode extension's chat panel auto-attaches a file via ide_opened_file (or the user attaches one manually), the chip in the input area shows only the basename — e.g. CLAUDE.md.

In monorepos / portfolio workspaces with many files of the same name (CLAUDE.md, README.md, package.json at multiple levels) this makes it impossible to tell which file is actually being sent to the assistant.

The HTML title (OS tooltip on hover) is bound to the same basename, so hover doesn't help either.

Evidence in code

Looking at webview/index.js in the bundled extension (anthropic.claude-code-2.1.139-win32-x64):

// parent passes only basename to chip
createElement(aD, { label: d.file.name, ... })

// chip span uses the same value as the tooltip
createElement("span", { className: ZH.label, title: Z }, Z)

So both the visible label and the hover tooltip carry only file.name. The path is never propagated.

Proposal

  1. Minimal fix: pass d.file.path (full or workspace-relative) from the parent down to aD/D40 and use it as the title attribute. Hover would then show the full path — ~5 lines of change, no visual layout impact.
  2. Better fix: render a workspace-relative path inside the chip itself when there are multiple open/attached files sharing a basename. Optionally truncate from the middle so the label stays compact.

Bonus: no way to see session context in the extension

The same "which file/folder am I talking to right now?" problem exists more broadly:

  • The VSCode extension does not render the configured statusLine from ~/.claude/settings.json (which is terminal-only). So the standard CLI workaround of putting cwd + CLAUDE.md path into a status line is unavailable in the extension.
  • There is no context strip in the chat panel showing the active cwd or the auto-attached file.

A small one-liner at the top or bottom of the chat panel that shows the cwd and the path of any auto-attached file would solve the broader problem and remove the need to rely on the chip label alone.

Environment

  • Extension: Anthropic.claude-code 2.1.139
  • VS Code (stable), Windows 10

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix VSCode extension: file attachment chip should show full path (or in tooltip)