All articles
Tonis Tiganik---10 min read

Codex CLI Remote Control: Phone, SSH, and tmux Setup

Run codex remote-control, pair ChatGPT mobile, or reach an existing Codex tmux pane. Includes desktop, Linux/SSH, pairing-code, and security setup.

Codex CLI Remote Control: Phone, SSH, and tmux Setup

Introduction

Can you control Codex CLI from your phone? Yes, but first choose which session you need. OpenAI documents desktop pairing for supported Codex chats and an experimental codex remote-control start and pair path for CLI hosts. For an independent Codex CLI process already running in tmux, ClawTab Remote streams and controls that same pane.

OpenAI's Remote view in the ChatGPT mobile app can connect to a trusted laptop, devbox, or remote environment. You can review terminal output, diffs, tests, screenshots, and approvals while the files and credentials remain on that machine. For a Codex-only workflow, this is the native path.

The attachment boundary still matters. The general Remote guide pairs ChatGPT mobile with a Mac or Windows desktop host, which can also start Codex on an SSH host. The separate CLI commands run a remote-enabled app-server and print a pairing code. Neither route means that every unrelated codex process already running in tmux is automatically imported as its original terminal pane.

This guide shows the current desktop and SSH setup, then compares it with ClawTab Remote, which controls the tmux workspace itself. That lower-level boundary matters when several providers share a workspace or scheduled shell jobs need the same phone interface.

What OpenAI's Codex Remote Connection Does

OpenAI describes Codex in the ChatGPT mobile app as a live view into trusted machines where Codex is working. The phone can load active threads and project context, show output as it arrives, and let you approve commands or change direction. OpenAI says screenshots, terminal output, diffs, test results, and approvals can flow back to the phone.

The execution boundary stays on the connected machine. Files, credentials, permissions, and the local toolchain do not move onto the phone. A secure relay keeps the machine reachable without requiring you to expose it directly to the public internet. See OpenAI's announcement, Work with Codex from anywhere, and the current Remote connections documentation.

Native Codex mobile capabilityWhat it means in practice
Remote view in ChatGPT mobileOpen supported Codex chats and connected hosts from a phone.
Live machine stateFollow active threads, terminal output, tests, diffs, screenshots, and approvals.
Local executionThe repository, credentials, tools, and permissions stay on the laptop or remote machine.
Secure relayThe trusted machine does not need a public inbound terminal port.
Codex-native scopeThe mobile surface is designed around Codex chats and connected hosts, not every unrelated process in a tmux server.

Set Up Codex Remote From Desktop or CLI

Desktop path: Install the latest ChatGPT desktop app on macOS or Windows, sign in to the same account and workspace as the phone, then open Settings > Connections > Control this Mac or PC. Choose Set up or Add, approve remote access, and scan the QR code with ChatGPT on iOS or Android. Once paired, Remote can start or continue supported Codex chats on the host, show diffs and tests, and handle approvals. The host must remain awake, online, and signed in.

Experimental CLI path: OpenAI's Developer commands reference also documents codex remote-control start to run a remote-enabled local app-server daemon and codex remote-control pair to print a short-lived manual pairing code. Run start on the host, then pair and enter the code in a compatible Remote client. The CLI path is marked experimental; check your installed codex remote-control --help and verify the connection before depending on it for unattended work.

For a project on Linux or another development server, add a concrete host alias to ~/.ssh/config, confirm normal SSH access, and install and authenticate Codex on that host. Then add the SSH host in the desktop app under Settings > Connections and choose a project folder. OpenAI's Remote connections guide documents both flows and warns against exposing the app-server transport directly on a public network.

These Codex-native paths do not adopt every independent Codex process that you previously launched in tmux. If preserving the exact live pane, scrollback, shell state, and neighboring non-Codex processes is the requirement, connect at the tmux layer instead.

Codex Mobile vs ClawTab Remote

