You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upload pasted and dropped local files in direct SSH panes #195
Pasting a screenshot, pasting an Explorer-copied file, or dropping a local file into a terminal connected over SSH currently inserts a Windows path that does not exist on the remote host.
Add an opt-out remote insertion path for direct SSH panes: upload local files with the matching Windows OpenSSH scp.exe, then insert safely quoted remote paths into the terminal. This is inspired by cmux's remote file handling, adapted for Windows process and terminal semantics.
Proposed behavior
Handle clipboard images, copied files, and file drops through one main-process resolver.
Detect wmux ssh and direct SSH commands reported by integrated PowerShell/Bash shells.
Preserve the pane's SSH destination, port, identities, supported options, working directory, and exact client installation.
Upload into a private, unique /tmp/wmux-drop-<batch-id>/ directory using BatchMode=yes.
Keep plain text paste unchanged.
Allow Shift-drop to insert the local path without uploading.
Provide inde
C8C0
pendent upload-on-paste and upload-on-drop settings, enabled by default.
Fail closed when the active destination or matching SSH/SCP client cannot be verified.
Windows safety boundary
Unlike macOS, Windows does not expose a reliable tty foreground process group. A descendant ssh.exe may be a background process, so process ancestry must only corroborate an authoritative managed or shell-integration report; it must never select an upload host by itself.
Nested SSH started after reaching the first remote host cannot be safely reproduced by the Windows client and is out of scope. Observable destination mismatches should block upload, and the limitation should be documented.
Pasting a screenshot, pasting an Explorer-copied file, or dropping files into a pane connected directly over SSH now uploads them with the matching Windows OpenSSH scp.exe and inserts safely quoted remote paths. Plain text paste is untouched. Shift-drop inserts the local path without uploading. [remote] upload-on-paste and upload-on-drop in ~/.wmux/config.toml are independent and both default to on — see docs/config.md.
The Windows safety boundary you wrote into this issue is the part I want on the record, because it is what makes the feature safe rather than merely convenient:
process ancestry must only corroborate an authoritative managed or shell-integration report; it must never select an upload host by itself.
That is enforced structurally. SshDetector has three layers — managed (wmux ssh put the command line in the shell spec), reported (the PowerShell/Bash preexec hook), and probed (a Win32_Process ancestry sweep) — and refresh() will not return a session that only the probe knows about. macOS can ask the kernel which process group owns the tty; ConPTY has no tpgid equivalent, so a descendant ssh.exe may perfectly well be a background process. Ancestry answers "is there an ssh below this pane", never "is the user talking to it". A ssh host & therefore cannot receive your pasted screenshot.
The rest of the fail-closed posture holds too: a report contradicting an active managed session (the observable nested-SSH case) blocks rather than guessing; an unverifiable destination raises a translated failure instead of quietly inserting a local path that the remote shell cannot open; uploads land in a private mkdir -m 700 batch directory under umask 077; and a batch that fails partway deletes what it wrote rather than handing you some remote paths and some silence.
Nested SSH remains out of scope and is documented as such in both the README and docs/config.md, as you proposed.
Two operational notes, since they'll be the first two support questions:
Uploads run BatchMode=yes. There is no TTY for a passphrase prompt to appear on, so authentication has to already work non-interactively — key or ssh-agent. On failure you get scp's own last stderr line in a toast rather than a generic error.
Activity
LevSky22 commentedon Aug 24, 2026
Implementation draft: #198. Foundation fixes are #196 (OpenSSH resolution) and #197 (shell-spec preservation).
amirlehmam commentedon Aug 24, 2026
Implemented in #198, shipping in v1.12.0.
Pasting a screenshot, pasting an Explorer-copied file, or dropping files into a pane connected directly over SSH now uploads them with the matching Windows OpenSSH
scp.exeand inserts safely quoted remote paths. Plain text paste is untouched. Shift-drop inserts the local path without uploading.[remote] upload-on-pasteandupload-on-dropin~/.wmux/config.tomlare independent and both default to on — see docs/config.md.The Windows safety boundary you wrote into this issue is the part I want on the record, because it is what makes the feature safe rather than merely convenient:
That is enforced structurally.
SshDetectorhas three layers — managed (wmux sshput the command line in the shell spec), reported (the PowerShell/Bash preexec hook), and probed (aWin32_Processancestry sweep) — andrefresh()will not return a session that only the probe knows about. macOS can ask the kernel which process group owns the tty; ConPTY has no tpgid equivalent, so a descendantssh.exemay perfectly well be a background process. Ancestry answers "is there an ssh below this pane", never "is the user talking to it". Assh host &therefore cannot receive your pasted screenshot.The rest of the fail-closed posture holds too: a report contradicting an active managed session (the observable nested-SSH case) blocks rather than guessing; an unverifiable destination raises a translated failure instead of quietly inserting a local path that the remote shell cannot open; uploads land in a private
mkdir -m 700batch directory underumask 077; and a batch that fails partway deletes what it wrote rather than handing you some remote paths and some silence.Nested SSH remains out of scope and is documented as such in both the README and
docs/config.md, as you proposed.Two operational notes, since they'll be the first two support questions:
BatchMode=yes. There is no TTY for a passphrase prompt to appear on, so authentication has to already work non-interactively — key orssh-agent. On failure you get scp's own last stderr line in a toast rather than a generic error.scp.exefrom a different authentication stack than the pane'sssh; without Preserve the requested shell specification across terminal remounts #194 a remount replaced the pane'sssh user@hostspec with a bare…\ssh.exe, which parses to no destination — so a correctly detected remote pane silently looked local while its ssh was still running.Thanks for splitting it into three issues with the dependencies stated. It made the review tractable at this size.
amirlehmam commentedon Aug 24, 2026
Released: v1.12.0 — installer and portable zip are both up, and the installer path auto-updates.
feat(terminal): right-click copies the selection or pastes (#336)