OpenAI has launched a new AI coding agent named Codex CLI, designed to autonomously carry out programming tasks on a user’s terminal.
Codex CLI is said to be an open-source coding agent capable of reading, modifying, and running code locally on a user’s terminal. The Microsoft-backed AI startup announced the new AI-driven programming tool alongside its latest, most advanced AI reasoning models, o3 and o4-mini, on Wednesday, April 16.
“OpenAI Codex CLI is an open‑source, command‑line tool that brings the power of our latest reasoning models directly to your terminal,” the company said in a blog post. The coding agent integrates the company’s AI models with the client’s command-line interface (CLI) used to run programmes, manage files, and more.
Codex CLI is powered by OpenAI’s latest o4-mini model by default. However, users can choose their preferred AI from the company via the Responses API option. While the AI coding agent can run on macOS and Linux systems, OpenAI said that Windows support is still in the experimental stage and might require users to set up Windows Subsystem for Linux (WSL).
OpenAI’s Codex CLI is likely to square off with similar AI coding assistants developed by rivals such as Amazon-backed Anthropic and Cursor. The launch comes amid reports that OpenAI is looking to acquire AI coding startup WindSurf for $3 billion.
Codex CLI further moves OpenAI towards achieving its broader vision of agentic AI. Earlier this year, the company introduced its Operator tool that is meant to assist users in creating to-do lists and vacation planning by autonomously browsing the web and interacting with on-screen buttons, menus, and text fields.
Key features of Codex CLI
The AI coding agent is capable of processing multimodal inputs as user prompts. This includes text, screenshots, and diagrams that helps the agent generate or modify the code accordingly. “You can get the benefits of multimodal reasoning from the command line by passing screenshots or low fidelity sketches to the model, combined with access to your code locally,” OpenAI said.
Story continues below this ad
It also appears that users can choose how independently the AI coding agent should work with three distinct ‘approval modes’. In Suggest mode, Codex CLI can read files, suggest edits, and make changes to the code or execute commands pending approval from the user. This is meant for code reviews or learning a codebase.
In Auto Edit mode, the agent will read and modify files on its own. However, it will require user approval before running the code. This mode is most suitable for carrying out repetitive edits where users may still want to keep an eye on the process, as per OpenAI.
The third mode called Full Auto is longer tasks like fixing a broken build or prototyping features. In this case, Codex CLI can read, write, and execute commands autonomously inside a sandboxed, network‑disabled environment scoped to the current directory. “If using Full Auto mode, confirm that the sandbox has permission to access required directories,” OpenAI said.
Codex warns users before entering Auto Edit or Full Auto if code revision tracking is not enabled in the directory. To switch between approval modes, OpenAI said, “Start Codex with the appropriate flag (–suggest, –auto-edit, –full-auto) or use the in‑session shortcut /mode to toggle.”
Story continues below this ad
How to access Codex CLI?
Since it has been rolled out as an open-source AI tool, Codex CLI is freely available for download on GitHub. Follow the steps below to install Codex CLI on your terminal:
– Install npm install -g @openai/codex from GitHub
– Export your OpenAI API key (export OPENAI_API_KEY=”
– Type codex from your project root
– Run the coding agent in Suggest mode
– Ask for example: “Explain this repo to me”
– Switch modes by inputting codex –auto-edit and codex –full-auto
– Review outputs
In terms of privacy and security, OpenAI claimed that the source code of software developed by users will never leave their environment. “All file reads, writes, and command executions happen locally. Only your prompt, high‑level context, and optional diff summaries are sent to the model for generation,” the company said.
In order to facilitate greater use of Codex CLI among developers, OpenAI announced that it is giving away $1 million in API grants and $25,000 worth of API credits to eligible software development projects.
Average Rating