OpenAI Coding Agent Guide

Codex: an AI coding partner that works in your terminal

A practical page for 808AI Workshop learners: understand what Codex is, install it, sign in, then use a safe workflow for reading code, fixing bugs, writing tests, and preparing PRs.

01 / Intro

What is Codex?

Codex is OpenAI's coding agent. It can run locally through Codex CLI, work in an IDE, or run as Codex Web in ChatGPT. Use it for reading code, planning changes, fixing bugs, writing tests, and preparing PR notes.

02 / Setup

Install

Mac / Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh
npm
npm install -g @openai/codex
Homebrew
brew install --cask codex

Run codex, then choose Sign in with ChatGPT. API-key auth is also available for advanced users.

03 / Workflow

808 recommended workflow

  1. Ask Codex to read first, without editing.
  2. Ask for a plan listing files, risks, and verification steps.
  3. Let it make one small change at a time.
  4. Run tests, lint, and build before calling the task done.
  5. Ask for a delivery summary with changes, checks, and remaining risks.

04 / Guardrails

Safety and permissions

Do not paste secrets

Never paste API keys, passwords, payment data, or customer private data. Share variable names only.

Official sources

Based on OpenAI Codex GitHub README and OpenAI Developers docs. Re-check the latest official version before using these commands.