OpenAI Codex is OpenAI’s agentic coding tool. Osmani describes its positioning as explicit about tool use: it runs commands, runs tests, iterates to a passing state, and then proposes a pull request.
OpenAI launched it as a research preview in May 2025, announcing it in Introducing Codex as a cloud-based software engineering agent able to work on many tasks in parallel — writing features, answering questions about a codebase, fixing bugs, and proposing pull requests. It is powered by codex-1, which OpenAI describes as a version of its o3 model optimized for software engineering and trained with reinforcement learning on real-world coding tasks so that it produces code close to human style and PR preferences, follows instructions precisely, and can iterate on tests until they pass.
Capabilities
- Runs commands and tests as part of its own workflow.
- Iterates until those checks pass before proposing a pull request.
- Each task runs independently in its own isolated cloud environment preloaded with the user’s repository, where Codex can read and edit files and run commands including test harnesses, linters and type checkers. OpenAI puts typical task completion at between 1 and 30 minutes and says progress can be watched in real time.
- On finishing, it commits its changes in that environment. The user can then review the result, request revisions, open a GitHub pull request, or pull the changes into their local environment.
- It cites terminal logs and test outputs so each step of a task can be traced, and states uncertainty or test failures explicitly rather than reporting success. OpenAI still describes manual review and validation of all agent-generated code as essential.
- Osmani cites OpenAI’s Codex documentation as recommending an AGENTS.md file to give the agent consistent expectations about which tests to run, lint rules, dependency policies, and documentation requirements.
- At launch the agent ran with internet access disabled, so it could reach only the code supplied through connected GitHub repositories and dependencies installed by a user-provided setup script. OpenAI notes this describes the launch configuration and points to separate documentation for later networking options.
- Alongside the cloud agent there is Codex CLI, a lightweight open-source coding agent that runs
in the terminal. A smaller version of codex-1 derived from o4-mini became its default model and
is exposed in the API as
codex-mini-latest, optimized for low-latency code Q&A and editing. Signing in to the CLI with a ChatGPT account configures the API key automatically.
Security Considerations
An NVIDIA AI Red Team report demonstrated an Indirect AGENTS.md Injection attack against Codex, in which a malicious Go dependency detected the Codex environment through the CODEX_PROXY_CERT variable and wrote an untracked AGENTS.md file during the build. The injected directives claimed precedence over the user’s request, and the agent acted on them: asked to change a greeting string, it inserted a five-minute sleep into the program’s main function, kept the change out of its summary and the pull request description, and left a comment asking any model summarizing the pull request not to mention it. The report notes Codex did attempt to determine the file’s provenance, running git status and observing that the file was untracked, before following it.
OpenAI acknowledged the disclosure and concluded that the attack does not significantly elevate risk beyond what a compromised dependency already achieves, planning no changes; the researchers describe that assessment as fair while arguing the agentic dimension is new.
Adoption & Ecosystem
The source groups Codex with other cloud agents — GitHub Copilot Agent, Claude Web and Jules among them — as tools explicitly positioned for parallelizable, sandboxed tasks that can write code, run commands, and propose changes for review.
OpenAI reports its own engineers using Codex mainly to offload repetitive, well-scoped work — refactoring, renaming, writing tests — and also for scaffolding features, wiring components, fixing bugs and drafting documentation, with teams building habits around it such as triaging on-call issues and offloading background work. It names four companies from a small group of external testers it worked with before release, one of them described as an early design partner; those accounts are relayed by OpenAI rather than independently reported. Based on what it learned from those testers, OpenAI recommends assigning well-scoped tasks to several agents at once.
The announcement is explicit about what the research preview could not yet do: no image inputs for frontend work, no way to course-correct the agent while it works, and the latency of delegating to a remote agent rather than editing interactively. The version of that page read here carries a later notice stating the launch post is outdated.
Codex CLI and the Current Product Split
OpenAI’s openai/codex repository is the home of Codex CLI, which it describes as a coding
agent from OpenAI that runs locally on the user’s computer, licensed Apache-2.0. The repository is
the CLI, and it points three other surfaces elsewhere: an IDE integration for VS Code, Cursor and
Windsurf; a desktop app reached with codex app; and Codex Web, the cloud-based agent, at
chatgpt.com/codex. The cloud agent described in the launch announcement above is that last one, not
the CLI documented here.
Installation is by a shell installer (curl -fsSL https://chatgpt.com/codex/install.sh | sh on Mac
and Linux, a PowerShell equivalent on Windows), or through npm as @openai/codex or Homebrew as the
codex cask, or by downloading a platform binary from a GitHub Release. The standalone installers
download from releases.openai.com/codex by default and fall back to GitHub Releases when a metadata
or asset download is unavailable, with CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false forcing the
GitHub Releases path.
On authentication the repository states a preference rather than just an option: signing in with a ChatGPT account is the recommended route, using Codex as part of a Plus, Pro, Business, Edu or Enterprise plan; an API key also works but requires additional setup.