Claude Code and Codex

How to Use Codex: Install, Sign In, First Task

Codex is OpenAI's coding agent. To use it, install the Codex CLI or the IDE extension, run `codex` in a project folder, sign in with your ChatGPT account, and describe a task in plain language. Codex reads your project, proposes changes, and asks before it edits files or runs commands, depending on the permissions you set.

  • 4 min read
  • 11 sections
  • Updated October 12, 2026
On this page

In short

  • Install Codex, run codex in your project, sign in with ChatGPT.
  • Describe a small task, review the changes, keep or reject them.
  • Put your rules in an AGENTS.md file so Codex follows them every time.

What is Codex?

We are RocketLauncher, a software company, and we use both Codex and Claude Code. Codex is OpenAI's coding agent. You give it a task in plain language. It reads your project, makes a plan, edits files and can run commands. You can use it in several places:

  • The CLI, in your terminal.
  • An IDE extension for VS Code, Cursor and Windsurf, plus built-in support in Xcode and JetBrains IDEs.
  • A desktop app.
  • Codex on the web, for tasks you hand off and check later.

This guide uses the CLI, because the other surfaces work the same way once you know it. Our Codex hub lists more resources.

What you need

  • A computer with a terminal. Windows users can use the Windows app, the Windows sandbox or WSL. See OpenAI's docs for the current options.
  • A ChatGPT account. Which plans include Codex, and how much usage they get, changes over time. Check the current Codex pricing page.
  • A project folder, ideally under git.

How to install and start

  1. Open the current Codex CLI page from OpenAI and copy the install command for your system. On macOS and Linux it is a one-line script. Windows, npm and Homebrew options are also listed there.
  2. Open a terminal and move into your project folder.
  3. Run codex.
  4. On first run, choose Sign in with ChatGPT, or another sign-in method if you prefer.
  5. Wait for the prompt. You are ready.

Never paste an API key into a chat or commit it to git. Keep keys in environment variables.

Your first task

  1. Commit your work first. A git checkpoint before and after a task lets you undo anything.
  2. Start with a read-only request, for example: "Tell me about this project."
  3. Read the answer. Check that Codex understood the structure.
  4. Ask for a small change: "Add a section to the README that explains how to run the tests."
  5. Review what Codex proposes. Approve the edit or ask for something different.
  6. Ask it to run the tests or the build, and read the result.
  7. Commit if you are happy.

Keep tasks small

Small tasks give better results. "Fix the date format on the invoice page" works better than "improve the whole app". If a task is big, ask Codex for a plan first and work through it step by step.

Control what Codex can do

Use the /permissions command to choose when Codex may edit files or run commands without asking. A safe pattern:

  • Start with Codex asking before each edit and command.
  • Allow edits inside the project folder once you trust the task.
  • Keep commands that touch the network, delete files or deploy under manual approval.

Set up AGENTS.md

AGENTS.md is a markdown file at the root of your project. It tells coding agents how to work in your repo. Codex reads it before it starts.

  1. In Codex, run /init. It creates a starter AGENTS.md.
  2. Edit it. Keep it short and concrete.
  3. Commit it so the whole team shares the same rules.

Good things to put in it:

  • How to install, build and test, as exact commands.
  • Code style rules and folders that are off limits.
  • Words or patterns to avoid.
  • What "done" means, for example "tests pass and lint is clean".

Other tools read this format too. Claude Code can use an AGENTS.md file if your repo has one, and many teams keep one file for both tools.

Use Codex in your editor

For VS Code, Cursor or Windsurf, install the Codex extension and click the Codex icon, or run "Codex: Open Codex Sidebar" from the Command Palette. Sign in and start a chat. You can add open files or selections to your prompt, review diffs in place, and send larger jobs to Codex on the web.

Prompts that work well

  • "Explain how login works in this project. Do not change any files."
  • "Write a plan to add a contact form. List the files you will touch."
  • "Fix the failing test in the invoice module, then run the tests again."
  • "Review my last commit for bugs and missing tests."

A good prompt names the goal, the place in the code and how to check the result. If Codex goes the wrong way, stop it, say what you meant and try again. You can also ask it to undo its last change.

Common mistakes

  • Giving a huge task in one prompt.
  • Skipping git, then having no way to go back.
  • Approving every command without reading it.
  • Leaving AGENTS.md empty and repeating the same rules in every prompt.

Turn it into a service with GoHighLevel

Many people use Codex to build small things for local businesses, such as a booking page, a lead form or a set of follow-up automations, and then run them on GoHighLevel. Codex helps write and fix the code, and GoHighLevel handles contacts, messages, calendars and payments. Our Claude Code + GoHighLevel kit shows the full process, and the same steps work with Codex. You can also browse the other build and sell kits. We make no income promises. Results depend on your work and your clients.

Questions people ask

What is Codex?

Codex is OpenAI's coding agent. It can read a project, edit files, run commands and explain code. You can use it from the terminal, from an IDE extension, from a desktop app, or on the web.

How do I install the Codex CLI?

On macOS and Linux, OpenAI's docs give a one-line install script. Windows, npm and Homebrew options also exist. Check the current Codex CLI page for the exact command for your system.

Do I need a paid ChatGPT plan?

Codex access and usage limits come with your ChatGPT plan, and OpenAI changes what each plan includes. Check the current Codex pricing page. You can also sign in another way, such as with an API key, which is billed per use.

What is AGENTS.md?

AGENTS.md is a plain markdown file in your project with instructions for coding agents: how to build, how to test, and your rules. Codex reads it before working. Run /init in Codex to create a starter file.

Can Codex run commands without asking me?

Only as far as your permissions allow. Use the /permissions command to choose when Codex may edit files or run commands without asking. Start strict and loosen it as you build trust.

Does Codex work in VS Code?

Yes. There is a Codex extension for VS Code, Cursor and Windsurf, and built-in integrations for Xcode and JetBrains IDEs.

Build it with people who already did.

Join the free community: weekly live calls, a start here course and builders in your language.

Join free on Skool