The products overlap at the phone, but they attach at different layers. OpenAI owns the Codex conversation and can present structured Codex artifacts. ClawTab owns the local tmux workspace and can present the terminal processes running inside it.

QuestionCodex mobile Remote tabClawTab Remote
What does the phone attach to?A supported Codex chat or connected hostA local ClawTab and tmux workspace
ProvidersCodexCodex CLI, Claude Code, OpenCode, and shell panes
Structured Codex artifactsThreads, diffs, tests, screenshots, approvals, and project contextLive terminal state, detected questions, pane input, job state, and schedules
Existing tmux pane with its original shell stateNot the native attachment boundaryYes, when the pane is part of the ClawTab workspace
Scheduled local jobsUse Codex's supported scheduling surfacesStandard cron-backed ClawTab jobs share the same remote view
Machine needs to stay reachableYes, for work executing on that machineYes; tmux survives terminal disconnects, not machine sleep or power loss

Choose the native Codex path when one provider owns the whole workflow and its structured review experience matters. Choose ClawTab when the operational unit is a local pane rather than a provider conversation. The broader local versus cloud coding agent comparison covers what changes when the task should run independently of your workstation.

ClawTab iPhone app listing multiple Codex CLI and Codex sessions with pane IDs, models, and live status
The ClawTab iPhone tab list shows several Codex sessions from one local tmux workspace, including pane IDs, recent prompts, model labels, and status.

A Real Local-Agent Approval Flow

A remote-control system earns its keep at the blocking point. The agent asks for permission or a choice, the phone shows enough recent output to make the decision, and the answer returns to the same local process.

The screenshot below shows ClawTab detecting interactive questions in local tmux panes and rendering the active prompt as mobile buttons. This captured run uses Claude Code, which makes the prompt boundary easy to see. The transport itself is pane-based: Codex CLI and OpenCode panes use the same live-output and input route, while prompt parsing adapts to the terminal UI each provider emits.

ClawTab phone interface over local tmux panes showing an agent question with selectable answers
A real local tmux prompt rendered on the phone. This captured prompt is from Claude Code; ClawTab's remote transport controls the pane rather than requiring a provider-owned mobile session.

Set Up Phone Access Without Publishing a Terminal

Do not solve this by forwarding SSH or a raw terminal port to the internet. Both the native Codex route and ClawTab use an outbound relay model so the development machine stays behind its normal network boundary.

  1. Pick the attachment layer. Use OpenAI Remote for a Codex-native chat or host. Use ClawTab when the target is an existing tmux pane or a mixed-provider workspace.
  2. Keep the repository on the machine that runs the agent. Start the job in the intended checkout or, for multiple writers, a dedicated Git worktree and tmux pane.
  3. Connect the mobile client through the product relay. Sign in to ChatGPT mobile for native Codex access, or pair the ClawTab iOS/web client with the desktop app.
  4. Test a harmless approval. Ask the agent to run a read-only command that requires confirmation. Verify that the phone shows the command and enough surrounding output before allowing it.
  5. Test reconnection. Detach the terminal, switch the phone between Wi-Fi and cellular, and confirm that the same thread or pane returns.

tmux preserves the process when the terminal disconnects. It does not keep a sleeping or powered-off Mac online. If the job must continue with no dependency on your machine, use a hosted Codex task instead of remote control of a local process.

ClawTab iPhone detail view streaming a local Codex CLI terminal with mobile keyboard and control keys
A live Codex CLI pane on iPhone. The detail view keeps terminal output, the prompt field, escape and control keys, model, effort, and remaining context visible.

Use One Phone View for Codex, Claude Code, and OpenCode

Provider-native remote control is usually the best client for that provider. The trade-off appears when a workspace contains more than one agent type.

