How to use Codex CLI from your phone
Codex CLI runs on the machine that has your repositories, toolchains, and credentials. Long tasks often stop on an approval prompt while you are away from that terminal. This article compares the ways to reach a running Codex session from a phone and which one fits which setup.
Pontia is the tool we build.
The short answer
| Your situation | Best fit |
|---|---|
| Codex runs on Linux or macOS, including a headless server, and you want a phone UI with approval buttons | Pontia |
| Codex runs on a Mac or Windows PC with the ChatGPT desktop app | ChatGPT mobile remote control |
| The task can run from a clean checkout on OpenAI’s machines | Codex Cloud |
| You prefer to assemble and maintain the remote access yourself | SSH or Mosh, tmux, and a private network |
Option 1: Pontia
Pontia is a free, open-source remote control for coding agents running on your own machine. You install it once, sign in, and open app.pontia.dev on your phone. There is no VPN, port forwarding, or terminal app to set up.
Codex CLI includes an app-server daemon. The ChatGPT desktop app also uses it, to run Codex on SSH hosts. Pontia’s local service, pontiad, connects to that daemon and shows each Codex thread as a chat. From a phone you can:
- start a Codex session in a project directory;
- follow messages, tool calls, and command output as they stream;
- answer approval requests for commands, file changes, and extra permissions with Allow or Deny;
- send or queue follow-up messages, interrupt a turn, and switch models with
/model; - reference project files with
@.
Codex runs on your machine with its own credentials, sandbox, and approval policy. Sessions persist, so you can start a task at your desk and continue it from your phone. The browser and your machine set up an end-to-end encrypted session through Pontia’s relay, which only forwards ciphertext. Your machine connects out, so it needs no open inbound port.
Pontia supports Linux (x86_64 and ARM64) and macOS 11 or later, including headless servers.
Setup
On the machine, as the user who runs Codex:
codex login --device-auth # device code flow, works over SSH
curl -fsSL https://get.pontia.dev/install.sh | sh
pontia init # select Codex pontia init does the rest:
- it configures the Codex daemon to start automatically, with a systemd user service and lingering on Linux, or a LaunchAgent on macOS;
- it signs you in with Google or GitHub through a URL and one-time code, which you can approve from your phone;
- it registers the machine with an official relay.
When it finishes, open app.pontia.dev, pick the machine, and start a session.
The optional Codex launcher also makes threads you start with codex in a terminal appear in the Dashboard, so you can continue them from the phone. See Codex setup. Advanced users can run their own relay instead of the official one.
Option 2: ChatGPT mobile remote control
OpenAI’s own remote control lets the ChatGPT mobile app start chats on a connected computer, steer active work, approve commands, and review diffs and terminal output. Work runs on the host with its files, credentials, and sandbox settings.
The host must be a Mac or Windows PC running the ChatGPT desktop app. OpenAI’s Remote connections guide states that mobile setup starts from that app, and that you can’t set it up from the Codex CLI or IDE extension. Workspace admins may need to enable Remote Control. To reach a Linux server this way, the desktop app connects to the server over SSH, so the Mac or Windows host must stay awake as well.
Use this if you already work in the ChatGPT desktop app on Mac or Windows.
Option 3: Codex Cloud
Codex Cloud runs tasks on OpenAI-managed machines, so they continue while your computer sleeps, and you can start and continue them from the mobile app. A cloud task uses only the files and services in its cloud environment. OpenAI’s environment docs note that your local files, running processes, and VPN access are not transferred to it.
Use this for work that can run from a clean checkout. It does not fit tasks that depend on a local database, a private network, hardware, or credentials you keep on your own machine.
Option 4: Build it yourself with SSH and tmux
You can also assemble remote access from standard tools: tmux keeps Codex running, a private network such as Tailscale makes the machine reachable, and a phone SSH client connects to it.
# on the host
tmux new -s codex
codex
# from the phone, over SSH or Mosh
tmux attach -t codex Mosh keeps the connection alive when the phone switches between Wi-Fi and mobile data, which plain SSH does not.
You set up and maintain each piece yourself: the private network on both devices, SSH keys on the phone, a terminal app, and tmux. On the phone you then operate a full-screen TUI on a small keyboard. You scroll back through tmux to see what happened, and nothing tells you when Codex is waiting for approval.
Pick an approval policy that works on a phone
Whichever option you choose, a phone is a poor place to review a long command. Codex’s approval policy decides how often you will be asked. OpenAI’s approvals and security guide describes the Auto preset, --sandbox workspace-write --ask-for-approval on-request. With it, Codex edits files and runs commands inside the workspace without asking, and asks before writing outside it or using the network.
That suits remote supervision. Routine edits proceed, and the requests that reach your phone are the ones worth reading. Running with approvals disabled removes the reason to watch from a phone at all, so keep that for sandboxed or disposable machines.
Related
- Run coding agents on a VPS for an always-on Linux host
- How to use pi coding agent from your phone
- How Pontia works and Security