Codex App vs Codex CLI: Differences and When to Use Each
The Codex app now lives inside the ChatGPT desktop app. The CLI is still the open-source, scriptable way to run Codex anywhere.
Last updated · By Adel Ahmadyan
The Codex app is now Codex inside the ChatGPT desktop app: OpenAI merged the two on July 9, 2026. Choose the desktop app when you want parallel chats with managed Git worktrees, a Handoff button that moves work between your checkout and a worktree, a diff pane with Git controls, and cloud tasks in one window on macOS, Windows, or Linux (in preview). Choose the Codex CLI when you work in a terminal, script Codex with codex exec, run it in CI or on a remote machine, or want the open-source client. You can also use both: they run on the same ChatGPT account and share MCP configuration.
This explainer covers every official Codex surface (the desktop app, the CLI, the IDE extension, Codex Cloud, and Remote from your phone), what Local, Worktree, and Cloud mean, and where a multi-agent workspace fits when Codex is one of several agents. Every claim below was reviewed against OpenAI's documentation on October 5, 2026.
What happened to the Codex app?#
Short version: the Codex app is now part of ChatGPT. If you searched for "Codex app" and landed on a page about ChatGPT, nothing is broken; OpenAI's What's new log tells the story:
- February 2026: the Codex app launched on macOS as a desktop workspace for parallel project chats, Git review, worktrees, skills, and scheduled tasks.
- March 2026: it arrived on Windows with native PowerShell and sandbox support.
- July 9, 2026: the Codex app merged into the ChatGPT desktop app for macOS and Windows. Codex keeps its own coding experience next to ChatGPT's Chat and Work modes, and you can make Codex the default view.
- August 2026: the ChatGPT desktop app, Codex included, reached Linux as a preview.
In practice, open the ChatGPT desktop app, choose Codex, and start a new chat. The capabilities people mean by "the Codex app" (worktrees, handoff, the diff pane, scheduled tasks, skills, and plugins) all live there now. The documentation moved too: developers.openai.com/codex now redirects to learn.chatgpt.com, and the old Codex app page redirects to the desktop app guide. The rest of this article says "desktop app" for that surface.
The short answer#
| Surface | Best for | Platforms | Runs on | Main tradeoff |
|---|---|---|---|---|
| Codex in the ChatGPT desktop app | Parallel chats, worktrees, visual review, cloud tasks in one window | macOS, Windows, Linux preview | Your computer, an SSH host, or Codex Cloud | Less scriptable; one vendor's agent |
| Codex CLI | Terminal work, scripting, CI, remote boxes | macOS, Linux, Windows | Wherever you run it | Worktree support is still experimental; no GUI review |
| IDE extension | Focused edits with editor context | VS Code, Cursor, Windsurf | Your computer, or Cloud by delegation | No plugins or local environment setup scripts |
| Codex Cloud | Long tasks that should finish while you are away | Web, mobile, desktop app | OpenAI's cloud, from a published environment | Cannot see local files, processes, or VPN |
| Remote (phone) | Starting, approving, and reviewing from your phone | ChatGPT mobile app with a Mac or Windows host | Your connected computer | Host must stay awake, online, and signed in |
Feature-by-feature comparison#
| Feature | Desktop app | CLI | IDE extension | Cloud |
|---|---|---|---|---|
| Parallel work | Parallel chats across projects | One session per terminal | Chats beside your code; /fork, /side | Each task gets its own workspace |
| Git worktrees | Built in: managed and permanent worktrees, Handoff | Experimental since v0.154.0: --worktree or /worktree | /worktree slash command | Not needed; separate working files per task |
| Local or cloud | Work in This computer or Cloud | codex cloud, codex apply | /local, /cloud | — |
| Setup scripts and actions | Local environments stored in .codex | Your own scripts | — | Published cloud environments |
| Reviewing changes | Diff pane with inline comments, stage, commit, push, PR | Review mode for uncommitted changes, a commit, or a branch | Inline diffs; keep only the edits you want | Review results, then commit or open a PR |
| MCP servers | Yes, shared configuration | Yes, codex mcp | Yes, shared configuration | — |
| Skills | Yes | Yes | Yes | — |
| Plugins | Plugins tab | /plugins | Not supported | — |
| Hooks | Yes, including plugin-bundled hooks | Yes; review with /hooks | Yes, same config layers as the CLI | — |
| Permissions | Ask for approval, Approve for me, Full access | /permissions, --sandbox, --ask-for-approval | Same control below the composer | Network and secrets set per environment |
| Automation | Scheduled tasks, including background worktrees | codex exec, Codex SDK | — | codex cloud exec from the terminal |
| Remote access | Host for Remote on your phone; SSH projects | codex remote-control; --remote to an app server | — | Web, mobile, and desktop |
| Open source | Not listed by OpenAI | Yes, Apache-2.0 | No | No |
OpenAI's MCP guide confirms that the desktop app, CLI, and IDE extension share MCP server configuration through config.toml, so a server you add once is available in all three. The plugins page is equally clear that the IDE extension does not support plugins. The open-source page lists the CLI, SDK, and app server as open source and marks the IDE extension and Codex Cloud as closed.
Local, Worktree, and Cloud: what each mode means#
Every Codex chat in the desktop app starts with a choice of where it runs. OpenAI's environments guide puts Local and Worktree on your computer and Cloud on a published environment.
| Mode | Where it runs | Isolation | Good for | Watch out for |
|---|---|---|---|---|
| Local | Your project directory | None; Codex edits your checkout | Hands-on work, your usual dev server and IDE | Two chats in one checkout can collide |
| Worktree | A separate Git worktree on your computer | Separate files, shared Git history | Background tasks while you keep working | Ignored files need .worktreeinclude |
| Cloud | A published cloud environment | Its own workspace per task | Long tasks, work while your laptop sleeps | No access to local files, processes, browser sign-ins, or VPN |
Local: the foreground#
Local means Codex works directly in the repository you opened. That is the right mode when you want to watch the change, run your existing dev server, or test in the environment you use every day. It is also the mode where parallel chats can step on each other, because they share one set of files.
Worktree: the background#
Worktree mode creates a Git worktree, a second checkout that shares the repository's history, so a chat can work without touching your files. According to the worktrees guide:
- Codex creates managed worktrees under
$CODEX_HOME/worktreesin a detached HEAD state, so several can exist without creating branches. Create branch here turns one into a branch when you want to push it. - Handoff moves a chat and its code between Local and its worktree. Codex handles the Git steps, because Git allows a branch to be checked out in only one place at a time.
- Files ignored by Git do not travel with a handoff. List the ones a new worktree needs, such as
.env, in a.worktreeincludefile. - Permanent worktrees, created from a project's menu, are never deleted automatically and can host several chats.
- By default Codex keeps your 15 most recent managed worktrees. It saves a snapshot before deleting one, so you can restore the chat's work later.
Pair worktrees with a local environment: a setup script that runs whenever Codex creates a worktree (installing dependencies, for example) and actions such as "Run" or "Test" that appear in the app's top bar. The configuration lives in a .codex folder you can commit, and local environments are a desktop-app feature.
Cloud: when your computer should be off#
Codex Cloud runs tasks in a cloud environment you prepare and publish from your GitHub repositories. Each task has its own working files and keeps going while your computer sleeps. You can start and follow tasks on the web, on mobile, or in the desktop app, and from a terminal:
codex cloud # browse and submit cloud tasks
codex apply <task-id> # apply a cloud task's latest diff locallyThe catch is that a cloud task sees only what its environment provides. Your local files, running processes, browser sign-ins, and VPN do not transfer, so services the task needs must be configured in the environment's network and secret settings.
When the desktop app is the better choice#
- You run several tasks at once. Worktree chats, Handoff, and automatic cleanup do the Git bookkeeping that is tedious by hand.
- You review visually. The diff pane lets you comment inline, stage or revert individual chunks, commit, push, and open a pull request without leaving the chat.
- Each worktree needs setup. Local environments run your install script on every new worktree.
- You want work to happen on a schedule. Scheduled tasks can run in dedicated background worktrees so they don't collide with what you are doing.
- You want to steer from your phone. Remote lets the ChatGPT mobile app start, approve, and review tasks on a connected Mac or Windows PC. It is set up from the desktop app, not the CLI or the IDE extension.
- The project lives on another machine. The desktop app can open projects on an SSH host and run chats against the remote filesystem, as long as
codexis on that host'sPATH.
When the CLI is the better choice#
- You live in the terminal. The Codex CLI keeps the loop in one place: explore, edit, run your tools, steer the active turn, and resume with
codex resume. - You automate.
codex execruns Codex non-interactively for scripts and CI, with JSON Lines output when you need machine-readable events. - The machine has no desktop. Build servers, containers, and remote dev boxes only need a shell.
- You want to audit or pin the client. The CLI is open source under Apache-2.0 in the openai/codex repository.
- You automate with an API key. API-key sign-in covers the CLI, the SDK, and the IDE extension, which suits shared CI environments.
Installing takes one command on each platform:
curl -fsSL https://chatgpt.com/codex/install.sh | sh # macOS and Linux
npm install -g @openai/codex # any platform with Node.js
brew install --cask codex # HomebrewOn Windows, OpenAI provides a PowerShell installer. If you want the GUI later, codex app launches the desktop app on macOS or Windows, or starts its installer when it is missing.
The main gap is isolation. The CLI gained experimental managed worktrees in v0.154.0 (September 9, 2026): start a session with --worktree, or run /worktree inside one, and browse or resume those checkouts later. Because the feature is still experimental and not yet in the command reference, many people still create worktrees themselves with git worktree add. Our guide to running Codex agents in parallel walks through that setup, and the git worktree docs explain the model.
Where the IDE extension fits#
The Codex IDE extension runs in VS Code, VS Code Insiders, Cursor, and Windsurf; Xcode and JetBrains IDEs offer Codex through their own integrations. It is the best surface for focused edits, because open files and selections become context automatically and diffs appear beside the code. Slash commands cover the essentials: /local, /worktree, and /cloud choose where a chat runs, and /side starts a temporary side chat. It shares configuration layers with the CLI, but it does not support plugins, so install those through the desktop app or the CLI.
Windows, Linux, and macOS#
- macOS: the desktop app and the CLI are both available.
- Windows: the desktop app for Windows runs Codex natively in PowerShell with a Windows sandbox, or in WSL2 when you prefer a Linux toolchain. It supports worktrees, scheduled tasks, Git, the built-in browser, plugins, and skills. The CLI installs from PowerShell.
- Linux: the desktop app for Linux is a preview for Ubuntu 24.04 and 26.04, Debian 13, Fedora 43 and 44, and Arch Linux, on x64 and ARM64. Computer Use is not available there yet, and native Wayland support is experimental. The CLI has no such limits.
Pricing and sign-in#
Codex is included in every ChatGPT plan, from Free and Go through Plus, Pro, Business, Edu, and Enterprise, and ChatGPT Work shares the same usage limits. As of October 5, 2026, Plus costs $20 a month and Pro starts at $100 a month. Limits and model access vary by plan, so check OpenAI's pricing page before you commit to a workflow. Signing in with an API key instead gives you the CLI, the SDK, the IDE extension, and local chats in the desktop app at API rates, but no Codex Cloud and no cloud integrations such as GitHub code review or Slack.
When one provider is not enough#
Every coding surface OpenAI ships is built around Codex. That is the right default if Codex is your only agent. It stops fitting when you want Claude Code to attempt the same task, a dedicated review CLI to check the result, or a container boundary that a worktree cannot give you.
Agentastic is a native macOS workspace that runs the real Codex CLI with your own OpenAI sign-in; it does not resell usage. Around the CLI it adds:
- Mixed providers. Codex next to Claude Code, Gemini, Cursor, and the rest of 55 built-in agent definitions, plus any terminal command as a custom agent. Running Codex and Claude Code on the same task in separate worktrees is a quick way to compare their diffs.
- A worktree per task, with setup. Every agent gets a git worktree, and a setup script in
.agentastic/setup.shprepares each one, which covers the CLI's missing worktree management. - Stronger isolation and remote execution. Docker or Apple containers, SSH machines where sessions keep running after you close the Mac, and cloud agents on your own Modal, Fly.io, or Vercel Sandbox account, with your Codex sign-in copied to the VM.
- A structured view of Codex. Codex sessions can run as a native Chat transcript or in a terminal, and you can switch between the two without restarting the agent.
- Review and verification. Code review with Codex, Claude, CodeRabbit, or Greptile against the same diff, an agent-drivable browser, and usage meters for several Codex logins through
CODEX_HOME.
The tradeoffs: Agentastic runs only on macOS 14 or later (Apple Silicon and Intel) and is closed source. Because it drives the CLI, desktop-app features such as Handoff, local environments, and Remote from the ChatGPT mobile app stay in OpenAI's app. If Codex is your only agent and the desktop app fits, use it. For a closer look, see Agentastic vs the Codex app and our roundup of Codex GUIs.
Sources and further reading#
First-party sources, reviewed October 5, 2026:
- What's new — the July 9, 2026 merge, Windows launch, and Linux preview
- ChatGPT desktop app and Codex environments
- Worktrees and Local environments
- Codex CLI and the CLI command reference
- Codex IDE extension and Codex Cloud
- Desktop app for Windows and for Linux
- Remote and Remote connections
- Pricing and Open source
- openai/codex on GitHub
- Introducing the Codex app — OpenAI's original launch post
Continue the research:
- Agentastic vs Codex
- Claude Code vs Codex
- Claude Code Desktop vs CLI
- How to run multiple Codex agents in parallel
- Codex agent in Agentastic
Frequently asked questions#
Is the Codex app now ChatGPT?#
Effectively, yes. On July 9, 2026, OpenAI merged the Codex app into the ChatGPT desktop app for macOS and Windows, where Codex keeps its own coding view next to Chat and Work. Select Codex in the app to get the same workspace, including worktrees, Git review, and scheduled tasks.
Should I use the Codex app or the Codex CLI?#
Use the desktop app for parallel chats with managed worktrees, visual diffs, and cloud tasks in one window. Use the CLI for terminal work, scripting with codex exec, CI, and remote machines. You can use both, since they share the same account and MCP configuration.
Is there a Codex app for Linux?#
Yes, in preview. The ChatGPT desktop app, which includes Codex, supports Ubuntu 24.04 and 26.04, Debian 13, Fedora 43 and 44, and Arch Linux on x64 and ARM64. Computer Use is not available on Linux yet, and the Codex CLI runs on Linux as well.
Does the Codex app work on Windows?#
Yes. The ChatGPT desktop app for Windows runs Codex natively in PowerShell with a Windows sandbox, or inside WSL2, and supports worktrees, scheduled tasks, Git, plugins, and skills.
What is the difference between Codex local and worktree?#
Local works directly in your project checkout, while Worktree creates a separate Git worktree so Codex can work in the background without touching your files. Both run on your computer, and Handoff moves a chat and its code between them.
What is the difference between Codex local and cloud?#
Local and Worktree chats run on your computer with your files and tools. Cloud tasks run in a published cloud environment, keep working while your computer sleeps, and cannot see your local files, running processes, or VPN.
Can I use the Codex app with an API key?#
Partly. With an API key you can use the CLI, the SDK, the IDE extension, and local chats in the desktop app, billed at API rates, but not Codex Cloud or cloud integrations such as GitHub code review and Slack.
Run Codex beside your other agents
Agentastic is free, runs the Codex CLI with your own OpenAI sign-in, and gives every task its own worktree, container, or remote host.
Try Agentastic on macOS