AI Model Atlas
Get started
← Back to Blog
How to turn your ChatGPT subscription into a coding agent with Codex

How to turn your ChatGPT subscription into a coding agent with Codex

Jan 12, 2026

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.

Updated Goal: less copy/paste, more closed-loop work
Agent workflow Beginner-friendly CLI + IDE + Cloud Prompt templates Guardrails
Contents tap to toggle

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.

1) What “agent” means (in plain terms)

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.

2) Step 1: Choose where you want Codex to live

You can use Codex in a few common places. Pick the one that matches your habits.

Mobile tip: rotate to landscape for the full table. Wide tables read best sideways — you’ll see all columns without squinting.
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

Option A: In your IDE (best for beginners)

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.

Option B: In your terminal (fastest to start)

Codex CLI is a local coding agent you run inside your project folder. It can read, change, and run code on your machine.

Install
npm i -g @openai/codex
Run (inside your repo)
codex

If you live in the terminal, this is the cleanest path.

Option C: In the cloud (best for “do this while I’m gone” work)

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.”

3) Step 2: Sign in with your ChatGPT account

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:

Reset login
codex logout
codex

4) Step 3: Give it a job it can finish

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)

Three prompts you can copy

Bug fix

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.

Small feature

Add dark mode styles to the settings page. Don’t change the layout. Prefer existing CSS variables. Run the frontend tests.

Codebase tour

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.

5) Step 4: Let it act—then review it like a teammate

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).

6) Step 5: Know the guardrails (so you can trust it)

Codex isn’t meant to be reckless by default. OpenAI’s security guidance describes two layers:

Sandbox boundaries

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.

Approval policy

Controls when it must pause and ask you before acting. In plain terms: you keep the steering wheel.

7) A quick note for Windows users

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.

What you’re really doing when you “turn on” Codex

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.

8) Sources (official docs)