Complete guide to OpenAI Codex

Getting started

Codex is enabled from your ChatGPT account (Plus, Pro, Business, or Enterprise) or installed as a CLI from developers.openai.com/codex. After you connect the repository you want to work on, you describe the task in natural language, from 'document this function' to 'implement this endpoint and its tests', and Codex does the work inside a sandbox environment: it reads the code, proposes a plan, edits the necessary files, runs commands and tests, and iterates until the task is complete, always under an approval flow that keeps the developer in control.

Use cases

End-to-end feature development
Describe a new feature and let Codex write the code and the tests, and verify that everything works before delivering it.
Maintenance and refactors
Ask it to update dependencies, refactor modules, or fix errors found in production, and review the sandbox before merging the changes.
Using it from ChatGPT without leaving the browser
Delegate coding tasks directly from the ChatGPT interface if you don't want to install an additional CLI or IDE.

Advanced setup

  1. Sandbox mode and command approval
    Codex runs changes inside an isolated environment and asks for approval before running sensitive commands, so it can't touch your real system without supervision.
  2. Token-based credits
    Since April 2026, usage on the Plus/Pro/Business plans is billed through token-based credits instead of per message; check your usage in the OpenAI dashboard.

Tips

  • Use CLI mode for large repositories where you want to integrate Codex into your usual terminal workflow alongside other tools.
  • Always review the plan of changes before approving it, especially for tasks that touch several files at once.
  • If you already pay for ChatGPT Plus or Pro, try Codex integrated there first before considering a separate pay-as-you-go seat.

FAQ

Do I need ChatGPT Plus to use it?
It's not required: the Free plan includes limited usage, but Plus, Pro, or Business give you much more capacity.
Is it the same as GitHub Copilot?
No: Copilot focuses on autocomplete suggestions inside the editor, while Codex is an agent that autonomously runs complete tasks in a sandbox.
Where can I use it?
From ChatGPT (web), the terminal CLI, a desktop app (Windows, macOS, and Linux), or IDE extensions.
Based on Web research and independent verification carried out on Sep 3, 2026: developers.openai.com/codex/changelog, developers.openai.com/codex/pricing (updates dated September 2026), morphllm.com/codex-pricing, cloudzero.com/blog/openai-codex-pricing.