What Is OpenAI Codex?
OpenAI Codex is an agentic coding tool that reads your repository, edits files, and runs commands — a new category beyond autocomplete or chat.
A Name With Two Meanings
If you search for "OpenAI Codex" and get confused by the results, you are not alone.
In 2021, OpenAI released a product called Codex: a language model fine-tuned on code, available via the API, and used under the hood to power early versions of GitHub Copilot. That product was eventually folded into GPT-4 and the name was retired.
In 2025, OpenAI relaunched the Codex name — this time for something fundamentally different. Not a model API. An agentic coding tool.
The new Codex is what this track is about. The distinction matters because documentation written before the relaunch describes a model API, not a CLI or agent. If you see something like openai.Completion.create(engine="code-davinci-002"), you are reading old material.
What Codex Actually Does
Plain ChatGPT, even the code-capable version, follows a chat loop: you paste code in, the model generates a response, you copy the output and apply it yourself. The model never sees your actual repository. It only sees what you choose to paste.
Codex is a different category.
When you give Codex a task, it reads the relevant files in your project, proposes a plan showing exactly which files it will touch and how, waits for your approval, then applies the changes and runs your tests or build commands. If something fails, it reads the error output and tries again. By default you stay in the loop at the approval step — Codex waits for your explicit sign-off before applying changes. (That approval requirement is a dial, not a fixed law: lesson 530 covers the autonomy presets that let you loosen or tighten it for a given task.)
This is what Knox does with Claude Code across his infrastructure. When a feature needs to be shipped, the agent is given a plain-English task, reads the codebase, writes the implementation, runs CI, and opens a PR. Codex puts the same capability in reach of anyone with an OpenAI account.
The Four Surfaces
Codex is not one product — it is one set of capabilities with four different entry points, each suited to a different point in your workflow.
The CLI (@openai/codex) is what you install via npm and run in your terminal. It is interactive, local, and fast. You give it a task, it reads your repository, proposes a plan, you approve, and it edits the files right there. This is the most hands-on surface and the focus of the next two lessons.
The VS Code extension brings the same agent capabilities inside your editor. You can invoke Codex on a specific file, see diffs inline before they are applied, and stay inside your normal editing environment. Good for developers who prefer to keep their full IDE context rather than switching to a terminal.
The cloud/web agent runs asynchronously. You assign it a task from the platform dashboard, it clones your repository into a sandboxed environment, does the work, and opens a pull request when it is done. This is the surface for longer-running tasks you want to delegate entirely — you can log off and come back to a PR. It runs on OpenAI's infrastructure rather than your local machine.
The ChatGPT integration is the lightest surface. No install, no terminal, no API key required — Codex is included with every ChatGPT plan (Free, Go, Plus, Pro, Business, Edu, and Enterprise; check current plan availability for the latest list), so if you have a ChatGPT account it is already integrated. This is conversational coding help at the chat level, not full agentic file-editing. Good for quick scripts, code explanations, and drafts — not for multi-file refactors.
How It Compares to Claude Code
For anyone already familiar with Claude Code, Codex fills the same conceptual role in OpenAI's ecosystem. Both tools:
- Read your actual codebase, not just what you paste
- Propose changes before applying them
- Execute commands (tests, builds, linters) as part of the loop
- Work best when you give them a clear task and let them iterate
The implementation differences matter for advanced use — tool schemas, model routing, permission modes, config file locations — and those will come up as you work with Codex. But the conceptual model is the same: you are working with a coding agent, not a chat assistant.
Understanding the distinction is not academic. It changes how you structure your tasks. With chat, you decompose the problem yourself and feed the AI one piece at a time. With an agent, you describe the outcome and let the tool figure out the decomposition. That shift in how you work is the real unlock.
What Comes Next
This lesson gave you the conceptual foundation: what Codex is, what it is not, and which surface fits which job.
The next lesson covers authentication — how to get access, whether you need a ChatGPT subscription or an API key, and how to manage your credentials properly.
The “Installing and Running the Codex CLI” lesson is hands-on: installing the CLI, running your first agentic session, and understanding what happens inside that session.
By the end of this track you will have a working Codex setup and a clear mental model of the agent loop — the same foundation behind every production AI coding workflow you can study at jeremyknox.ai.