Course · Codex · Getting started
Connect Codex to your editor
You just shipped a fix from a bare terminal, and a reasonable worry is forming: am I supposed to abandon my editor for this? No - and this lesson is short, because the mechanics of moving Codex next to your editor are genuinely simple. The thing worth two minutes of care is what that move does to the habit you just spent an hour building.
Put it next to your code
Section titled “Put it next to your code”Remember from the install lesson that Codex is one agent with several front doors - and the IDE is one of them. There are two ways to stand it next to budgetcli:
The lowest-friction option needs nothing new: open your editor’s integrated terminal and run codex in it, from the repo root, exactly as you did this whole chapter. Now the agent is one pane of the same window as your files - you review its proposed edits in the same place you’d review a teammate’s, without leaving the editor.
The fuller option is the official IDE integration for VS Code or a JetBrains IDE, which wires the two together more tightly - the editor’s open files and selection become context the agent can use, and the diffs it proposes render natively in the editor rather than as text in the terminal. The exact integration surface - which editors are supported and what each adds - moves quickly, so the official docs are the page to trust for specifics. (One nice consequence for this audience: because Cursor is a VS Code fork, the VS Code extension installs there too.)
The durable point underneath the specifics: you do not run Codex in a window far from your code. You run it where your code already is - and because it’s the same agent you configured at the CLI, your sign-in and every habit from this chapter carry straight across, at least in principle. Same agent, same configuration, a different window.
It complements your completion - and that’s exactly where the risk is
Section titled “It complements your completion - and that’s exactly where the risk is”This is the reframe that matters most for anyone arriving from inline AI completion. That tool is autocomplete - it finishes the line you’re typing, in the flow of your keystrokes, and it’s excellent at it. Codex is an agent - you hand it a whole task and it reads across files, makes a set of coordinated edits, and runs your tests. Those are different jobs:
- Keep your inline completion for the moment-to-moment typing - the function body you’re halfway through, the obvious next line.
- Reach for the agent when the unit of work is a task, not a line - “fix the date bug and add a test,” “add a CSV importer for this new bank’s format,” “find why this report total is off by a few cents.”
Here’s the part worth naming honestly, because it’s the actual tension in this lesson: those two things now look almost identical on screen. In the terminal, a proposed edit was a block of text you had to stop and read. In the editor, it renders inline, in your file, in roughly the same visual language as the completion suggestion you’ve been tabbing through all week. That similarity is where the leash from earlier in this chapter is most likely to fray - not because Codex changed, but because a full multi-file diff sitting where a one-line suggestion usually sits makes “approve” feel like “accept,” and accepting is a reflex you’ve spent years building for a much smaller kind of edit. The fix is the same discipline from the last lesson, applied somewhere it’s easier to skip: read what’s actually in the diff before your thumb does what it always does. The interface got friendlier. The stakes behind it didn’t.
The first two rows in the ledger
Section titled “The first two rows in the ledger”Every chapter from here keeps score on the same four questions, in a running ledger that grows a row per chapter. The first two rows come from the two moves you actually made this hour:
| Move | Tokens | Turns | Blast radius | Recurs? |
|---|---|---|---|---|
| Read-only question (“what does this do”) | ~3,900 est. (390 lines: README + csv.py) | 1 | None - nothing written | No - next session starts blind again unless it’s written down |
| Fix the CSV date bug | ~2,100 est. (csv.py alone; the test file isn’t one of our sized constants, so the real total runs higher) | 4 | Money-adjacent - meant to touch only the date field, briefly drifted into the amount field | Partly - the line itself is committed and holds. The habit that let it drift isn’t taught yet, so the drift comes back |
Three of the four questions already have decent answers. The recurrence column is the exception - it says no, then partly, and it will keep saying some version of that until a later chapter changes it. This ledger is the course’s scoreboard, and the recurrence column is where most of the week’s real work goes.
The hour, closed - and what it didn’t fix
Section titled “The hour, closed - and what it didn’t fix”You installed the agent, authenticated it, watched one turn of the loop on a harmless question, then watched all four beats close on a real CSV date bug - read, propose, approve, apply, with one line quietly caught in review before it ever reached a commit. That fix is in git now. It holds. Reopen budgetcli next week and the date parser is still fixed, no matter what.
What doesn’t hold is the reason it was ever broken. Nothing you did this hour told Codex that budgetcli treats money as integer cents - you told a human-shaped agent, once, out loud, in a conversation that ends the moment this terminal closes. And you’re about to start closing a lot more of those: now that Codex sits in your editor instead of a dedicated terminal, you’ll open it for smaller tasks, more often, in more separate sessions than this one hour suggested. Every one of those sessions starts exactly as blind as this one did. Next chapter: sessions and context - what a session actually remembers, what it doesn’t, and how to keep more of today’s understanding alive into tomorrow’s.