[VSCode] Drag-and-drop file reference inserts absolute path instead of workspace-relative path

Open 💬 0 comments Opened Jul 3, 2026 by saulotarsobc

Environment

  • OS: Windows 11 Home 10.0.26200
  • Extension: anthropic.claude-code v2.1.199 (win32-x64)
  • Editor: VS Code

Description

Drag-and-drop file references in the chat panel (added in v2.0.8 per the CHANGELOG: "IDE: Add drag-and-drop support for files and folders in chat") insert an absolute filesystem path instead of a workspace-relative path on Windows.

This is inconsistent with the manual @-mention flow (typing @ in the chat, or using the insertAtMention / insertAtMentioned commands bound to Alt+K / Ctrl+Alt+K), which correctly resolves to a workspace-relative reference.

Steps to reproduce

  1. Open a workspace in VS Code, e.g. C:\Users\saulo\Documents\projetos\claude-code.
  2. Open the Claude Code chat panel.
  3. In the Explorer, hold Shift and drag a file (e.g. feed.xml) into the chat input box. (Shift is required because a plain drag is intercepted by VS Code and opens the file in the editor instead.)
  4. Observe the inserted reference.

Expected behavior

The reference should be inserted as a workspace-relative mention, e.g.:

@feed.xml

matching what typing @feed.xml manually (or using the insertAtMention command) produces.

Actual behavior

The reference is inserted as an absolute path with a drive-letter prefix, e.g.:

@/c:/Users/saulo/Documents/projetos/claude-code/feed.xml

This is longer, harder to read, not portable across machines/workspace locations, and inconsistent with the relative-path convention used everywhere else in the chat's file-reference UI.

Likely cause

The drag-and-drop handler in the webview appears to consume the dropped item's text/uri-list (an absolute file:// URI) and insert it directly, without resolving it against the current workspace folder root the way the @-mention autocomplete / insertAtMention command does.

<img width="487" height="619" alt="Image" src="https://github.com/user-attachments/assets/1470e6c7-8e6c-4244-a8b8-83fc3b5cc433" />

View original on GitHub ↗