---
title: "Use the Codex CLI from your phone"
description: "Use Codex on mobile two ways: OpenAI’s remote connections for the ChatGPT desktop app, or a real terminal on your Mac, Windows or Linux PC for the Codex CLI."
author: "Foxl Team"
date_published: "2026-10-06"
date_modified: "2026-10-06"
canonical_url: "https://foxl.ai/blog/codex-cli-from-phone"
markdown_url: "https://foxl.ai/blog/codex-cli-from-phone/index.md"
image: "https://foxl.ai/blog/codex-cli-from-phone-cover.png"
social_image: "https://foxl.ai/blog/social/codex-cli-from-phone.png"
content_type: "Deep dive"
topics: ["Codex","Remote terminal","Mobile"]
products: ["Foxl Desktop","Foxl Mobile"]
---

<!-- Generated by scripts/blog-publishing.mjs; do not edit. -->

# Use the Codex CLI from your phone

> Use Codex on mobile two ways: OpenAI’s remote connections for the ChatGPT desktop app, or a real terminal on your Mac, Windows or Linux PC for the Codex CLI.

- Author: Foxl Team
- Published: 2026-10-06
- Last reviewed: 2026-10-06
- Reading time: 4 minutes
- Canonical HTML: [https://foxl.ai/blog/codex-cli-from-phone](<https://foxl.ai/blog/codex-cli-from-phone>)

![A phone and a laptop cut from paper, joined by one path: the terminal on the laptop screen is the one the phone shows.](<https://foxl.ai/blog/codex-cli-from-phone-cover.png>)

OpenAI’s own route is remote connections: the ChatGPT app on iOS or Android controls the ChatGPT desktop app on a Mac or Windows PC, and OpenAI says it cannot be set up from the Codex CLI. If you work in the Codex CLI, or on Linux, open a terminal on your own computer from your phone instead. Foxl does that, for free.

## Option 1: OpenAI remote connections

This controls Codex inside the ChatGPT desktop app. OpenAI lists what it needs:

- Codex access in the ChatGPT account and workspace you use.
- The latest ChatGPT app on an iPhone or Android phone.
- The ChatGPT desktop app on a Mac or Windows PC that is awake, online and signed in to the same account.
- Setup from the desktop app: **Settings > Connections > Control this Mac or PC**. OpenAI notes that availability can vary by rollout.

## Option 2: A terminal on your computer, opened from your phone

Here the phone is a window onto a real shell on your computer, so the Codex CLI runs exactly as it does at your desk, with your login and your files.

1. Download Foxl from [foxl.ai](<https://foxl.ai>) and sign in. It runs on macOS 13 or later, Windows 10 or later (64-bit) and Linux x86-64 (AppImage). Install it on the computer where `codex` already works.
2. In Foxl on that computer, open Settings, then **Connect > Mobile/Web**, and turn on **Remote access**.
3. On your phone, sign in with the same account: the [Foxl app for iPhone](<https://apps.apple.com/app/foxl-ai-agent-runs-24-7/id6778292200>), the Android APK from foxl.ai, or [app.foxl.ai](<https://app.foxl.ai>) in a browser. There is no pairing code.
4. In a chat, tap **+** and choose **Terminal**, then **New terminal**.
5. Type `codex`. It starts with your existing Codex login, because the terminal runs your usual shell with your usual environment.

The computer has to stay awake and online. Turn on **Keep running when closed** in Foxl’s General settings so it stays reachable after you close the window.

## Which one to use

|  | OpenAI remote connections | Terminal through Foxl |
| --- | --- | --- |
| Computer | Mac or Windows | Mac, Windows or Linux |
| What you drive | Codex in the ChatGPT desktop app | The Codex CLI, or any other CLI, in a real shell |
| On the phone | ChatGPT app (iOS, Android) | Foxl app (iOS, Android) or a browser |
| Price | Part of your ChatGPT plan | Foxl is free; Codex still uses your plan or API key |

## What travels between the phone and the computer

Foxl’s relay carries the connection. Terminal output and what you type are encrypted between your phone and your computer with keys the relay never holds, once both ends run Foxl 0.6.27 or later. Live chat is protected by TLS only. The [Desktop Relay docs](<https://docs.foxl.ai/docs/get-started/desktop-relay>) describe exactly what is covered.

## Questions people ask

### Can I set up Codex remote access from the Codex CLI?

Not with OpenAI’s remote connections: OpenAI says mobile setup starts from the ChatGPT desktop app and cannot be set up from the Codex CLI or IDE extension. A terminal opened from your phone runs the CLI itself instead.

### Does this work for Claude Code too?

Yes. The Foxl terminal is a normal shell on your computer, so any CLI installed there runs, Claude Code and Gemini CLI included. Anthropic also offers its own Remote Control for Claude Code on Pro, Max, Team and Enterprise plans.

### Is it free?

Foxl, its phone apps and remote access are free. Codex itself uses your ChatGPT plan’s limits or your API key, as it does on the computer.

### Does my computer have to stay on?

Yes. The terminal runs on your computer, so it has to be awake and online. Turn on Keep running when closed in Foxl’s General settings to keep it reachable after you close the window.

## References and further reading

1. [OpenAI: Codex remote connections](<https://learn.chatgpt.com/docs/remote-connections>) - Documentation
2. [OpenAI: Codex pricing and usage limits](<https://learn.chatgpt.com/docs/pricing>) - Documentation
3. [Anthropic: Claude Code Remote Control](<https://code.claude.com/docs/en/remote-control>) - Documentation
4. [Foxl docs: Desktop Relay and its encryption](<https://docs.foxl.ai/docs/get-started/desktop-relay>) - Documentation