claude-code - 💡(How to fix) Fix [FEATURE] VS Code extension: insert absolute path on drop for unsupported file types [1 participants]

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…
GitHub stats
anthropics/claude-code#48715Fetched 2026-04-16 06:53:01
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

Second, on Shift+drop, the extension rejects it with an "Unsupported file type" error that lists the supported types and then instructs me to include the absolute file path in my prompt manually. The error message literally tells me to type the absolute path by hand, which is exactly what I wanted the drop to do in the first place. My common use case is referencing a recorded video file so Claude can run ffmpeg or ffprobe on it, or pointing at a zip, sqlite, or mp3. I do not want the file attached to the conversation. I only want its path in the prompt. On drop of any file type the extension does not natively support, insert the file's absolute path as plain text into the chat input at the cursor position. No error, no attachment attempt, just the path. Two screenshots available showing the current failure modes (VS Code hijacking the drop with a "file is very large" warning, and Shift+drop showing the "Unsupported file type" error). I can add them as a follow-up comment.

RAW_BUFFERClick to expand / collapse
  • I searched existing issues and didn't find a duplicate
  • This is a single feature request

Problem Statement

When I drag an unsupported file (e.g., a .mov video, a large binary, or anything outside PNG, JPG, GIF, WebP, text, or PDF) into the Claude Code VS Code extension chat panel, one of two things happens.

First, on a plain drop, VS Code itself hijacks the drop and opens the file in its own editor, often with a warning that the file is very large and asking whether to "Open Anyway" or "Configure Limit." The drop never reaches the Claude Code extension at all.

Second, on Shift+drop, the extension rejects it with an "Unsupported file type" error that lists the supported types and then instructs me to include the absolute file path in my prompt manually.

The error message literally tells me to type the absolute path by hand, which is exactly what I wanted the drop to do in the first place. My common use case is referencing a recorded video file so Claude can run ffmpeg or ffprobe on it, or pointing at a zip, sqlite, or mp3. I do not want the file attached to the conversation. I only want its path in the prompt.

Proposed Solution

On drop of any file type the extension does not natively support, insert the file's absolute path as plain text into the chat input at the cursor position. No error, no attachment attempt, just the path.

Optional polish: if the path is inside the current workspace, insert it using the existing @ file reference convention. Otherwise insert the absolute path.

Supported-type behavior stays unchanged. Only the failure case changes.

Alternative Solutions

Manually typing the path works but defeats the purpose of having the file right there in Finder. Shift+drop still errors out on unsupported types. The @ file picker only works for files inside the working directory, not arbitrary Finder locations. Dragging into a terminal tab first to grab the path and then copying works but is clunky.

Priority

Low. Quality-of-life improvement, not a blocker.

Feature Category

VS Code extension chat input (TUI)

Use Case Example

I have an Ecamm recording in my Movies folder and want Claude to transcribe a section with ffmpeg and whisper. I drag the file from Finder into the chat panel. Instead of VS Code opening a 1.5 gigabyte binary in its editor, or the extension erroring, the input now contains the absolute path. I add "extract audio from 0:30 to 2:00 and transcribe it" and send.

Environment

  • Claude Code Version: 2.1.109
  • Platform: Anthropic API
  • Operating System: macOS 26.3.1 (Apple M2 Ultra, Mac Studio)
  • VS Code: 1.116.0 with anthropic.claude-code 2.1.109
  • Terminal/Shell: VS Code extension chat panel

Additional Context

Two screenshots available showing the current failure modes (VS Code hijacking the drop with a "file is very large" warning, and Shift+drop showing the "Unsupported file type" error). I can add them as a follow-up comment.

Related existing issues for the broader drag and drop surface: #41338, #25128, #44287, #43476. None of them cover the specific ask of inserting the path as text for unsupported types as the failure-case behavior.

extent analysis

TL;DR

The proposed solution is to modify the Claude Code VS Code extension to insert the absolute file path as plain text into the chat input when an unsupported file type is dropped.

Guidance

  • Review the existing drag and drop event handling in the Claude Code extension to determine how to intercept the file drop event before VS Code hijacks it.
  • Modify the extension to check the file type and, if unsupported, insert the absolute file path into the chat input instead of attempting to attach the file or displaying an error message.
  • Consider implementing the optional polish to use the existing @ file reference convention for files within the current workspace.
  • Test the modified extension with various file types, including large binaries and unsupported types, to ensure the desired behavior.

Example

No code snippet is provided as the issue does not include specific code details, but the modification would likely involve updating the event handler for the drop event in the Claude Code extension.

Notes

The proposed solution assumes that the Claude Code extension has the capability to intercept and handle file drop events. If this is not the case, additional modifications to the extension or VS Code may be necessary.

Recommendation

Apply the proposed workaround by modifying the Claude Code extension to insert the absolute file path as plain text into the chat input for unsupported file types, as this addresses the specific use case and improves the user experience.

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