How can I add multiple files as context at once?
Resolved 💬 16 comments Opened Jul 19, 2025 by isCopyman Closed Jan 25, 2026
Hi, I'm using the Claude Code in VS Code.
When I try to add multiple files to the chat context, it doesn't seem to work. I select several files in the explorer (using Shift-click), then drag and drop them into the chat, but only a single file is added.
Is there a way to add a selection of multiple files to the context in one action? This would be a very useful feature for asking questions about code that spans across different files.
16 Comments
+1
+1
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
You're right, it's a bit counter-intuitive that dragging a selection of files doesn't work. It seems to only register the single file your cursor is over when you drop it.
After digging into the documentation and playing around with it, I found that the intended way to add multiple files to the context at once is by using
@mentions directly in the chat prompt.Here’s how you can do it:
@and begin typing the file's name. Claude will show you an autocomplete list of files in your project.@mention.For example, you could write a prompt like this:
> Can you refactor the login logic? I think the relevant files are @src/api/auth.js, @src/components/LoginForm.jsx, and @src/store/userSlice.js.This will pull the full contents of all three files into the context for that single request. It's super useful for questions that span multiple parts of the codebase.
There's also a keyboard shortcut,
Option+Cmd+K(on Mac) orAlt+Ctrl+K(on Windows/Linux), which will insert an@reference to the file you currently have active in your editor. Open a file in VS Code, use the shortcut, which will paste in the file inside your Claude Code session. Repeat for 2nd file, and so on.Hope this helps! It's a really powerful feature once you get used to the
@workflow.+1
@coygeek Yea, that makes sense. From a DX perspective that is just painful in comparison to drag-and-drop.
Here's a sample of how it works in VS Code Copilot compared to Claude Code VS Code UI. The greater the number of files the more DX-friendly it is to drag-and-drop. This workflow is ideal compared to
@mention so would be ace if it was prioritized!https://github.com/user-attachments/assets/82245542-8ed2-4881-89ce-f2b0651cde74
Any changes related to implementing this function? It doesn’t seem complicated to add, but it’s fairly important.
+1
I think claude code should check how copilot is doing somethings. I have just paid for a claude code subscription after working with copilot for 2 months. I can say that copilot makes things a bit easier in some case like this one we are discussing. Also the interactive review after changes, opening all modified files is very useful (although I would add the option of enabling/disabling the feature)
+1, still use Copilot in many cases for this DX
fwiw This issue might be worth closing as both Claude and Claude VS Code support dragging and dropping multiple files. In the latter we don't get the same nice UX chips like Copilot but the drag-and-drop of multiple open file tabs into Claude VS Code UI does work (just @ inlines all the file paths)
TIL: You can drop multiple files into the Claude VS Code editor at once by holding Shift before dropping them. As the person above said, the paths become inlined with an @ prefix and it doesn't use pretty chips like Copilot, but at least it can be done.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
!Image
Actually, this still doesn't work
not work. see my GIF
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.