To set up Codex, install the ChatGPT desktop app, sign in, open Codex from the top-left menu, then choose a project folder, permissions, a model, Computer Use and a rules file called AGENTS.md. Codex is OpenAI's coding agent, available through ChatGPT. It reads and navigates project files, writes and edits code, runs commands and tests, and helps complete multi-step technical tasks.

This guide takes you through the ten setup steps in order, from installing the app to saving your rules, so Codex starts each task with the right access, the right model and your preferences already written down.

We publish AI systems like this for 300,000+ senior professionals at AI Central, and more of them live in the AI Central Library.

Why a default Codex install gives vague results

Most people install Codex, open it and type a request into an empty window. Three things go wrong. Codex can reach more than the task needs, because nobody chose a folder or set permissions. It cannot see the app the work lives in, because Computer Use was never switched on. And every task starts from zero, because your preferences sit in your head instead of in a file Codex reads.

Each of those is a setting you choose once. The ten steps below are those settings, in the order you meet them.

How to set up Codex in 10 steps

1. Install the app

Download the ChatGPT desktop app for Mac or Windows, sign in, and select Codex from the top-left menu. Codex runs in the desktop app, not in a browser tab. It can work on project files on your computer or run supported tasks in the cloud.

2. Sign in with your ChatGPT account

Choose Continue with ChatGPT, then select Codex in the menu. This connects Codex to your existing ChatGPT account, so it uses your plan and the features that plan includes.

3. Open your first project

Click New project and select a work folder. Codex then works inside that folder instead of across your whole computer. Pick the folder for a real piece of work you already have in progress, so the first task tests something you care about.

4. Set permissions

Open the control in the bottom-left corner and allow access only to the files your work needs. Decide what Codex can read and change before it starts, not after. If you are unsure, grant less and add access when a task needs it.

5. Pick your model

Click New chat and open the model picker to choose which model handles the task. When GPT-6 Astra appears in the list, pick it for real work - it is the most capable option there.

6. Add Computer Use

Search for Computer Use in Plugins and click Install or Enable. It is optional, and we recommend it. Without it, Codex works on code and files. With it, Codex can also operate the apps on your computer to carry out a task.

7. Give Codex access to your apps

Go to Settings, then Computer use. Connect your browser if your workflow needs it. On a Mac, allow Screen Recording and Accessibility access: Codex needs both to see the screen and click on it, and without them Computer Use does not work.

8. Open the right screen first

Before you give Codex a task, open the app you work in, go to the page the task is about, and leave it open. Codex works from what is on screen, so the right page needs to be there before you ask.

9. Give it one clear job

Write each task in three parts: the finished result, the point where Codex should stop, and an instruction to check its own work. A vague prompt gets a vague result. For example: "Update the pricing table in pricing.md with the figures in this note, stop before saving anything else, and list every change you made."

The same rules apply to any prompt, and the 26 principles of prompt engineering cover the rest.

10. Save your rules in AGENTS.md

Create a file called AGENTS.md in your project and write your preferences in it: how you name files, the style you want, what Codex should leave alone. Codex reads this file when it works on the project, so you write your preferences once instead of repeating them in every task. For your next task, ask Codex to read the file first.

If you have already set up custom instructions and memory in ChatGPT, the idea is the same, scoped to one project.

What actually changes

Before setup, every Codex task starts with you explaining the project, the access and your preferences again. After it, Codex opens in a folder you chose, with permissions you set, on the model you picked, able to see your apps, and reading your rules from AGENTS.md. You do the setup once, and from the first task Codex follows the rules you wrote down.

If you are still choosing an assistant, our guide to setting up ChatGPT, Claude and Copilot covers the basics, and more setup guides live in the AI Central Library.

Frequently Asked Questions

What is Codex?

Codex is OpenAI's coding agent, available through ChatGPT. It reads and navigates project files, writes and edits code, runs commands and tests, and helps complete multi-step technical tasks.

Do I need the ChatGPT desktop app to use Codex?

The setup in this guide uses the ChatGPT desktop app for Mac or Windows, where you select Codex from the top-left menu. Codex runs there rather than in a browser tab, and can work on local files or run supported tasks in the cloud.

Is Computer Use required in Codex?

No. Codex works without it, but we recommend enabling it. Computer Use lets Codex operate the apps on your computer, and on a Mac it needs Screen Recording and Accessibility access.

What is an AGENTS.md file?

AGENTS.md is a file in your project where you write your preferences. Codex reads it when working on that project, so you do not have to repeat your rules in every task.

Which model should I use in Codex?

Open the model picker in a new chat. When GPT-6 Astra is available, it is the most capable option for real work.