
Codex is an artificial intelligence agent from OpenAI that can analyze, write and modify code, run development tools and review changes through natural-language instructions. It can work with a project’s files and use the results of commands and tests to continue a task.
It goes beyond generating code snippets in a conversation: it combines an AI model with access to a working environment, instructions and tools. The available operations depend on the mode used and the configured permissions.
Table of contents
How Codex works
Codex receives a request and gathers the context needed to address it. It can inspect files, locate functions, examine dependencies and read project instructions before proposing or applying a change.
Work proceeds through a cycle of actions and checks. After editing code, it can run a test, interpret an error and make another adjustment. Tool results become part of the task’s context.
For example, when a form fails, it can locate its implementation, review field validation, modify it and run the related tests. The result may include the changed files, an explanation of the work and the checks performed.
Codex is not a single language model. The model interprets context and generates responses or tool requests; the agent coordinates those capabilities with the environment where the work takes place.
Ways to access Codex
Codex offers several ways to work across different environments:
- Codex CLI: a terminal interface for inspecting and modifying files, running commands and automating tasks.
- IDE extension: integrates interaction with Codex into a compatible development environment.
- Codex in the ChatGPT app: provides a graphical interface for managing conversations and coding work.
- Codex cloud: runs tasks in hosted environments associated with repositories and development configurations.
In local mode, tools can operate on the computer’s files and programs. This does not mean that the model also runs locally.
In Codex cloud, tasks have isolated environments with the required dependencies and configuration. They can continue in the background and produce changes that are subsequently reviewed or submitted through a pull request.
Project instructions and skills
Codex can use AGENTS.md files to understand a project’s conventions. These documents can describe its structure, test commands, development standards and the conditions to follow when modifying files.
Skills bring together reusable instructions for specific tasks. They are organized around a SKILL.md file and may include scripts, references or supporting resources. For example, a skill can describe the review procedure for a particular type of application.
The two mechanisms serve different purposes: AGENTS.md establishes environmental context and instructions; a skill describes a procedure used when relevant.
Plugins and MCP connections provide additional tools and integrations. Having instructions about a service does not itself grant access to its data: that access depends on the connection and its permissions.
Code review and automation
Codex can analyze changes to identify errors, regressions or discrepancies with project requirements. A review can focus on uncommitted changes, a commit or differences from a reference branch.
This function differs from editing: a review can produce findings without modifying files. It can also use the project’s commands and tests to check specific aspects of behavior.
The terminal interface supports interactive work and non-interactive execution through codex exec. The latter allows tasks to be incorporated into scripts and continuous integration processes.
Running tests provides evidence about the cases examined, but does not by itself demonstrate that an application is free of errors. Coverage depends on the requirements checked, the data used and the available environment.
Permissions and execution environments
The scope of Codex’s actions depends on the configured access to files, commands, the network and connected services. Isolation and approval controls determine which operations can run directly and which require intervention.
These controls differ from the instructions written in the project. An instruction in AGENTS.md guides the agent’s behavior; an environmental restriction technically limits the available operations.
Local tool execution and model processing are also distinct. Files can remain in a local repository while some of their content is used as context in requests to the AI service.
Relationship with AI-assisted programming
Codex is an AI-assisted programming tool, alongside agents such as Claude Code. These tools can participate in several stages of development: code exploration, implementation, testing, documentation and review.
Using it does not necessarily constitute vibe coding. A person can delegate code writing while maintaining a detailed review of the architecture and each modification. The difference lies in the degree of supervision, not simply in which tool generates the code.
