OpenAI Codex CLI on iPhone, iPad & Android
Use OpenAI's Codex CLI, the ChatGPT coding agent, from your phone with HQSSH: one-tap launch with notifications on, approval alerts that show Codex's message, and a transcript that survives the keyboard opening and closing.
Updated
Codex CLI is OpenAI's terminal coding agent, the one you can use with your ChatGPT plan. It runs on your machine, next to your code. HQSSH lets you drive it from an iPhone, iPad or Android phone over SSH, and fixes the problems that make Codex hard to use in most mobile terminals.
What HQSSH adds for Codex
| Plain SSH app | HQSSH | |
|---|---|---|
| Start Codex | Type the command and remember the flags | LAUNCH CODEX with notifications already on |
| Approval requests | You find out when you look | Phone notification with Codex's message |
| Transcript after the keyboard opens or closes | Often wiped | Kept: scroll back through the whole conversation |
| Survives a dropped connection | Only inside tmux | Yes, sessions live in the hqsshd daemon |
| Unattended jobs | No | Tasks run codex exec and keep the output |
| Authentication | Any | Any: ChatGPT sign-in or API key |
Set it up
Install Codex CLI on the machine and sign in once. On a server with no browser, use the device-code login:
npm install -g @openai/codex
codex login --device-auth
Then install the HQSSH daemon (Linux or macOS):
$ curl -fsSL https://hqssh.com/install | shOpen a project in the app and tap LAUNCH CODEX. The session keeps running when the phone sleeps or the network drops, and you can reattach from your phone, iPad or the hqssh attach desktop command.
Approval alerts that say what Codex wants
Codex can announce that it finished a turn or needs approval with an OSC 9 terminal notification, but the feature is off by default and there is no setting that turns it on permanently. HQSSH's launch button starts Codex with the flags that enable it:
codex -c tui.notifications=true -c tui.notification_condition=always
HQSSH reads the message in each notification, so your phone shows something like "Approval requested" instead of a bare ping. It works for every Codex session on the machine, including ones you aren't viewing, and the daemon can forward the same alerts to an ntfy topic for push notifications with the app closed.
A transcript that stays put
Codex draws its conversation in the normal terminal rather than a full-screen view, and clears the screen and the scrollback whenever the terminal is resized. On a phone, the terminal resizes every time the keyboard opens or closes, so in many apps the conversation vanishes while you type. HQSSH ignores the scrollback clear and keeps the history. It also asks Codex to redraw when you reattach, so you never land on a blank screen.
Phone-friendly Codex habits
- Resume, don't restart. The Continue Last snippet runs
codex resume --lastin the current directory. - Keep approvals on. A Bypass Approvals snippet exists, but it isn't run automatically. Answering an approval from a notification takes seconds, so you rarely need to bypass it.
- Hand Codex a screenshot. The image button uploads a photo and pastes its path into the prompt.
- Preview its dev server. The globe button forwards a remote port over SSH and opens it in your phone's browser.
Related
- How to use OpenAI Codex CLI from your phone: the full step-by-step guide, including Tailscale and tmux.
- Claude Code on iPhone, iPad & Android: the same workflow for Anthropic's agent.