[FEATURE] Native OS file-picker dialog to attach files from the terminal (/attach) - like Claude Desktop's upload button
Feature request
A slash command or keybinding (e.g. /attach) that opens the native OS file-picker dialog (multi-select) and inserts the chosen file paths into the prompt input box, so they become part of the message the user is typing — the same experience as the upload button in Claude Desktop.
Why the existing attachment options don't cover this
Claude Code today offers three ways to reference a file, and each one breaks down for the common "attach a few screenshots" case:
@file mentions — require the file to be under an added working directory and require knowing/typing the filename. Screenshots have machine-generated names (Screenshot 2026-08-02 203729.png,WhatsApp Image 2026-07-26 at 10.55.14 AM (1).jpeg) that nobody remembers, so fuzzy search doesn't help; users end up opening Explorer anyway to find out what the file is even called.- Drag & drop — requires leaving the terminal, positioning two windows, and dragging files one context switch at a time. On a laptop without a second monitor this is exactly the friction users are trying to avoid.
- Ctrl+V image paste — works for one image already on the clipboard, but not for selecting several existing files from disk.
The result: the current workflow is minimize terminal → open Explorer → find file → copy path → return → paste → repeat per file. Claude Desktop solved this years-of-UX ago with a plain upload button; the CLI has no equivalent.
Why it matters
- Screenshots are one of the highest-value inputs for a coding agent (error dialogs, UI bugs, designs to reproduce), and they are precisely the files with unguessable names living outside the project directory.
- The interruption cost is asymmetric: the user is mid-prompt, and the missing picker forces a full window/context switch at the exact moment they're formulating a question.
- Every major GUI surface of Claude (Desktop, claude.ai, VS Code extension panel) has an attach affordance; the terminal — Claude Code's primary surface — is the only one without.
What I tried (workarounds and their limits)
- Custom slash command running a PowerShell
OpenFileDialogvia the `!...` preamble: the dialog works, but slash-command output is sent as a prompt, not inserted into the composer — so the paths can't be combined with the message the user wants to type. This is the structural gap: extensions can send prompts but cannot pre-fill the input box. - Global hotkey outside Claude Code: a desktop shortcut (Ctrl+Alt+P) launching a PowerShell script that opens
OpenFileDialog, puts the quoted paths on the clipboard, andSendKeys-pastes them into the focused terminal. This achieves the desired UX end-to-end — but it lives entirely outside Claude Code, is per-OS, per-user setup, and fragile (focus timing, SendKeys).
That the workaround is this easy to build (one small script + a dialog) suggests the native version is low-cost relative to the friction it removes.
Proposed behavior
/attach(or a keybinding, e.g.Ctrl+O) opens the OS-native file dialog with multi-select.- On confirm, the selected paths are inserted at the cursor in the prompt input box (quoted, space-separated, or as
@pathmentions) — the user keeps typing and sends everything as one message. - Cancel inserts nothing.
- Works regardless of whether the files are inside a working directory (read permission can still be prompted at use time, as with pasted paths today).
Environment
- Claude Code v2.1.251, Windows 11 Home (10.0.26200), Windows Terminal / PowerShell
---
🤖 Generated with Claude Code