Codex Explained: OpenAI's Coding Agent for Non-Coders
Codex is OpenAI's coding agent: you hand it a task, not a question. Where it runs, how its sandbox and approval levels keep your project safe, what it hands back, and how it compares with Claude Code, with no code needed.
What you will learn
- Explain what Codex is and how a coding agent differs from a chat assistant
- Name the three doors to Codex: the web in ChatGPT, a code editor and the command line
- Describe how the sandbox and approval levels keep a project safe
- Know what Codex hands back and how it compares with Claude Code
Before you start
- Coding agents compared: Claude Code, Codex, Copilot and Gemini CLI
Codex is the coding agent from OpenAI, the company behind ChatGPT. In this lesson you'll see what it is, where it runs, how it keeps your project safe while it works, and how it compares with Claude Code. You don't need to know how to code to follow any of it.
Think of a contractor
You want a new shelf in your kitchen, so you hire a contractor.
- The work order. "Put up one shelf, here, by Friday."
- The workshop. They work in their own space, on a copy of your plans, not inside your house.
- The change list. When they're done, they show you what they did, and you say yes, put it in, or no, change this first.
Codex is that contractor, but for software projects. Everything else maps back to this picture.
Chat assistant vs coding agent
The key word is agent: an AI that does the steps itself, not only the talking.
- A chat assistant answers. If the answer is code, you copy and paste it into the project yourself. It never sees the whole project.
- A coding agent like Codex reads the files in your project, makes the changes itself, runs the project's checks (small automatic tests that say whether things still work), and reports back what it did.
The simple way to remember it: you hand it a task, not a question.
Three doors, one agent
- The web, inside ChatGPT. Codex runs in the cloud, meaning on OpenAI's computers, not yours. You hand off a task, or a few at once, and come back later for the results.
- A code editor. The program developers write code in. Codex sits as a helper right beside the files.
- The command line. A plain text window on your own computer where you type instructions, and Codex works right there.
Pick the door that fits the job: hand off and walk away, or work side by side. For how Codex sits next to the other big coding agents, see coding agents compared.
Safety layer one: the sandbox
If an AI is changing files, how do you keep things safe? A sandbox: a closed-off space where the agent can work without touching anything else.
- Codex works on its own copy of the project. Your original stays exactly as it was until you say yes.
- It can't wander off into the rest of your computer, your email or your other accounts.
- The internet is off by default. Codex only goes online if you switch that on.
Safety layer two: how much it asks first
| Level | What it does | Good for |
|---|---|---|
| Read-only | Looks around and suggests; asks before every change | A first look at a project |
| Auto, inside the project | Edits files and runs checks in the project folder; asks before going outside it or online | Everyday tasks |
| Full access | Does anything without asking | Only a throwaway setup |
Start strict and loosen it only as your trust grows, just like with a new contractor.
What you get back
- A plain summary of what it changed and why.
- The diff: every changed line, shown as before and after.
- Check results: which tests passed and which failed.
- A pull request, if you want: a formal "please add this" request your team can review before it goes in.
A project can also have a file called AGENTS.md: a short house-rules note for the agent, like a sticky note for the contractor. "Run the checks before you finish. Don't touch the payments folder."
The rule is simple: Codex proposes, and you stay the reviewer.
Codex and Claude Code
| Codex | Claude Code | |
|---|---|---|
| Made by | OpenAI | Anthropic |
| Often used | Handed a task in the cloud from ChatGPT, checked later | Side by side on your own computer |
| House rules file | AGENTS.md | CLAUDE.md |
| Safety | Sandbox and approval levels | Permission prompts and modes |
Same idea, different workshop. Use the one your team already uses, and review the work either way. More on Claude Code in Claude Code and Claude for Chrome.
Common mistakes
- Treating it like a chat. Give it a task with a clear "done" test, not a question.
- Jumping to full access on a real project.
- Accepting the summary without the diff. The diff is what actually changed.
Try it yourself
- Pick a small job, for example fixing a spelling mistake on a web page.
- Write the work order: what to change, where, and how you'll know it's done.
- Read the change list, and if code is new to you, ask a developer friend to look at the diff with you.
Related course on Udemy
Understand AI and Get the Boring Stuff Done
Use Claude, ChatGPT, Gemini and NotebookLM for everyday work, safely.View on Udemy ↗: Understand AI and Get the Boring Stuff Done (paid course, opens in a new tab)Related posts
Claude.ai Interface Tour: Every Control You Need on One Screen
Sign in to claude.ai and learn the one screen you'll use for everything: the chat box, the model selector, the sidebar with chats and Projects, the attach and tools row, the Artifacts panel and Settings.
The AI Fluency Model: Delegation, Description, Discernment and Diligence
Most people pick up AI skills in a random order. The AI Fluency Model builds them in sequence: Delegation (what to hand off), Description (asking well), Discernment (judging the output) and Diligence (using it responsibly).
Working With Claude: Pick the Surface, Match the Model, Keep the Context Clear
Three questions every time you use Claude: where do I use it, which model fits, and how do I keep it sharp? Learn the five surfaces, the four model tiers and the context window, with three habits that keep the board clear.
Claude's Four Entry Points: Choose Chat, Projects, Artifacts or Research Before You Type
Before you type, pick the room: Chat for a quick word, Projects for recurring work with your files, Artifacts for a deliverable you'll edit and keep, Research for a deep, cited dig. A decision guide with links to each deep dive.