A common local setup has Codex reviewing one worktree, Claude Code implementing in another, OpenCode handling a smaller task, and ordinary shell panes running tests or a local service. Opening separate provider apps does not show whether the full workspace is healthy. A tmux-level view does.

  • One process boundary: each agent remains an ordinary tmux pane with its existing CLI state.
  • One mobile queue: waiting prompts from different panes appear together instead of being split by provider.
  • One scheduling layer: cron jobs and interactive agents can share the same local machine and remote status view.
  • One permission policy per pane: use manual approval by default, then enable auto-yes narrowly for a trusted, isolated task.

This is the main reason to add ClawTab around Codex CLI. It does not replace Codex's models, reasoning, diff review, or native mobile experience. It gives several local tools one operational home.

Does Codex CLI Have Remote Control Like Claude Code?

Both providers offer a phone path, but the setup differs. Anthropic's Remote Control documentation connects a local Claude Code CLI or VS Code session to claude.ai/code and the Claude mobile app. OpenAI's general Remote guide pairs a phone with a ChatGPT desktop host, while its developer reference documents experimental CLI pairing. Neither provider's mobile view is a general dashboard for every Claude Code, Codex CLI, OpenCode, and shell pane already running in tmux.

Claude's native path supports browser and mobile conversation sync, permission handling, file attachments, push notifications, and multi-session server mode. For a Claude-only workflow, use it. See Anthropic's Remote Control documentation.

Use ClawTab when the boundary is broader than Claude: mixed providers, existing tmux panes, shell processes, cron schedules, or one phone queue for the whole local workspace. This is the same decision as Codex native versus ClawTab—provider conversation versus terminal control plane.

Security Questions to Answer Before Leaving the Desk

Remote control keeps execution local, but it expands who can approve local actions. Treat the phone as a privileged development client.

  • What is exposed? Prefer an authenticated outbound relay. Do not publish tmux, SSH, or a web terminal directly.
  • Where does session data live? Read the provider's retention policy. Local execution does not mean that every message, transcript, or artifact stays only on the workstation.
  • What can one approval do? Keep sandboxing and least-privilege credentials enabled. A phone-sized screen is a poor place to approve a long destructive command.
  • Can you identify the target? Name each project, worktree, and pane clearly so an approval cannot land in the wrong repository.
  • What happens after theft? Require device authentication, keep account recovery current, and revoke the mobile session immediately if the phone is lost.

ClawTab connects its desktop and mobile clients through TLS and a relay rather than opening an inbound terminal port. The existing remote access guide covers its connection model, push notifications, and self-hosted relay option in more detail.

Which Remote Coding Agent Setup Should You Use?

Your actual requirementStart here
Review and steer supported Codex work with native diffs, tests, and approvalsChatGPT mobile Remote
Continue one or more local Claude Code sessions from mobile or browserClaude Code Remote Control
Reach a standalone Codex CLI process already running in tmuxClawTab Remote
Monitor Codex, Claude Code, OpenCode, and shell panes togetherClawTab Remote
Run when the laptop is asleep or disconnectedCodex cloud or another hosted agent environment
Operate a production service with no interactive promptsA process supervisor and deployment tooling, not a coding-agent phone UI

Start with the provider-native client when it covers the whole job. Add a local control plane only when the terminal session, tmux workspace, or mixed-provider queue is the real source of truth. For a wider tool comparison, see the guide to multiple AI coding agents and managers.

Frequently Asked Questions

Yes. Pair ChatGPT mobile with a Mac or Windows host through the ChatGPT desktop app, or use the experimental Codex CLI remote-control commands to start a host and create a manual pairing code. ClawTab can also control a separate Codex CLI process already running in tmux.

Yes, experimentally. OpenAI documents codex remote-control start for the local app-server daemon and codex remote-control pair for a short-lived manual pairing code. Its general Remote guide still describes the desktop QR pairing flow, so check your CLI version and verify the client connection.

No. Codex remote control creates a Codex-native remote environment, but it does not automatically adopt every unrelated CLI process already running in tmux with its original pane state. Use a terminal-level controller such as ClawTab when that exact live pane is the target.

OpenAI says its Codex mobile experience uses a secure relay that keeps trusted machines reachable without exposing them directly to the public internet. Files, credentials, permissions, and local setup stay on the machine where Codex operates.

