What is Codex?
OpenAI’s coding agent reads an existing repository, edits files and runs commands to complete engineering tasks. The open-source CLI runs locally; desktop, IDE and cloud experiences are also available.
Edited by AhaFrame · Definition source: Official project ↗
How it works
Codex is a local coding agent: it can inspect a repository, propose edits and execute approved tools. Its output still needs review and tests.
Core features
Repository exploration and multi-file code changes
Command execution and test-driven iteration
ChatGPT sign-in or API-key authentication
IDE, desktop and cloud handoff options
Feature reference: Official documentation ↗
What can you use it for?
- Fix a bug with a reproducible failing test
- Explain an unfamiliar codebase
- Refactor a module and review its diff
Your first guided walkthrough
A supported operating system and a ChatGPT account or funded API key.
An existing Git repository, a clean working tree, a small bug with a reproducible test, and an available Codex sign-in method.
npm install -g @openai/codex- Read the official installation options, install the CLI, enter the project and run codex; complete sign-in.
- Ask Codex to explain the failing behavior and propose a short plan before editing.
- Request the fix on a new branch, inspect the diff and run the repository's own tests.
- Reproduce the original failure and retain test output before deciding to merge.
Try: "Explain why this unit test fails. Do not edit anything until you have listed the reproduction steps."
EXPECTED RESULT · VERIFY INDEPENDENTLYA focused patch with a regression test and an inspectable git diff.
Upstream documentation checked: 2026-10-27. No independent functionality test.
Pricing & running costs
CLI software is free. ChatGPT plans provide included usage; API-key sessions use separate API billing. Free access and paid-plan allowances vary.
Check official pricing details ↗Pricing checked 2026-10-27. Confirm currency, billing period, included usage and taxes on the official page.
License & limitations
License applies to this project; connected models and services have separate terms.
- Local execution can still send task context to the configured model provider.
- Plan limits, cloud features and model availability depend on authentication and rollout.
Frequently asked questions
Is the CLI itself paid?
The CLI is Apache-2.0 software. Model usage follows your ChatGPT plan or API billing.
Can it change my files?
Yes. Review its approval settings, file scope and resulting diff.
Official links & sources
Based on the official sources above. Use cases are editorial examples; source checks are not independent functional tests.
Open upstream repository ↗