Skip to content

AI coding tools · by OpenAI

Codex

Give Codex a task in your project, such as adding a search box. It can edit the files and run checks, then show you the changes.

Visit Codex

A recipe list works fine with five recipes. With fifty, finding dinner means scrolling. Open the project in Codex and describe the behavior you want in everyday words. For example, typing “pea” should leave “Pea soup” on screen and hide “Tomato pasta.”

Ask Codex to add the search box and check that example. Review the changed files, then try the search yourself. Clear the box as well. Seeing all fifty recipes return tells you something that checking a single match would miss.

When to use it
If you want to start for $0, or you already pay for ChatGPT Plus.
When to skip it
If you want to work in a terminal or a code editor without paying, or the free desktop app hasn’t reached you yet.
What it costs
$0 in the ChatGPT desktop app, which is still rolling out. The Free plan and Go, at $8 a month, work in the desktop app only. A terminal or a code editor needs ChatGPT Plus at $20 a month, or an OpenAI API key paid per use. Plus limits reset every 5 hours and vary by model and task. Weekly limits may also apply.

How to use Codex

Work with Codex one small change at a time. Give it a short AGENTS.md, choose what it may do without asking, plan each change, then review and keep or undo it.

You’ll need

  • Codex set up on your computer. If it isn’t yet, follow Set up Codex on the Set up your AI tool page.
  • A folder for your product, like the my-first-build folder you made in Set up Codex, saved with Git. The review pane needs Git.
  • ChatGPT account. Every ChatGPT plan includes Codex.

Your part

  • Choose what Codex may do without asking you.
  • Read each plan before you approve it.
  • Review every change it made, and try it in the browser.

Copy the prompt for these steps

All 6 steps, in one prompt
I’m following “How to use Codex” on BuildLadder.
What the guide says I’ll end up with: Codex knows how you like to work. Each change starts as a plan you approved, and you’ve reviewed every line it changed.
This comes from https://buildladder.com/tools/codex#working-with-an-ai-agent. If you can open web pages, read https://buildladder.com/tools/codex.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.

How to work with me:
- Go through the steps below in order, one at a time.
- Do what you can yourself in this folder: write code, run commands, check settings. If a service has an official command-line tool, like the Vercel CLI, you can offer to use it. Ask me before you install anything, sign in to anything or spend money.
- When a step needs me, like making an account or clicking in a dashboard, tell me exactly what to do in small steps. Then wait until I say it’s done.
- The actions, checks and fixes in each step were written for me, the reader. Where one says “your AI tool”, that means you, and “Say:” means something I would say to you.
- Never ask me to paste passwords or secret keys into this chat. I type those into the service’s own settings.
- After each step, tell me how to check it worked. Once Git is set up, save a version each time a step works. Then ask if I’m ready for the next one.
- Use plain words. I may never have coded before.

## Step 1 of 6: Open your product in Codex

This step is mine to do. Walk me through it, one action at a time:
- Open the ChatGPT app. Open the ChatGPT menu at the top and choose Codex.
- Open your product’s folder, so Codex works inside it.
- Click New chat.

It worked when: A new Codex chat is open in your product’s folder.

Before we move on, check with me:
- Is the folder shown your product’s folder, not another one?

If something goes wrong:
- You don’t see Codex in the ChatGPT menu. Update the app. If Codex is still missing, the free option hasn’t reached your account yet.

## Step 2 of 6: Write a short AGENTS.md

Read the files in this folder, and PLAN.md if it’s here.

Then draft a short AGENTS.md file for future tasks. Only include what you couldn’t work out by reading the code:
- the command that starts the product, and the one that checks it
- that I’m new to this, so explain things in plain words
- that you ask me before you install anything, delete anything, or change files outside this folder

Keep it short, in plain words. Show me the draft and wait for my yes before you save it.

It worked when: Your folder has an AGENTS.md file that you can read in under a minute.

Before we move on, check with me:
- Do you agree with every line?
- Does it leave out things that are already obvious from your files?

If something goes wrong:
- The draft is long. Say: “Cut anything you could find by reading the code. Keep only what you’d otherwise have to ask me.”

## Step 3 of 6: Choose what it may do without asking

This step is mine to do. Walk me through it, one action at a time:
- Click the permissions control below the message box.
- Choose Ask for approval. Codex works inside your folder, and asks before it changes other files or uses the internet.
- Later, you can choose Approve for me. Then it only asks about steps that look unsafe.
- Leave Full access off. It lets Codex reach any file on your computer and the internet.

It worked when: The permissions control shows the mode you chose.

Before we move on, check with me:
- Can you say in one sentence what Codex may do without asking you?

If something goes wrong:
- You see Custom (config.toml). Someone set permissions in a settings file. Choose Ask for approval instead, unless you set that up on purpose.

## Step 4 of 6: Plan before it builds