Yes. ClawTab Remote connects to the local tmux workspace, streams pane output, and sends input back to the selected pane. Because the boundary is the terminal pane, the same remote view can include Codex CLI, Claude Code, OpenCode, and shell jobs.

Remote control of a local agent pauses until the machine and network return. tmux protects the process from terminal disconnects, but it cannot run on a sleeping or powered-off computer. Use a hosted Codex task when the work must be independent of the laptop.

They solve a similar problem for different provider sessions. Claude Code connects its local CLI or VS Code sessions to Claude web and mobile. Codex exposes supported Codex chats and connected hosts in ChatGPT mobile. ClawTab instead connects to tmux panes and can show several providers together.

SSH is useful for full terminal administration when it is protected by a VPN, strong keys, and careful network rules. For quick agent approvals and status checks, a purpose-built authenticated relay reduces the need to expose or navigate a raw terminal on a small screen.

Related Articles

AI Coding Agent Dashboards Compared: tmux, Worktrees, and Mobile Control
-12 min read

AI Coding Agent Dashboards Compared: tmux, Worktrees, and Mobile Control

Compare ClawTab, dmux, workmux, webmux, AgentDock, and Agent of Empires for tmux sessions, Git worktrees, agent status, notifications, mobile control, and recovery.

ai-coding-agentsdashboardtmuxgit-worktreesmobilecomparison
Claude Code on Your Phone: Remote Control AI Agents From iOS, Android, or Browser
-6 min read

Claude Code on Your Phone: Remote Control AI Agents From iOS, Android, or Browser

Run Claude Code on your Mac and answer agent questions from your phone. Live log streaming, push notifications, permission prompt detection, and multi-viewer support - works with iOS, Android, and any browser via ClawTab Remote. A practical alternative to Claude Code's built-in Remote Control.

remotemobileagents
Run Claude Code and Codex CLI in tmux Without File Conflicts
-14 min read

Run Claude Code and Codex CLI in tmux Without File Conflicts

Run Codex CLI and Claude Code in tmux with one writer per Git worktree. Prevent file conflicts and build a safe parallel-agent review workflow.

claude-codecodex-clitmuxgit-worktreesmcpmulti-agentcode-review
Local vs Cloud AI Coding Agents: Claude Code, Codex, GitHub
-12 min read

Local vs Cloud AI Coding Agents: Claude Code, Codex, GitHub

Updated comparison of local terminals, remote-controlled sessions, desktop worktrees, cloud tasks, GitHub agents, browser runtimes, and hybrid coding workflows.

ai-coding-agentsclaude-codecodexgithubbrowser-agentscloud-agentslocal-agentscomparison
Multi-Agent Coding Tools and Managers Compared in 2026
-12 min read

Multi-Agent Coding Tools and Managers Compared in 2026

Compare Cursor, Claude Code, Codex, OpenCode, and tmux agent managers for parallel sessions, Git worktrees, dashboards, remote control, and local or cloud execution.

cursorcursor-auto-modewindsurfclaude-codecodexopencodecomparisonagent-idemulti-agentremote-control
OpenCode Auto Mode and Auto-Yes for Claude Code & Codex
-7 min read

OpenCode Auto Mode and Auto-Yes for Claude Code & Codex

Run opencode --auto, set auto-approve permissions, and learn why YOLO mode is called auto mode. Compare it with per-pane approval controls.

auto-yesclaude-codecodexopencoderemoteautomationtmux
Claude Code Cron Jobs: Schedule Persistent AI Agents That Survive Reboots
-7 min read

Claude Code Cron Jobs: Schedule Persistent AI Agents That Survive Reboots

Set up Claude Code agents on a cron schedule that keeps running even after a reboot. ClawTab injects Keychain secrets, auto-approves permission prompts, and pushes alerts to your phone — compare with Claude Code /schedule and /loop.

cronautomationscheduling