Lesson 01 of 29 · Free preview
What Is Codex?
Learn the core concepts of “What Is Codex?” and apply them to real development workflows.
01 · Getting to Know Codex and Its Four Entry Points
📚 Series guide: This is the first article in the ‘Codex Beginner’s Guide’. No prior knowledge is needed: we will start with ‘What exactly is Codex?’ In the next article, ‘02 Core Concepts at a Glance’, we will sort out all the terminology in one go.
What Codex is, what each of its four entry points does, and exactly how it differs from ChatGPT and Claude Code
Everyone, this tutorial is about OpenAI’s Codex.
Does the name Codex sound familiar? OpenAI had an older model called Codex several years ago, and looking at its official website now can make things even more confusing—why is there a desktop App, a command line, a browser extension and a cloud-based web version? Which one is ‘Codex itself’? Which one should I install?
To be honest, this is precisely where Codex is most likely to confuse beginners: it is not ‘a piece of software’, but the same AI programming agent (Agent) with four different faces. If you do not understand this, you can spend ages stuck on ‘which one should I download?’
This article does not teach installation or have you enter commands (that is covered in article 03). It does just one thing: thoroughly explain what Codex is, what each of its four faces is responsible for, and how it differs from ChatGPT and Claude Code, so that you first have a map in your head. Once you have that map, you will be able to judge for yourself which one to install and use later.
By the end of this article, you will have:
- A one-sentence explanation of what Codex is, without being misled by the name
- A comparison table of the four entry points (desktop App / CLI / IDE extension / cloud Web), so you know where to begin
- A framework for judging how Codex differs from ChatGPT and Claude Code, without conflating them
- A free, simple action that takes 30 seconds to check whether your computer recognises it
This diagram shows the core idea of the entire article at a glance: the desktop App, command-line CLI, IDE extension and cloud Web are Codex’s four faces. They look different and run in different places, but behind them is the same account and the same interconnected Codex agent.
01 What Exactly Is Codex?
Here is the answer first: Codex is OpenAI’s official ‘AI programming agent’. You give it a goal, and it can read your entire project, edit files directly, run commands and tests, complete the work and hand it back for your review, rather than merely replying with a snippet of code in a chat box.
You will certainly be familiar with OpenAI: it is the company behind ChatGPT. Codex is its tool built specifically for writing code. According to the official documentation, its work mainly falls into the following categories (think of these as its ‘capability list’; become familiar with them for now, and article 02 will explore them in detail):
- Writing code: describe what you want, and it generates code that follows your project’s existing structure and style rather than throwing you an isolated snippet.
- Understanding an unfamiliar codebase: when taking over an old project with no documentation, ask it to ‘explain this project’s architecture’ first. That is much faster than struggling through it yourself for hours.
- Reviewing code: it helps you find potential bugs, missed edge cases and logic errors.
- Debugging and fixing: give it an error, and it traces the root cause through the code, locates the problem and provides a patch.
- Automating routine work: delegate repetitive tasks such as refactoring, adding tests, performing migrations and configuring environments with a single instruction.
There is a crucial distinction here that beginners often miss, so it is worth highlighting separately:
Analogy: looking up a recipe (ChatGPT) vs hiring a private chef to cook in your home (Codex). Using ChatGPT to write code is like looking up a recipe—it tells you to ‘add salt, add sugar and stir-fry for three minutes’, but you still have to handle the pan yourself: copying the code, switching back to the editor, pasting it and fixing errors are all manual work. Codex is different. It is like a chef who comes straight into your kitchen—you say ‘I’d like this’, and it checks the fridge (reads files), turns on the hob (runs commands), cooks and serves the meal (edits the code and runs the tests). You only need to taste it and approve the result.
In practice, this difference completely transforms the experience.
Here is an example from my own work. In March this year, I returned to a small Python web scraper that had been sitting untouched for more than six months. Its dependencies were long out of date and it produced a pile of errors when run. Previously, I would have copied each error into ChatGPT, waited for it to suggest that ‘a library version might be the problem’, then switched back to investigate, edit and run it again. An entire afternoon could disappear into switching between windows. This time, I opened Codex directly in the project directory and said, ‘This project no longer runs. Find the root cause and fix it so that it works.’ It inspected requirements.txt and the error stack, identified two incompatible dependencies, changed their version numbers and ran the project again to confirm the fix. By the time I came back with a coffee, it was waiting for me to review the diff.
That makes the significance of the word ‘agent’ (Agent, an AI that can execute tasks autonomously) clear—it does not merely give you ideas; it carries out the work for you.
💡 In one sentence: Codex = OpenAI’s official AI programming agent. You set the goal and it completes the work; it is not ‘a chat box that can write code’.
02 Four Faces: One Codex, Four Entry Points
This is where Codex differs most from many tools, and where it is also most likely to confuse people, so we will focus on it.
Mention the ‘command line’ or ‘terminal’ and many beginners immediately imagine a dark window and lose interest. Do not panic—among the mainstream AI programming tools, Codex is actually one of the friendliest for people who do not want to touch the command line, because it has a dedicated graphical desktop App.
According to the official documentation, Codex has four entry points, and you can use any of them:
| Entry point | What it looks like | Where it runs | Who it suits / suitable scenarios | |------|---------|--------|------------------| | **Desktop App** (Codex app) | A standalone application with a graphical interface, visual diffs and side-by-side parallel tasks | Your local machine | People who do not want to use the command line, prefer clicking through an interface or need to monitor several tasks at once | | **Command-line CLI** (Codex CLI) | A command-line tool launched by entering `codex` in the terminal | Your local machine | People comfortable with the terminal, who need scripts for automation or work on servers / over SSH | | **IDE extension** (IDE extension) | A sidebar extension in VS Code / Cursor / Windsurf / JetBrains | Your local machine | People who spend most of their coding time in an editor | | **Cloud Web** (Codex cloud) | Open `chatgpt.com/codex` in a browser; tasks run in OpenAI’s cloud environment | The cloud | People who want long-running background tasks, several tasks in parallel or no load on their local machine |
The first three (desktop App, CLI and IDE extension) all work on your own computer—they read your local files and run your local commands. Only the fourth, cloud Web, is different:
Analogy: outsourcing the work. With the first three entry points, it is as if you have hired an assistant who sits at your desk, uses your computer and materials, and works under your supervision. Cloud Web is more like outsourcing the task to a remote team—you place an order in the browser, OpenAI creates an isolated environment in its own cloud, pulls in your repository from GitHub, works on it privately and then delivers a diff or even opens a PR (Pull Request) for you. It keeps running even after you switch off your computer.
This ‘outsourcing’ model has two tangible benefits: first, parallelism—you can send out three or five tasks at once and have them run without blocking one another; second, isolation—it works in its own sandbox without touching your local system, so even if something goes badly wrong, your machine is unaffected. My usual combination is to handle small fixes in the desktop App or CLI while watching them locally, and send slow, lengthy jobs such as ‘run the complete test suite and fix the failing tests’ to the cloud, leaving them to run and returning later for the result.
Here is a particularly important point worth remembering in bold:
Behind all four entry points is the same Codex, and their configuration is largely shared. For example, the AGENTS.md you write (a project instruction file, covered in a later dedicated article) and the Skills you define (reusable instructions and workflows) can officially be reused across the desktop App, CLI and IDE extension. Set it up once and use it in several places. If you have used any one of them before, you can open another and still see your previous project history.
A friendly tip: beginners should not agonise over ‘which one should I learn first?’ My advice is to start with the desktop App if the command line worries you (it has a graphical interface and visual diffs, making it the safest place to start); if you already enjoy spending time in the terminal, go straight to the CLI. Later articles in this series will cover all four entry points separately and in detail (articles 07–10). For now, you only need to remember ‘one Codex, four faces’.
💡 In one sentence: Codex has four entry points—desktop App / CLI / IDE extension / cloud Web. The first three work on your local machine, while cloud Web outsources the work to the cloud, but underneath they are the same Codex and can share configuration.
03 What It Can and Cannot Do
Section 01 listed its capabilities. Here we add the other half that matters most—what it cannot do. This is more valuable than knowing what it can do, because it is where beginners most often run into trouble.
| ❌ Do not expect it to | Why | |----------------|-------| | Make technical decisions for you | Choosing an architecture, deciding whether a refactor is worthwhile and making trade-offs between requirements are matters of judgement and decision-making for you; it is not good at designing an entire system | | Guarantee completely bug-free code | It provides a high-quality candidate, not an absolutely correct answer; **you must review its changes** | | Guess requirements you have not explained clearly | If you have not explained the business logic, it can only guess; the more autonomous it is, the easier it is for it to go off course | | Manage everything automatically when you understand none of it | If you cannot understand what it changed, you cannot judge whether it is right or wrong; that is like driving with your eyes closed |
The second is the easiest trap to fall into. I once did something foolish: I asked Codex to add error handling throughout a project, and it rapidly changed more than a dozen files. To save time, I committed the changes immediately. In two places, it had taken the initiative to alter existing logic as well, and I did not discover until several days later that the behaviour of an interface had changed. Since then, I have followed an iron rule: review every line it changes in the diff before committing. Incidentally, Codex’s official quickstart also specifically recommends creating a Git checkpoint before and after making changes (you can think of a checkpoint as ‘saving’ your project), so that you can roll back immediately if something goes wrong. The earlier beginners develop this habit, the better.
The right mindset for using Codex comes down to one sentence:
Let Codex provide high-quality candidate solutions, not absolutely correct answers.
In plain terms—people set the direction, provide oversight and make judgements; AI handles execution, analysis and repetitive work. That is its design philosophy: collaboration, not replacement.
💡 In one sentence: it can read projects, edit files, run commands and handle routine work, but decisions and oversight are always your responsibility—it is a partner, not someone to take responsibility after you walk away.
04 Codex vs ChatGPT vs Claude Code
The two questions beginners ask most often are: ‘Are Codex and ChatGPT not from the same company? What is the difference?’ and ‘How does it differ from Claude Code?’ Let us settle both at once.
How Codex Differs from ChatGPT
They both belong to OpenAI, but they are fundamentally different kinds of thing.
Analogy: staff officer vs special forces operator. ChatGPT is like a staff officer at headquarters—you describe the situation, and it offers advice and draws up a plan, but it does not enter the field; you still have to execute the plan yourself. Codex is like a special forces operator who can deploy directly to the scene—you give it a goal, it enters your project (reading files, running commands and editing code), completes the task and then reports back.
In plain terms: you ask ChatGPT and it answers; you instruct Codex and it acts. Interestingly, Codex itself is included with ChatGPT subscriptions (according to the official documentation, every ChatGPT account—including the free tier—includes Codex usage, with higher allowances for the paid Plus / Pro / Business / Edu / Enterprise tiers). You can also use an OpenAI API key and pay according to usage. The precise allowances for each subscription tier and whether features differ between sign-in methods change quickly, so always refer to the official pricing page (article 04 covers this specifically).
How Codex Differs from Claude Code
These two are often compared. First, a reality check: do not ask ‘which is stronger?’ Their positioning is too similar, and which is stronger depends on exactly how you use them. The real difference is in their workflow emphasis:
| Dimension | **Codex** (OpenAI) | **Claude Code** (Anthropic) | |------|--------------------|------------------------------| | **Origin** | OpenAI, using GPT-series models underneath | Anthropic, using Claude-series models underneath | | **Most natural entry point** | An official **graphical desktop App**, friendly to people who do not use the command line | **Terminal-native (CLI)**, with the fullest feature set and clearest exposure of how it works | | **Project instruction file** | `AGENTS.md` | `CLAUDE.md` | | **Four entry points** | Desktop App / CLI / IDE extension / cloud Web | Terminal / editor extension / desktop App / web and mobile | | **Can it edit files and run commands?** | Yes; it is a genuine agent | Yes; it is a genuine agent |
The pattern should be clear—their underlying structures are almost identical: both are programming agents that can read a project and take action, both have multiple local and cloud entry points, and both use a project instruction file for customisation. There are two most obvious differences. First, their lineages differ (GPT vs Claude, with different underlying models). Second, their default characters differ—Codex prominently promotes its graphical desktop App, clearly aiming to attract people who do not want to use the command line; Claude Code is terminal-native and has a stronger command-line character.
I use both, with roughly this division of labour: for work that needs a graphical interface, benefits from watching the diff visually or involves running several strands in parallel within one project, I use the Codex desktop App; for work that lives in the terminal and needs to connect to many custom scripts and hooks, I use Claude Code. One complements rather than replaces the other.
Note: which model is more intelligent, which offers better value and which features each provides all change extremely quickly; today’s conclusion may be outdated next week. This article therefore deliberately avoids fixing any benchmark or pricing figures in writing—to compare these, consult each company’s official pages directly.
💡 In one sentence: ChatGPT is the staff officer who provides ideas, while Codex is OpenAI’s special forces operator who takes action; Codex and Claude Code are two programming agents of the same type from different companies, with similar structures but different lineages and default characters. Do not treat it as an either/or choice—assign each the work it suits.
05 Try It: Check in 30 Seconds Whether Your Computer Recognises It
As promised, this article does not teach installation, but here is a free, simple action to check your environment (whether or not it is installed, running this command will not damage anything).
Open your terminal (the ‘Terminal’ App on Mac or PowerShell on Windows), enter this line and press Return:
codex --versionThere are two expected outcomes, and both are normal:
- Outcome one: a version number appears—congratulations, you have installed the CLI before and can skip straight to ‘Using It’ in article 03.
- Outcome two: you see
command not found: codex(on Windows, it may be'codex' 不是内部或外部命令)—this is also completely normal. It means the CLI is not installed yet, and that is precisely the first task article 03 will address.
Here is a preview of the CLI installation command (do not rush to enter it now; just become familiar with it first). The official original looks like this:
# macOS / Linux:标准安装脚本
curl -fsSL https://chatgpt.com/codex/install.sh | sh# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"After installation, enter codex in the terminal. It will guide you through signing in (with a ChatGPT account or OpenAI API key), after which it can work in the current directory.
Reminder one: the instructions above install the command-line CLI. If the command line worries you, the desktop App uses the familiar graphical approach of downloading an installer and double-clicking it (available for macOS / Windows; Linux users currently need to join the notification waitlist). It is no different from installing ordinary software. Article 03 will cover each of the four entry points separately without skipping a step.
Reminder two: Codex uses the OpenAI / ChatGPT account system. Users in mainland China generally need a suitable means of accessing the internet to install it and sign in. Article 03 will specifically cover how to do this and how to sign in, so we will not expand on it here.
The following diagram clarifies the ‘local / cloud’ relationship between the four entry points. You do not need to see the image to understand it; remembering the table above is enough:
The point of this diagram is that all four entry points are ‘doors’ through which you give Codex a goal. The first three doors lead to your local machine and the last leads to OpenAI’s cloud, but behind every door is the same Codex.
💡 In one sentence: codex --version is all it takes to check whether your computer recognises it. Do not panic if it reports an error—that is the opening task in article 03; and if the command line worries you, remember that a graphical desktop App is also available.06 Summary
This article involved very few commands, but clarified the most important things to understand at the outset:
- What it is: OpenAI’s official AI programming agent. You set the goal; it reads the project, makes changes, runs commands and completes the work—it is not ‘a chat box that can write code’.
- Four faces: desktop App, CLI, IDE extension and cloud Web. The first three work on your local machine, while cloud Web outsources work to the cloud; underneath they use the same Codex and can share configuration.
- What it can / cannot do: it can read code, edit files, fix bugs and handle routine work, but decisions, oversight and filling in missing requirements are always your responsibility. Always review the diff after it finishes.
- How it compares: ChatGPT is a staff officer, while Codex is a special forces operator who takes action; Codex and Claude Code are the same type of tool from different companies, with similar structures but different lineages and characters. Assign work according to their strengths rather than choosing only one.
You should now be able to explain what Codex is to a colleague in one sentence, judge which entry point you should start with and decide what work to give it. This is the ‘sense of the map’ you need first as a beginner—every later feature simply adds detail to this map.
Next: ‘02 Core Concepts at a Glance’. We will sort out the terminology of the Codex world in one go—agent loops, context, AGENTS.md, approval modes, sandboxes, Skills, MCP and more. These are terms you will encounter every day later. First, run the codex --version command above to see whether you get ‘outcome one’ or ‘outcome two’; article 03 will then provide the right remedy.