Codex CLI
OpenAI's Terminal Coding Agent
Open-source AI coding tool built with Rust, supporting current models like gpt-5.6-sol (verified 2026-09-19), local execution and MCP integration
Updated 2026-09-21
What Is Codex CLI
Codex CLI is OpenAI's open-source terminal coding agent. It runs on your own machine, reads your code, edits files and executes commands. Written in Rust, installed globally with npm, and it works inside your project directory once you sign in (official repository checked 2026-09-21).
You steer a session with slash commands: /model sets the model and reasoning effort, /permissions decides what it may do, /init writes an AGENTS.md for the repo, /review checks your changes (command names taken from the official CLI docs snapshot archived 2026-08-24).
By 2026 it is no longer terminal-only: the official repository also links the IDE extension, the desktop app and the cloud-based Codex, and the whole repo is open under the Apache-2.0 license (checked 2026-09-21).
Check the dates first
Model names, install steps and the feature list here were checked on 2026-09-21 against the official repository and an archived CLI docs snapshot. Upstream ships fast, so re-read the official page before you rely on it.
Installation Guide
Step 1: Install
Install globally via npm: npm i -g @openai/codex
npm install -g @openai/codex
Step 2: Authenticate
Log in with ChatGPT account or API key
export OPENAI_API_KEY=sk-...
Step 3: Launch
Run the codex command in your project directory
codex "explain this project"
Step 4: Select Model
Use /model to switch among current models (e.g. gpt-6-sol)
Key Features
Sessions and images
Reopen a recent chat from this repository, dig through older local sessions, or paste a screenshot into the prompt.
MCP tool access
Add local or remote MCP servers, check which tools the session can reach, then let Codex use them.
Live web search
Switch to live web search when a task depends on fresh releases, docs or external behavior; the search stays in the transcript.
Project instructions
Run /init to generate an AGENTS.md, then keep build commands and code conventions there for later sessions.
Sandbox and approvals
Decide when it may edit files or run commands without asking, and inspect the active sandbox and writable roots first.
Non-interactive mode
Non-interactive commands fit repeatable workflows, so you can wire them into scripts and pipelines.
Codex CLI vs Claude Code
How the two terminal coding agents differ, row by row (checked 2026-09-21).
| Dimension | Codex CLI | Claude Code |
|---|---|---|
| Architecture | Rust, runs locally | Terminal, IDE, desktop, web |
| Model | Model set via /model | Alias or full model name |
| Context | Follows model and effort | Extended context, auto-compact |
| Pricing | Part of ChatGPT plans | Subscription or token billing |
| Execution | Local terminal plus sandbox | Reads, edits, runs commands |
| Agent features | Delegates to sub-agents | Sub-agents and agent teams |
| Voice mode | Not verified | Built-in /voice dictation |
| Open source | Open source, Apache-2.0 | Under Anthropic terms of service |
Codex CLI leans on open source and local runs, Claude Code on more clients and parallel agents; the real gap is collaboration.
Use AI Coding Tools via QCode.cc
On-sale ids like gpt-5.6-sol and claude-opus-5 share one API key.
Both ids come from the models page we checked on 2026-09-21.
Released models share one key
On-sale (released) models share one key, switching means editing a name; announced or rumored ids may not answer yet.
Switching is a config edit, not a code change
Switch between gpt-5.6-sol and claude-opus-5 on one account; the models page sets the parameters.
Billed per token, rates on the pricing page
Use the pricing page for the billing model and rates; this page quotes no figures.
One model catalog
On-sale ids sit on one models page, gpt-5.6-sol and claude-opus-5 included; confirm it is still listed before you buy.
Practical tips
Start read-only, run one pass, then allow edits. Keep build commands and conventions in AGENTS.md, and run /review before you commit.
Where it fits
Reworking existing repos
For renames at scale, dependency bumps and test backfill: let it read the layout, propose a plan, then approve each step.
Repeatable pipeline steps
Non-interactive runs fit scripts and pipelines: produce change summaries, run routine checks, replay the same steps.
Checking external behavior
When the answer depends on current version numbers or third-party APIs, live search beats an answer from stale memory.
Codex Ecosystem Expansion
From CLI tool to super app — the OpenAI Codex ecosystem received a comprehensive upgrade in 2026.
Codex Desktop App
Native desktop app for macOS and Windows, supporting parallel management of multiple Agent instances without terminal.
- macOS + Windows dual platform
- Parallel management of multiple Agent instances
- Visual task queue and execution status
ChatGPT Super App Merge
On April 6, 2026, ChatGPT, Codex CLI, and Atlas browser merged into the ChatGPT Super App.
- Unified: Chat + Code + Browse
- Cross-modal task orchestration
- Plugin ecosystem fully open
Latest Model Lineup
GPT-5.3-Codex-Spark
Coding-specialized, highest SWE-bench score
GPT-5.4
Flagship model with Codex coding capabilities
GPT-5.5
Dedicated model for Super App multimodal tasks
Latest 2026 guides
Orchestrate hundreds of subagents — triggers, /deep-research, limits, and cost.
GPT-5.5 in Codex & Goal ModeOpenAI's strongest agentic coding model, plus Goal Mode and May 2026 Codex features.
ultracode & Effort ControlsClaude Code effort levels — high, xhigh, max — and what ultracode adds.
Start Using AI Coding Tools
Once connected, run the same task on two models and see which one you keep.
2026 Q1-Q2 Major Updates
GPT-5.3-Codex (2026-02-05) became the most capable agentic backend for Codex — SOTA on SWE-Bench Pro / Terminal-Bench / OSWorld / GDPval, 25% faster than 5.2-Codex, with real-time steering. Codex CLI itself added Amazon Bedrock backend support, enhanced /mcp diagnostics (status, timeouts, auth-error breakdown), persisted /goal workflows, and MultiAgentV2 multi-agent coordination. China users access GPT-5.5 / Codex via the QCode gateway with shared subscriptions.
Read the GPT-5.3-Codex complete guideCreate a QCode account
Plans from ¥60 / $8.57. One key across Claude, GPT, and Gemini models.