What Is OpenAI Codex
OpenAI Codex is an AI coding agent OpenAI introduced in 2025. Its biggest trait is "throw a task and it's done while you sleep" async execution. There are CLI and Cloud forms.
2 Forms
1. Codex CLI
A CLI running in the local terminal. Operation feel similar to Claude Code.
2. Codex Cloud (Agent Mode)
Runs in OpenAI's cloud. Links with a GitHub repo and, triggered by Issues or PRs, automatically writes code and submits a PR.
Pricing
- Included from ChatGPT Plus (USD 20/mo) up
- Pro (USD 200/mo): greatly increased usage
- Via API: usage billing, separate
Codex CLI Install
npm install -g @openai/codex codex login # Log into OpenAI in the browser cd your-project codex
Usage (CLI)
Interactive Mode
$ codex > What's this project's structure? > Rewrite the auth module to JWT auth > Add tests too
One-Line Task
$ codex "make all TypeScript files strict-mode compliant"
Codex Cloud Setup
1. GitHub Linkage
- chat.openai.com → Settings → Codex → GitHub linkage
- Select target repos