[BUG] Drag & drop attachment (“Drop to attach as context”) does nothing in Cursor Remote-SSH (Windows → Debian 11)
Status Closed — not planned
Reported on v2.1.19
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 6 comments · opened Jan 26, 2026 · closed Mar 3, 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?
Shift + drag & drop into the Claude Code input works only visually in Cursor Remote-SSH: the UI shows “Drop to attach as context”, but when I drop the file nothing is attached (no file/path appears, no context is added, no error shown). This happens only when connected via Remote-SSH. On a local Windows workspace it works.
What Should Happen?
When I hold Shift and drop a file onto the Claude Code prompt input, the file should be attached as context (or its path should be inserted / an attachment chip should appear), so Claude can read it as part of the conversation context.
Error Messages/Logs
Steps to Reproduce
- On Windows 11, open Cursor 2.3.30 (VS Code base 1.105.1).
- Connect to a Debian 11 VPS using Remote-SSH.
- Open the Claude Code panel/chat (extension 2.1.19).
- Hold Shift and drag any file from the Explorer (or an open editor tab) over the Claude Code prompt input.
- Confirm the overlay appears: “Drop to attach as context”.
- Drop the file.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.19 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Cursor
Additional Information
- This issue happens only in Remote-SSH sessions. The same Shift + drag & drop workflow works in a local (non-SSH) workspace on the same Windows 11 machine.
- The Claude Code UI correctly detects the drag operation (overlay shows “Drop to attach as context”), but the drop action is ignored (no attachment/path/context is added, no error shown). This suggests the drag-over handler works, but the drop handler fails in Remote-SSH.
- OpenAI Codex drag & drop works in the same Cursor Remote-SSH environment, so the problem seems specific to Claude Code’s drag/drop handling under Remote-SSH rather than Cursor/Remote-SSH generally.
- Environment details:
- Client: Windows 11
- Remote VPS: Debian 11
- Cursor 2.3.30 (VS Code base 1.105.1)
- Claude Code extension 2.1.19
- Possible cause (hypothesis): Remote workspaces often use remote URI/path formats (e.g.
vscode-remote://...) and the drop payload may differ from local sessions, so the extension may not be correctly parsing/accepting dropped items in Remote-SSH.
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
It still reproduces in VS Code Insider + Windows. ,
claude code version : 2.1.29
vscode: [Window Title]
Visual Studio Code - Insiders
[Main Instruction]
Visual Studio Code - Insiders
[Content]
Version: 1.109.0-insider (user setup)
Commit: 07483cec7c6bc583a449c0d444d3187f6261b911
Date: 2026-01-27T17:05:27.861Z (5 days ago)
Electron: 39.3.0
ElectronBuildId: 13168319
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
[Copy] [OK]
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Root Cause Analysis
The bug is in the
webview/index.jsfile of the Claude Code extension. The function responsible for handling dropped file URIs (minified asJt0) hard-rejects any URI that doesn't start withfile://:When using Remote-SSH (or WSL, Dev Containers, etc.), VSCode passes URIs like:
This URI doesn't start with
file://, so the function returnsnull— the drop is silently ignored. No error, no feedback to the user.Proposed Fix
Accept
vscode-remote://URIs and extract the path using the standardURLAPI:This preserves existing
file://behavior and adds support for allvscode-remote://schemes (Remote-SSH, WSL, Dev Containers).Temporary Workaround (patch script)
Until this is fixed upstream, here is a Python script that patches
webview/index.jsdirectly. It creates a backup and can be reversed with--unpatch.Tested and confirmed working on version 2.1.71 with Cursor over Remote-SSH (Windows client → Linux server).
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.