OpenAI's Codex CLI is a coding agent that runs in a terminal on a computer. To use it from an iPhone, run it in a Tmux session on a Mac or Linux server, then connect to that session over SSH from the phone.
Shell Drop is a free SSH client for iPhone, iPad and iPhone Duo built for that loop: read what Codex did, send the next instruction, and leave it working when you lock the phone. Codex runs on the server the whole time; the phone is the screen and keyboard.
npm install -g @openai/codex
codextmux new -s codex
cd ~/projects/my-app
codextmux attach -t codexFor swipe scrolling through long Codex output, add set -g mouse on to the server's ~/.tmux.conf. The Tmux cheat sheet has the other lines worth adding.
Codex, Claude Code and other terminal agents can share one server, each in its own Tmux session, and Shell Drop shows each session as a tab. The same setup for Anthropic's agent is on Claude Code on iPhone, and features for AI agents covers the rest. If you are choosing between Claude Code's command line and its desktop app, Claude Code in the terminal vs the desktop app compares them.
The Codex CLI needs a real shell, a file system and the project's tools, and it can run for a long time on one task. An iPhone doesn't offer that. Running Codex on a server inside Tmux keeps the agent and its work there, and the phone can come and go: a dropped connection or a locked screen only detaches, and tmux attach picks up the same screen.
The Codex CLI runs on a computer, so it runs on a Mac or Linux server and the iPhone connects to it over SSH. Start Codex in a Tmux session on the server, then attach to that session from an SSH client on the phone, such as Shell Drop.
Install it from npm with npm install -g @openai/codex, then run codex and sign in. Run it inside a Tmux session so it keeps running after you disconnect.
Yes, when it runs in Tmux on the server. Locking the phone or losing signal only detaches the SSH connection; Codex keeps working, and tmux attach -t codex brings the session back.
Yes, with Shell Drop. Paste a screenshot or attach a file, photo or video from the toolbar. It uploads to the server over SSH and the file path lands at the prompt for Codex to read.