Codex in the Terminal and the ChatGPT Desktop App
Claude Code in the Terminal and the Desktop App compares Claude Code’s two main surfaces. This appendix does the same for OpenAI’s Codex: the Codex CLI in your terminal, and Codex in the ChatGPT desktop app. For how Codex compares with Claude Code itself, see Claude Code and Other Coding Agents.
Checked on October 10, 2026, against OpenAI’s documentation at learn.chatgpt.com/docs. Each section links the pages it came from. When this page and the docs disagree, the docs are right.
There is no separate Codex app any more
OpenAI’s desktop app for Codex is now part of the ChatGPT desktop app. The old Codex app page (developers.openai.com/codex/app) redirects to the ChatGPT desktop app page, and the docs’ glossary defines it as a “desktop app with ChatGPT and Codex, including Chat and Work, projects, file previews, scheduled tasks, and developer tools.”
Inside the app, a dropdown at the top switches between three modes (quickstart):
| Mode | For | Shortcut (macOS) |
|---|---|---|
| Chat | Quick questions and conversation | Ctrl+1 |
| Work | Research, analysis, and finished documents, spreadsheets, and presentations | Ctrl+2 |
| Codex | Software development with your codebase and developer tools | Ctrl+3 |
This appendix is about the Codex mode. When the Codex docs say “the desktop app,” they mean this app with Codex selected.
The same engine
The CLI and the app run the same Codex agent and share much of their setup:
| Shared | Source |
|---|---|
AGENTS.md instructions, in your project and your personal file (edit the personal one in the app under Settings > Personalization) |
AGENTS.md, settings |
| MCP servers: “The ChatGPT desktop app, Codex CLI, and IDE extension share this configuration” | MCP |
Skills in .agents/skills/ and ~/.agents/skills/ |
Build skills |
| Plugins, from one directory shared by ChatGPT and Codex | Build skills |
| Your ChatGPT sign-in and plan usage | Pricing |
The docs say the CLI and IDE extension “share the same configuration layers” in config.toml (config basics), but they do not say the same of the desktop app. Settings such as the default model may need to be set in both places.
Getting started
| Codex CLI | ChatGPT desktop app | |
|---|---|---|
| Install | Install script, npm, or Homebrew (Codex CLI) | Download ChatGPT for macOS or Windows; Linux has its own guide |
| Start | codex in the project folder |
Open the app, choose Codex from the dropdown, open a folder or project, then New chat |
| Open one from the other | codex app opens the desktop app (on macOS, on the current folder) |
|
| Where it can run | Your computer; codex cloud sends a task to the cloud |
Work in > This computer (Local or Worktree) or Cloud (environments) |
Commands
The two surfaces have separate command lists: the CLI’s in the CLI reference, the app’s on its slash commands page. Of 58 commands, not counting aliases, 19 work in both.
| In both | CLI only | App only |
|---|---|---|
/approve, /archive, /compact, /fast, /feedback, /fork, /goal, /init, /mcp, /memories, /model, /new, /pet, /plan, /rename, /review, /side, /status, /usage |
/agent (/subagents), /app, /apps, /clear, /copy, /debug-config, /delete, /diff, /exit (/quit), /experimental, /hooks, /ide, /import, /keymap, /logout, /mention, /permissions, /personality, /plugins, /ps, /raw, /resume, /sandbox-add-read-dir, /setup-default-sandbox, /skills, /statusline, /stop, /theme, /title, /vim |
/chat, /cloud, /cloud-environment, /ide-context, /local, /pin, /project, /reasoning, /worktree |
Several CLI-only commands have a button or panel in the app instead of a command: the review pane shows the diff, Settings covers the theme and keyboard shortcuts, and the sidebar holds your chats and projects. The app also has its own keyboard shortcuts; press Cmd+/ to see them.
What the app adds
| Feature | What it does | Related idea in the book |
|---|---|---|
| Worktrees with Handoff | Select Worktree under the composer and Codex works in a separate copy of your repo. Handoff moves the chat and its changes between the worktree and your main copy | Parallel work needs separate copies of the files |
| Local environments | Setup scripts that run when a worktree is created (such as npm install), and one-click actions such as starting your dev server. Saved in .codex/ in your project, so you can commit them |
Worktrees start without your installed packages or .env |
| Review pane | See what changed, leave feedback on specific lines, and stage, revert, commit, or push | Review before you commit |
| Code Review | Open a pull request, read its summary, checks, and comments, and inspect the diff | Chapter 9 |
| Built-in browser | Preview your running app (for example localhost:3000), leave comments on parts of the page, and ask Codex to fix them |
Done means you saw it work |
| Integrated terminal | A terminal in each chat, scoped to its project or worktree (Ctrl+`). Codex can read its output |
Running your own checks |
| Computer Use | Codex operates desktop apps through the screen, on macOS and Windows | |
| Scheduled tasks | Run work on a schedule; in a Git repo each run gets its own background worktree | |
| Projects and files | Group chats by project and preview documents, spreadsheets, and images in the app | |
| Codex on mobile | Start chats, approve requests, and review changes from your phone, for work running on your computer | |
| Chat and Work modes | Switch to a general ChatGPT chat or a Work task without leaving the app |
What only the CLI does
| CLI only | Why it matters |
|---|---|
codex exec, with JSON output and a schema for the result |
Run Codex from a script or CI (non-interactive mode) |
/hooks |
Review and trust hooks before they run (hooks) |
/permissions and launch flags such as --sandbox |
Pick the approval preset and sandbox for a session |
/diff, /copy, /mention, /resume |
Terminal versions of what the app does with panels and the sidebar |
codex cloud and codex apply |
Send a task to the cloud and bring its changes back, from the terminal |
codex review, codex doctor, codex mcp, codex plugin |
Manage Codex from your shell without opening a session |
| Works over SSH and in any terminal, including VS Code’s | No desktop app needed |
Moving between them
| From | To | How |
|---|---|---|
| CLI | App | Type /app in the session. “The desktop app opens the same saved chat so you can continue there” (macOS and Windows) |
| Shell | App | codex app opens the desktop app, or starts its installer if it is missing |
| App, Local | App, Worktree | Handoff moves the chat and its code changes between the two |
| App | Cloud | Work in > Cloud, using a published cloud environment |
| Cloud | Your laptop | codex apply in the CLI applies a cloud task’s changes to your local repo |
The docs do not describe moving an app chat back into the CLI.
The CLI in VS Code or the desktop app?
The same debate exists for Codex. This scorecard compares the Codex CLI in VS Code’s terminal with Codex in the ChatGPT desktop app, using the same rows as the Claude Code scorecard.
| What you need to do | Codex CLI in VS Code | Codex in the ChatGPT desktop app |
|---|---|---|
| Find and open files | 2: Explorer, Cmd+P search, and Cmd-click any file path in the terminal to open it at that line |
2: file tree (Cmd+Shift+E), file search (Cmd+P), and Open sends a file to your editor |
| Edit code yourself | 2: full editor | 1: open the file in your editor; in-app editing is documented only for LaTeX |
| Review what the agent changed | 1: /diff in the terminal and VS Code’s Source Control panel; you can’t send line comments back |
2: review pane with line feedback, and stage, revert, commit, or push |
| See the running app, and let the agent check it | 1: you open it in your browser; Codex can drive one only through an MCP server | 2: built-in browser where you comment on the page and Codex fixes it |
| Preview other files (HTML, PDF, documents) | 1: Markdown and images; other types need extensions | 2: previews documents, spreadsheets, presentations, PDFs, and HTML, with annotations |
| Feed the agent your editor’s context | 1: /ide adds open files and your selection; no diagnostics |
1: /ide-context shares IDE context |
| Run several agents at once | 1: one terminal per session; subagents; no worktrees in the CLI | 2: worktrees with Handoff, local environments with setup scripts |
| Every command, scripts, and CI | 2: all commands and flags, codex exec |
1: a separate, shorter command list; no scripting |
| Set safety rules | 2: /permissions, /hooks, rules files, launch flags |
1: the app’s settings; the pages we read describe fewer approval controls than the CLI has |
| Use editor extensions | 2: the whole VS Code marketplace | 0: none |
| Keep work going when you step away | 1: codex cloud, codex remote-control |
2: mobile app, scheduled tasks, notifications, Computer Use |
| Setup | 1: VS Code and the CLI | 2: one download |
| Total (of 24) | 17 | 18 |
Scores are 2 (does this well), 1 (does it partly, or with extra setup), or 0 (cannot). They are our judgment, based on what each product’s documentation says it does, not on timed tests. Each row is worth the same, which may not match how you work: weight the rows you do most.
What the scores show. As with Claude Code, VS Code scores higher when you work on the code yourself and the app scores higher when you direct and review the agent. Two differences from the Claude comparison:
- The Codex app comes closer to VS Code on files. It has a file tree and
Cmd+Pfile search, which the Claude app’s documentation does not list. Clicking a path in the terminal to open a file at the exact line is still a VS Code strength. - The Codex CLI gets less from VS Code than Claude Code does. Claude Code’s CLI opens its diffs in VS Code and reads the Problems panel; the Codex CLI’s
/ideadds open files and your selection, and nothing in the docs says it does more. For Codex, VS Code is mostly a good editor and terminal next to the agent rather than a connected one.
The app is also where Codex gets its worktrees, which its CLI lacks, so running several Codex chats in parallel is much easier there.
Which one to use
OpenAI’s docs give the use cases. The CLI is for when “you work from the terminal,” “you need scripting or CI,” “you want a local code review,” or “you want to hand work to the cloud” (Codex CLI). The desktop app is for coordinating several projects, creating and reviewing files, using the browser and your computer, and scheduling recurring work (desktop app).
The split is the same as for Claude Code. The terminal is the complete, scriptable surface, and the app is better for reviewing diffs, previewing your app, and running several chats in parallel. One difference matters for this course: the app’s worktrees and Handoff give Codex the separate working copies that its CLI does not offer. Codex has no undo for file edits in either surface, so commit before you start (Claude Code and Other Coding Agents).