This step is mine to do. Walk me through it, one action at a time:
- Type /plan in the message box.
- Describe the result you want, like “Add a contact form to the home page.” Say what done looks like.
- Read the plan. If a step is wrong or missing, say what to change.
- When the plan looks right, tell Codex to go ahead.

It worked when: You approved a short plan you understand before any file changed.

Before we move on, check with me:
- Does the plan only touch what you asked for?
- Can you say each step in your own words?

If something goes wrong:
- The plan is much bigger than you expected. Say: “Make the smallest version first. We’ll add the rest later.”
- Nothing happens when you type /plan. Update the ChatGPT app. Until then, start your message with “Don’t change anything yet. First, show me your plan.”

## Step 5 of 6: Review what it changed

This step is mine to do. Walk me through it, one action at a time:
- Open the review pane. It shows Unstaged changes first, which are the changes you haven’t kept yet.
- Click the space beside a file’s name to open or close its changes. Read each one.
- Type /review and choose Review uncommitted changes for a second look. It lists problems without changing your files.
- Open your product in the browser and try the change, the way a visitor would.

It worked when: You’ve seen every changed line, and the change works when you try it.

Before we move on, check with me:
- Does every changed file have to do with what you asked for?

If something goes wrong:
- It changed files you didn’t ask about. Say: “Why did you change this file? Undo anything I didn’t ask for.”
- The review pane is empty or says it needs Git. The review pane only works in a Git repository. Say: “Set up Git in this folder and save a first version.” Then look again.

## Step 6 of 6: Undo a change

This step is mine to do. Walk me through it, one action at a time:
- To throw away everything Codex changed, click Revert all at the top of the review pane.
- To throw away only part of it, revert just that file, or just that block of lines.
- To keep the good parts, stage them first. Staging marks a change as one to keep. Then revert the rest.

It worked when: Your files are back the way they were before the change.

Before we move on, check with me:
- Does your product work in the browser the way it did before?

If something goes wrong:
- Codex changed something outside your folder. Reverting in the review pane can’t undo that. Check it yourself, and keep Ask for approval on so it asks first next time.

The steps

  • Steps marked AI tool are done by your AI tool when you paste the prompt. The rest are yours.
  • Save a version after every step that works.
  • If a screen looks different from a step, ask your AI tool where the setting moved.
  • Never paste a password or secret key into the chat.
  1. Set up for your product

    Open your product in Codex

    You

    Codex can read and change files only in the folder you choose. Open the folder that holds your product.

    1. Open the ChatGPT app. Open the ChatGPT menu at the top and choose Codex.
    2. Open your product’s folder, so Codex works inside it.
    3. Click New chat.

    It worked when: A new Codex chat is open in your product’s folder.

    Check this step
    • Is the folder shown your product’s folder, not another one?
    You don’t see Codex in the ChatGPT menu.

    Update the app. If Codex is still missing, the free option hasn’t reached your account yet.

  2. Write a short AGENTS.md

    AI tool

    AGENTS.md is a note in your folder that Codex reads before doing any work. Keep it short. Cursor and other AI tools read it too.

    It worked when: Your folder has an AGENTS.md file that you can read in under a minute.

    Check this step
    • Do you agree with every line?
    • Does it leave out things that are already obvious from your files?
    The draft is long.

    Say: “Cut anything you could find by reading the code. Keep only what you’d otherwise have to ask me.”

  3. Choose what it may do without asking

    You

    A permission mode decides what Codex may do without asking you. OpenAI suggests starting with Ask for approval. You can change it any time.

    1. Click the permissions control below the message box.
    2. Choose Ask for approval. Codex works inside your folder, and asks before it changes other files or uses the internet.
    3. Later, you can choose Approve for me. Then it only asks about steps that look unsafe.
    4. Leave Full access off. It lets Codex reach any file on your computer and the internet.

    It worked when: The permissions control shows the mode you chose.

    Check this step
    • Can you say in one sentence what Codex may do without asking you?
    You see Custom (config.toml).

    Someone set permissions in a settings file. Choose Ask for approval instead, unless you set that up on purpose.

  4. A change you planned and checked

    Plan before it builds

    You

    With /plan, Codex looks into your files and suggests an approach before it edits anything. You fix the plan in words, which is much faster than fixing code.

    1. Type /plan in the message box.
    2. Describe the result you want, like “Add a contact form to the home page.” Say what done looks like.
    3. Read the plan. If a step is wrong or missing, say what to change.
    4. When the plan looks right, tell Codex to go ahead.

    It worked when: You approved a short plan you understand before any file changed.

    Check this step
    • Does the plan only touch what you asked for?
    • Can you say each step in your own words?
    The plan is much bigger than you expected.

    Say: “Make the smallest version first. We’ll add the rest later.”

    Nothing happens when you type /plan.

    Update the ChatGPT app. Until then, start your message with “Don’t change anything yet. First, show me your plan.”

  5. Review what it changed

    You

    “Done” means Codex thinks it’s done. Look at each changed line, ask for a second look, then try the change yourself.

    1. Open the review pane. It shows Unstaged changes first, which are the changes you haven’t kept yet.
    2. Click the space beside a file’s name to open or close its changes. Read each one.
    3. Type /review and choose Review uncommitted changes for a second look. It lists problems without changing your files.
    4. Open your product in the browser and try the change, the way a visitor would.

    It worked when: You’ve seen every changed line, and the change works when you try it.

    Check this step
    • Does every changed file have to do with what you asked for?
    It changed files you didn’t ask about.

    Say: “Why did you change this file? Undo anything I didn’t ask for.”

    The review pane is empty or says it needs Git.

    The review pane only works in a Git repository. Say: “Set up Git in this folder and save a first version.” Then look again.

  6. Undo a change

    You

    If a change is wrong, throw it away in the review pane. Your files go back to your last saved version, which Git calls a commit.

    1. To throw away everything Codex changed, click Revert all at the top of the review pane.
    2. To throw away only part of it, revert just that file, or just that block of lines.
    3. To keep the good parts, stage them first. Staging marks a change as one to keep. Then revert the rest.

    It worked when: Your files are back the way they were before the change.

    Check this step
    • Does your product work in the browser the way it did before?
    Codex changed something outside your folder.

    Reverting in the review pane can’t undo that. Check it yourself, and keep Ask for approval on so it asks first next time.

