OpenAI Codex CLI
OpenAI's open-source coding agent that runs in your terminal to read, edit and run code.
What is OpenAI Codex CLI?
Codex CLI is a coding agent from OpenAI that runs locally in your terminal. It can understand a codebase, propose and apply edits, run tests and commands, and work with different approval modes so you stay in control.
Codex CLI was released as open source in 2025 and is part of OpenAI's broader Codex family, which also includes a cloud agent and IDE extensions.
You describe a task in plain language, such as fixing a failing test or adding a feature, and the agent explores files, makes changes and runs commands.
Approval modes let you decide whether it asks before editing files or running commands, and it can run in a sandbox for safety.
Developers use it for refactors, bug fixes, writing tests and quick scripts.
Key features of OpenAI Codex CLI
- Terminal agent: Works directly in your local repository.
- File edits and commands: Applies changes and runs tests or scripts.
- Approval modes: Choose how much autonomy to allow.
- Sandboxing: Runs commands in a restricted environment.
- Open source: Code available on GitHub.
What you can use OpenAI Codex CLI for
- Fixing bugs and failing tests
- Refactoring code
- Writing tests
- Automating repetitive dev tasks
Pros and considerations
Strengths
- Open source and local
- Fine-grained approvals
- Works with ChatGPT plans
Things to check
- Review every diff before committing.
- Usage costs depend on plan or API.
- Terminal workflow may not suit everyone.
OpenAI Codex CLI pricing
Open source. The CLI is open source; usage is billed through a ChatGPT plan or OpenAI API account, so check OpenAI's site for current pricing.
Who OpenAI Codex CLI is best for
Developers who want an AI coding agent in the terminal.
Independent listing by AI Agent Help, last reviewed October 2026. Features and pricing change; check the official website for the latest details. Spot something out of date? Tell us.
Frequently asked questions
Is Codex CLI free?
The tool is open source; model usage is billed through ChatGPT or the API.
Does it run locally?
The agent runs on your machine and calls OpenAI models.
Can it run commands automatically?
Yes, depending on the approval mode you choose.