The Codex CLI and the Codex app run the same agent on the same ChatGPT plan and read the same ~/.codex configuration. The CLI wins on scriptability, CI, SSH, Linux and precise per-run flags. The app wins on supervising several tasks at once, each in its own git worktree, with a review queue, scheduled automations and phone control. Use the CLI as a default if you automate; use the app as a default if you routinely run more than two agents at a time.
- Same agent, same plan, same
~/.codex/config.tomlandauth.json. - CLI is the only one that runs on Linux, over SSH, and in CI.
- App is the only one with parallel worktrees, a review queue, automations and phone control.
- The app is macOS (Apple Silicon) and Windows only.
- There is no separate allowance: both draw on one set of account limits.
codex appopens the app from a terminal, so switching costs one command.
The short answer
| If this is you | Default to |
|---|---|
| You script things, or run agents in CI | CLI |
| Your work happens on Linux or a remote box | CLI |
| You run one task at a time and read the diff yourself | CLI |
| You keep three to six agents busy across repositories | App |
| You want work scheduled rather than triggered | App |
| You want to approve commands from your phone | App |
| You are on an Intel Mac | CLI (the app needs Apple Silicon) |
The full matrix
Verified against OpenAI documentation, August 2026.
| Codex app | Codex CLI | |
|---|---|---|
| macOS, Apple Silicon | Yes | Yes |
| macOS, Intel | No | Yes |
| Windows | Yes | Yes |
| Linux | No | Yes |
| Over SSH, headless server | No | Yes |
| Inside CI | No | codex exec |
| Parallel chats, managed worktrees | Built in | By hand |
| Review queue with diffs | Yes | git diff |
| Scheduled work | Automations | cron plus exec |
| Control from a phone | Yes | No |
| Per-run sandbox flag | Via settings | -s read-only |
| Per-run config override | No | -c key=value |
| Resume, fork, archive sessions | In the UI | resume, fork, archive |
| Machine-readable output | No | JSONL from exec |
| Acts as an MCP server | No | codex mcp-server |
Reads AGENTS.md | Yes | Yes |
MCP servers from config.toml | Yes | Yes |
| Included in your ChatGPT plan | Yes | Yes |
Where the CLI is genuinely better
It is the only one that composes
# non-interactive, exits with a status, streams JSONL
codex exec "run the test suite and fix what fails"
# one-off overrides that never touch your config file
codex -s read-only -c model_reasoning_effort="high" "audit auth.ts for injection"
# scope it to a package without changing directory
codex -C packages/api "add integration tests"
None of that has an equivalent in a desktop UI, and it is why the CLI stays installed even on machines where the app is the daily driver.
It runs where you are not sitting
A build server, a container, a GPU box, a colleague's machine over SSH. The app requires a desktop session on macOS or Windows. The CLI requires a shell.
It is precise about permissions
Sandbox and approval policy are two separate dials on every invocation: -s read-only for exploring an unfamiliar repository, -s workspace-write with -a on-failure for real work. Setting that per task, per repository, from the command line, is faster than any settings pane.
Where the app is genuinely better
Parallel work stops being your problem
A chat can take its own managed git worktree, created under $CODEX_HOME/worktrees and configurable in Settings, Worktrees, so two agents in one repository cannot collide. Setup scripts run automatically when a worktree is created, which handles the untracked files a fresh checkout is missing. You can script all of this around the CLI, and plenty of people do, but the bookkeeping (create the worktree, run setup, launch in it, remember it exists, clean it up) is exactly the work a UI should absorb.
Review is in the app, not the scrollback
Six finished tasks in a terminal means six scrollbacks and six git diff invocations in six directories. In the app the diff pane takes inline comments for Codex to address, stages or reverts individual hunks, commits, pushes a branch and opens a pull request. /review in the composer reviews against a base branch or just the uncommitted changes.
Work that happens without you
Automations run on a schedule rather than when you type. The CLI equivalent is real (codex exec under cron) and meaningfully more setup, especially if you want the result surfaced somewhere you will see it.
Approvals from your phone
Settings, Connections, "Control this Mac or PC" pairs a phone by QR code. From the Remote tab you can watch tasks, approve or deny commands, read diffs and send instructions, while the work stays on your own machine. Your computer has to stay awake and online.
Cost is not a factor
Worth stating plainly because it is the most common assumption behind this comparison. Codex is included with ChatGPT Plus, Pro, Business, Edu and Enterprise, and the plan covers the app, the CLI, the IDE extension and the cloud alike. There is no app tier and no CLI discount.
| Path | Billing |
|---|---|
| App, signed in with ChatGPT | Your plan |
| CLI, signed in with ChatGPT | Your plan, same pool |
| IDE extension, signed in with ChatGPT | Your plan, same pool |
CLI with OPENAI_API_KEY set | Per token, on the platform |
openai/codex-action in CI | Per token, on the platform |
The problem neither of them solves
Both surfaces are Codex-only, and almost nobody runs one agent. Once Claude Code, Cursor or Gemini are also in the mix, on more than one machine, across more than one account, the question stops being which Codex front end and becomes: what is running right now, what is waiting on me, how much quota is left, and what did all of it cost.
Questions people ask
They run the same agent on the same account and read the same ~/.codex configuration. The app adds parallel tasks in isolated git worktrees, a review queue, scheduled automations and phone control, on macOS Apple Silicon and Windows. The CLI adds scripting, non-interactive exec, per-run flags, SSH and Linux support.
Neither in general. Default to the CLI if you automate, work on Linux, or run one task at a time. Default to the app if you keep three or more agents busy at once and want the diffs queued for review. Most people install both.
Yes. Both work out of the same Codex home, ~/.codex unless CODEX_HOME points elsewhere, so config.toml settings such as model, sandbox mode, approval policy and MCP servers apply to both, as does your project AGENTS.md. The app even puts its managed worktrees under $CODEX_HOME/worktrees.
No, and that is the trap. Your ChatGPT plan is per account, so the app and the CLI spend from one pool. Running several app tasks and a CLI session at once drains it faster, not further.
No. The desktop app is macOS (Apple Silicon) and Windows only. On Linux the CLI is the full product and misses nothing except the supervisory UI.
Run codex app. The CLI launches the ChatGPT desktop app, where Codex is a mode alongside Chat and Work.
No. Use codex exec for non-interactive runs, or the openai/codex-action GitHub Action, which installs the CLI on a runner. Both bill per token with an API key rather than against your ChatGPT plan.
No. It is a separate supervisory surface: worktree isolation per task, a review queue, automations and remote control are app features with no direct CLI equivalent. The shared part is the account, the config root and the agent itself.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.