blog /

Codex CLI From Phone: Gemini CLI and OpenCode Too

A common way to run Codex CLI from phone is to ssh in from a terminal app and attach to tmux. It works, but tmux is not agent-specific: nothing in it tells you that Codex stopped to ask for approval, so the run sits there until you next look. The better way is a phone view that knows each agent's state. Below is one for Codex, Gemini CLI and OpenCode, the flow you would use for Claude Code.

The whole job is four commands on the computer and a few taps on the phone:

qoop new --name codex --cwd ~/my-project -- codex
qoop new --name gemini --cwd ~/my-project -- gemini
qoop new --name opencode --cwd ~/my-project -- opencode
qoop agents

Without qoop: Codex CLI from phone, and the other two

Here is what each vendor's own documentation says.

AgentPhone route in the vendor's docsWhat it asks of you
CodexCodex in the ChatGPT mobile app on iOS, or Remote in app versions that still use that labelThe host must run the ChatGPT desktop app on macOS or Windows, awake, online and signed in to the same account and workspace. The page says mobile setup starts from the desktop app, and you can't set it up from the Codex CLI or IDE extension.
OpenCodeopencode web, a browser interface served by your computerIt binds to 127.0.0.1 unless you pass --hostname 0.0.0.0. Set OPENCODE_SERVER_PASSWORD before you open it to a network, since the docs say the server is unsecured without it.
Gemini CLINone in the pages read for this postIts notification page covers desktop alerts (OSC 9, or a terminal bell), not a phone.

Codex's CLI reference also lists an experimental codex remote-control. The Remote connections page, in its SSH host section, says not to expose app-server transports on a shared or public network, and to use a VPN or mesh network to reach a remote machine outside yours. See OpenAI's Remote connections page and OpenCode's web docs. OpenCode v2.0.32 lists serve and pair in opencode --help instead, so check your version's help before copying a command.

That is separate setups per vendor, and the Gemini CLI pages read for this post describe no phone route. The fallback is ssh plus tmux, which the tmux wiki describes as protection from connection drops. Happy's original CLI supports Claude Code and Codex, and Paseo names Codex and OpenCode. cmux is a macOS terminal that names Gemini CLI, Codex and OpenCode, and its iOS companion app is in beta. The rest of this post is one list for all three with qoop.

Before you start

You need:

  • A Mac, or a Linux computer (x86_64 or arm64). On Windows, qoop runs only under WSL.
  • Codex, Gemini CLI or OpenCode installed and signed in there.
  • qoop installed, for example with curl -fsSL https://qoop.si/install.sh | sh. Run it as yourself, never with sudo.
  • The computer signed in to your qoop account. Run qoop login, type the code it prints at the page it names, and look for linked to <email>. this computer now shows on qoop.si/app.
  • A phone signed in with the same account (Google, Apple, GitHub or an email code): the qoop app on Android, or a browser at https://qoop.si/app, which is the way on an iPhone today.

Account sign-in needs no pairing. qoop pair pairs the app by code without an account; a browser cannot pair or receive push. A server can be paired itself over ssh with ssh -t devbox '~/.local/bin/qoop pair', with a qoop session running there and its QR code scanned in the qoop app (Android today), so the phone reaches it with your Mac off.

Step 1: Start the agent in a qoop tab

Open qoop in your project with cd my-project and qoop, then use the commands from the top of this post in a qoop tab. --cwd sets the folder the agent starts in. The installed qoop --help describes qoop new as: "open a terminal, print its number, type the command into it". Add --space review to put the agent in a space of that name, made if it is missing.

Step 2: Open the Agents list on the phone

Open the qoop app, or https://qoop.si/app. You see five places: Board, Inbox, qass, Agents and Settings. Open Agents. Your Codex, Gemini CLI and OpenCode tabs sit in this one list beside any Claude Code tabs, each with its state. In the qoop app, Agents opens on Priority, which sorts by who wants you most, with Tree as the second page. A browser can answer a waiting agent, type into a terminal and start an agent in a space.

In the qoop app you can start one too: tap the plus on the Agents title. The New agent sheet asks "What should an agent work on?", and its "Start in a new branch" button makes a git worktree for claude, codex or opencode when a repository tab is open. For Gemini CLI, use the qoop new line from Step 1.

Step 3: Type into the agent

Open an agent from Agents or Inbox. In the qoop app, the field at the bottom reads Type to <program>, naming the one you started, and "Send, press Enter" is the Enter key. The rest of the terminal page works as described in controlling Claude Code from your phone.

Step 4: Answer a prompt with key chips

A blocked agent comes first under "Needs you" in Inbox, on a card that quotes the question from its screen. This is the one place the agents differ.

For Claude Code the card carries buttons: its numbered menu, one tap per number. For Codex, Gemini CLI and OpenCode the phone gives plain key chips on the terminal page instead, built from the keys the menu shows, or 1 2 y n when it sees no menu. In the qoop app, two key rows on the terminal page cover the rest: Tab, Esc, ^C, the arrows and a Ctrl key. Move through a menu with the arrows, then press the send button, which is Enter.

What is safe to approve is a separate question, taken up in Codex approval notifications.

Step 5: Check state from the hook

A hook is the agent's own report of its state, and it is optional. Without one, qoop reads the screen. With one, the state arrives the moment it changes, with the agent's conversation id.

AgentHookAnswering on the phone
Claude CodeState and conversation idNumbered menu buttons
CodexState and conversation idKey chips
Gemini CLIState and conversation idKey chips
OpenCodeState and conversation idKey chips

qoop installs these itself on install, on update, and for agents you install later. To look, run qoop hooks status. An agent already running when its hook went in has to be started afresh. To see where one state came from, run qoop agents explain <terminal>: it names the state, the source (hook or screen) and the rule. More per agent: Gemini CLI notifications and OpenCode notifications.

With the Mac off

The phone is a window onto the computer running the agent, so a laptop with its lid shut is out of reach. Add a server once with qoop remote add devbox me@devbox and run the agents there. After qoop login its spaces, such as devbox:api, show on the phone through your account, but to reach them with the Mac off you pair the server itself, with the ssh line from Before you start. Everything in a remote space runs on the server, so agents keep working while the laptop sleeps. On a Linux server, run sudo loginctl enable-linger <user> once, so your agents outlive the ssh session.

Check it worked

  • qoop agents prints one line per terminal, beginning term=<number> state=<state> program=<program>, and a line shows the program you started.
  • On the phone, Agents lists that agent. If you see "No computers yet", the computer is not signed in or the account differs.
  • Type a short line, tap "Send, press Enter", and watch it arrive on the computer.
  • Give the agent a task that needs approval. A card should appear under "Needs you", and the Inbox tab in the app shows a count badge.
  • Tap a key chip and watch the computer's prompt take it.

When it does not work

What you seeLikely causeWhat to do
"No computers yet"qoop login not done, or another account on the phoneRun qoop login again, sign in on the phone with the same account
The agent is missing from AgentsIt was not started inside qoopStart it with qoop new -- <program>
No numbered buttons on a Codex cardExpected: they are Claude Code onlyUse the key chips on the terminal page
State looks wrongHook missing, or the two disagreeqoop agents explain <terminal>, then qoop hooks status
Codex hook seems inactiveThe Codex docs say a new or changed hook is skipped until you review and trust itOpen /hooks in Codex. State still shows from the screen meanwhile.
No push alertsThe browser cannot send them, and the qoop app is Android only todayUse the Android app and allow notifications
A browser asks to be approvedIt is not yet on the accountApprove it on the computer with qoop devices approve

Sign up at qoop.si, then start your three agents and watch them line up in one list.