I made a bash script to send screenshots into a remote ChatGPT Codex tmux session

Showcase

I made this for my own ChatGPT Codex setup. It's free/MIT, runs locally as one bash file, and installs nothing on the remote.

If you run ChatGPT Codex inside tmux on a remote box (I mosh + tmux into a Mac Mini), the problem I kept hitting was this: you want to show it a screenshot or hand it a file, and there's no clean way. You scp in another terminal and paste the path, which means opening another window and copying paths around every time.

It scps the file over and then types the remote path into Codex's prompt with tmux send-keys, so the path appears in Codex's input line — even though the agent owns the whole pane. If there's an image on your clipboard (a screenshot, or one from a phone via Universal Clipboard) it sends that instead of asking you to drag a file. Same thing works with Codex or aider, on macOS or Linux, over plain ssh or mosh.

https://github.com/kentaccn/paste-to-tmux

I keep seeing people run ChatGPT Codex over SSH, and screenshots are still awkward — curious how others handle it.

Posted Jul 6, 2026, 1:23 PM UTC

10
Loading comments…