Compare Codex with the other options

Stuck? Try these, in order
  1. Stop asking it to “fix it”. Say exactly what’s wrong.

    Paste this into the same chat. It asks your AI tool to find the problem with you.

    Troubleshooting prompt
    I’m following “Codex” on BuildLadder and something isn’t working.
    This comes from https://buildladder.com/tools/codex. If you can open web pages, read https://buildladder.com/tools/codex.md for the current version. BuildLadder guide, tool, concept, answer and setup pages all work this way: add .md to the address.
    
    Ask me which step I’m on, what I tried and what happened, one question at a time. Look at the files in this folder if you can. Then explain the problem in plain words and suggest the smallest fix. Don’t change anything that already works.

  2. Check the service isn’t down.

    If you use one of these, open its status page before changing any code: Supabase, Vercel, Netlify, Cloudflare, Stripe, Clerk, Firebase, Resend, GitHub, Expo, Claude, OpenAI.

  3. Go back to your last saved version.
    Troubleshooting prompt
    Take my product back to the last saved version that worked. First show me which version that is and what will change. Don’t delete anything else.

  4. Make the change smaller.
    Troubleshooting prompt
    Let’s make a smaller change. Undo what you just tried. Then do only the first part of it, and tell me how to check that part works before we go on.

  5. Ask a person.

    Copy this, fill in each line, and post it in a community like r/vibecoding. Take out any keys or passwords first.

    Problem report
    What I'm building: (one sentence)
    What I asked my AI tool to do: (the last request)
    What I expected: (what should happen)
    What happened instead: (what you see)
    The exact error, if any: (copy it here)
    What I've tried: (each attempt, in order)
    My tools: (AI tool, website or app, hosting)

Look things up

Questions people ask

Words used on this page

Folder
A folder is a container on your computer that holds files and other folders. A product's code lives in one main folder, with everything for your site or app inside it.
AI coding tool
An AI coding tool is an app that writes and edits code when you describe what you want. Claude Code, Codex, and Cursor are well-known examples. This site calls it your AI tool.
Instructions file
An instructions file is a note in your product’s folder that your AI tool reads when a chat starts. Claude Code reads CLAUDE.md, and Codex and Cursor read AGENTS.md.
File
A file is one saved piece of work on your computer, like a photo or a page of code. Its name usually ends with a short tag that shows its type, such as .html or .jpg.
Permission mode
A permission mode decides what your AI tool may do without asking you first, like editing files or running commands. A careful mode asks before almost everything.
Prompt injection
Prompt injection is when a file, web page or message your AI tool reads holds hidden instructions, hoping it will follow them instead of you.
Plan mode
Plan mode is a setting where your AI tool reads your files and writes a plan, but changes nothing. It starts building only after you approve the plan.
Diff
A diff shows exactly what changed in a file. Lines that were added are usually green, and lines that were removed are usually red.
Git
Git is a free tool on your computer that keeps a history of your product's files. It lets you save versions, compare them, and go back if something breaks.
Commit
A commit is a saved version of your product at one moment, with a short note about what changed. Git keeps every commit, so you can look back or undo a change later.

Official pages

What’s new

  • 26 Oct 2026: GPT-6.1 Terra arrives in Codex. Source

Updated · OpenAI