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 appHQSSH
Start CodexType the command and remember the flagsLAUNCH CODEX with notifications already on
Approval requestsYou find out when you lookPhone notification with Codex's message
Transcript after the keyboard opens or closesOften wipedKept: scroll back through the whole conversation
Survives a dropped connectionOnly inside tmuxYes, sessions live in the hqsshd daemon
Unattended jobsNoTasks run codex exec and keep the output
AuthenticationAnyAny: 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 | sh

Open 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 --last in 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

Frequently asked questions

Do I need a ChatGPT plan to use Codex CLI with HQSSH?

+

Codex CLI signs in on the server with a ChatGPT account or an OpenAI API key. HQSSH only carries the terminal, so it works with either.

Why does my Codex transcript disappear in other mobile terminals?

+

Codex clears the screen and the scrollback every time the terminal is resized, and on a phone every keyboard show or hide is a resize. HQSSH keeps the scrollback through those clears, so you can still scroll back through the conversation.

Can Codex run unattended tasks from my phone?

+

Yes. HQSSH tasks run `codex exec` with your prompt on the server and keep the output, so you can start a job from your phone and read the result later.

Keep reading