AI • Coding • Agents • Codex
Most people use ChatGPT for coding the same way they use a search engine with better manners: ask, copy, paste, repeat. It works. It’s also strangely manual.
Codex is the next step. Instead of talking about code, it can work on code—reading files, making edits, running commands, and iterating until something actually passes tests. It’s a coding agent, not just a chat box.
Executive summary: Codex is the next step after “chat about code.” It can work on code—inspect a project, edit files, run commands, and iterate until tests pass. Think “coding teammate that can actually touch the repo,” with you reviewing the diff.
If you already subscribe to ChatGPT, you may already have it: OpenAI says Codex is included with ChatGPT Plus, Pro, Business, Edu, and Enterprise.
A chatbot answers questions.
An agent takes actions.
Codex is built to operate inside a real project: it can inspect your repository, modify files, and run tasks. You give it work. It produces a diff you can review. You keep control.
You can use Codex in a few common places. Pick the one that matches your habits.
| Option | Best for | What it feels like |
|---|---|---|
| In your IDE (beginner-friendly) | New devs who want “point and click” flow | ChatGPT/Codex lives beside your files — less terminal, more guided editing |
| Terminal (CLI) | Fast start, repo-native work | “Agent in the project folder” — reads, edits, runs commands locally |
| Cloud | Longer tasks / async-style work | “Assign work, review output” — often as a PR you can inspect |
If you’re unfamiliar with terminals, this is often the easiest path: install the Codex/ChatGPT IDE extension and let the agent work next to your files. You can ask for changes, review edits inline, and apply diffs without context-switching.
Why it’s easier: beginners usually think in “files and panels,” not commands. The IDE keeps everything visible: project tree, code, and agent suggestions in one place.
Codex CLI is a local coding agent you run inside your project folder. It can read, change, and run code on your machine.
npm i -g @openai/codex
codex
If you live in the terminal, this is the cleanest path.
Codex also runs in a cloud environment, where it can work on tasks in the background. You connect it to GitHub, assign work, and review what it produced—often as a pull request you can inspect like any other.
This is especially useful when the task is bigger than a single sitting: “refactor this,” “add tests,” “fix the failing build.”
Codex is designed to work with a ChatGPT login (in addition to API-key setups). Open the client you chose—IDE, CLI, or web—and follow the sign-in prompt.
If you previously used the CLI with an API key and want to switch, logging out and restarting the CLI flow is the simplest reset:
codex logout
codex
The biggest mistake is treating an agent like a wish machine:
“Build me an app.” That prompt has no finish line. Agents drift when you do.
Codex works best when you write like a manager with a deadline: clear goal, boundaries, definition of done.
Prompt template:
Goal: what you want to change
Constraints: what not to touch (or what to use)
Done means: what “finished” looks like (tests, outputs, files)
Find why POST /api/orders returns 500 when
discount_code is empty. Add a regression test.
Fix it with the smallest change possible. Run tests and report what you ran.
Add dark mode styles to the settings page. Don’t change the layout. Prefer existing CSS variables. Run the frontend tests.
Explain how authentication works end-to-end in this repo. Point to the key files. Summarize the flow in bullets. Suggest one safe refactor to improve readability.
Boring prompts ship. Vague prompts wander.
Codex can run commands and tests as it works. That’s the point: it can close the loop instead of leaving you with a half-finished snippet.
Tip: Create a Git checkpoint before you start. Agents are fast—so you want reversibility to be fast, too.
A practical workflow:
1) Ask for a plan first (“Scan the repo and propose a plan before changing anything.”)
2) Keep the change set small (“Only touch these files.”)
3) Make tests non-negotiable (“Don’t call it done without green.”)
4) Review the output like a PR (read diff, ask why, request revisions when it gets clever).
Codex isn’t meant to be reckless by default. OpenAI’s security guidance describes two layers:
Limits what the agent can touch (often scoped to the workspace). In plain terms: it tries to stay “inside the room” unless you open the door.
Controls when it must pause and ask you before acting. In plain terms: you keep the steering wheel.
OpenAI’s Windows guide recommends the IDE extension or running the CLI from PowerShell. It also notes that running Codex natively on Windows uses an experimental sandbox in agent mode to block filesystem writes outside your working folder and prevent network access without explicit approval.
If that sounds fussy, it’s because it’s designed to be safer.
You’re not buying a robot engineer.
You’re buying leverage.
A ChatGPT subscription is easy to think of as answers. Codex turns it into throughput: fewer copy-pastes, fewer context switches, fewer “I’ll do the boring part later” tasks that never get done.
You still decide what good looks like. You still own the architecture. But the slog—the wiring, the renaming, the test scaffolding, the repo spelunking— doesn’t have to be entirely human work anymore.