---
title: "OpenAI Codex: CLI and cloud coding agent, free tier and alternatives"
canonical_url: https://cookiesforai.app/coding-agents/codex
markdown: https://cookiesforai.app/coding-agents/codex.md
publisher: "CookiesForAI"
last_updated: 2026-10-17T01:12:15+02:00
facts_checked: 2026-11-10
type: tool
summary: "OpenAI Codex is a coding agent by OpenAI that runs as an open source CLI on your machine and as a cloud agent in ChatGPT, editing code, running commands and opening pull requests."
related:
  - "https://cookiesforai.app/coding-agents/claude-code"
  - "https://cookiesforai.app/coding-agents/gemini-cli"
  - "https://cookiesforai.app/coding-agents/github-copilot"
  - "https://cookiesforai.app/coding-agents/cursor"
  - "https://cookiesforai.app/coding-agents/devin"
---

> Full index of this site: https://cookiesforai.app/llms.txt  
> Checked by CookiesForAI on 10 NOV 2026: repository facts (stars, last push, archived) re-read from GitHub.

# OpenAI Codex

OpenAI Codex is a coding agent by OpenAI that runs as an open source CLI on your machine and as a cloud agent in ChatGPT, editing code, running commands and opening pull requests.

## Facts

| Fact | Value |
|---|---|
| Made by | [OpenAI](https://openai.com) |
| Type | Terminal coding agent |
| License | Apache-2.0 |
| Source | https://github.com/openai/codex |
| GitHub stars | 134,664 on 10 NOV 2026 |
| Runs on | macOS, Windows, Linux, VS Code, Cursor, Windsurf, JetBrains, Xcode, Web, Desktop app, iOS |
| Free tier | Free plan |
| Website | https://learn.chatgpt.com/docs |
| Page updated | 17 OCT 2026 |
| Facts checked | 10 NOV 2026 ([how](https://cookiesforai.app/method)) |

## What it does

OpenAI Codex is one product with two halves. The Codex CLI is an open source agent (Apache-2.0) that runs in your terminal, reads and edits files, and runs commands inside a sandbox. Codex cloud runs tasks in isolated cloud environments from ChatGPT on the web, the desktop app or mobile, and can open pull requests on GitHub. Both use the same account and share usage.

OpenAI Codex also ships as an IDE extension for VS Code, Cursor, Windsurf, JetBrains IDEs and Xcode, and inside the ChatGPT desktop app for macOS and Windows, with Linux in preview. For automation, codex exec runs it from scripts and CI, and there is a Codex SDK and a GitHub Action.

OpenAI Codex can be extended with subagents, hooks (PreToolUse, PostToolUse, SessionStart, Stop and others), skills and MCP servers. Besides ChatGPT sign-in, the CLI accepts an API key, and its --oss flag runs a local open source model through LM Studio or Ollama.

## Who it is for

- People who already pay for ChatGPT and want a coding agent on the same plan
- Developers who want to hand off tasks to a cloud agent and review the pull request later
- Teams that run an agent in CI with codex exec and an API key
- Developers who want an open source CLI they can read and modify

## Who should pick something else

- Anyone who wants the full CLI on a free plan: OpenAI's pricing page names the CLI and IDE extension from the Plus plan up
- Teams that need cloud features with an API key only: the API key route has no GitHub code review or Slack
- Developers who mainly want models from vendors other than OpenAI; OpenCode, Cline or Cursor offer more providers

Strength: OpenAI Codex covers both local and cloud work: the same account drives an open source CLI with 127,502 GitHub stars (01 OCT 2026), IDE extensions for five editor families, and cloud tasks that open pull requests.

Limit: OpenAI Codex usage is capped per five-hour window and per week on Plus and Business, and ChatGPT and Codex share one usage pool, so heavy chat use leaves less for coding.

## What it costs

Free tier: Free plan. ChatGPT's Free plan lists Codex in the desktop app for quick tasks; the CLI, IDE extension and cloud features come with paid ChatGPT plans, or with an API key billed per use.

Prices as OpenAI showed them on 16 OCT 2026:

| Plan | Price |
|---|---|
| Free | $0 /month |
| Go | $8 /month |
| Plus | $20 /month |
| Pro | From $100 /month |
| Business | $25 per user per month when billed monthly |

Current prices: https://learn.chatgpt.com/docs/pricing. Prices change, so check the maker's own page before you buy.

## Agent skills and MCP

Skills: Codex supports Agent Skills natively and says they build on the open agent skills standard. It reads repo skills from .agents/skills (in the current folder, its parent and the repo root), user skills from ~/.agents/skills, admin skills from /etc/codex/skills, plus skills bundled with Codex. Skills arrived on 19 DEC 2025, and custom prompts were deprecated in favour of skills on 22 JAN 2026. The open skills CLI installs into the same .agents/skills folder.

MCP: Codex adds MCP servers with a command: codex mcp add \<name\> -- \<command\> for a local server, for example codex mcp add context7 -- npx -y @upstash/context7-mcp, or codex mcp add \<name\> --url \<url\> for a remote one. Servers are stored as [mcp_servers.\<name\>] tables in ~/.codex/config.toml or a project .codex/config.toml. In the IDE extension, use the gear menu, then MCP servers, then Add server.

Browse all [agent skills](https://cookiesforai.app/skills) and [MCP servers](https://cookiesforai.app/mcp) in the directory.

We also list this company's other pages: [3 skills by OpenAI](https://cookiesforai.app/skills/openai).

## Questions people ask

### Is OpenAI Codex free?

Partly. The Codex CLI is open source under Apache-2.0, and you can run it with your own API key (pay per use) or a local model via --oss. ChatGPT's Free plan lists Codex in the desktop app for quick tasks, subject to rollout; the CLI, IDE extension and cloud features are listed from the paid Plus plan up, read on 01 OCT 2026.

### Does Codex support agent skills and MCP?

Yes. Codex reads Agent Skills from .agents/skills in the repo and ~/.agents/skills for the user, supported since 19 DEC 2025. MCP servers are added with codex mcp add and stored in ~/.codex/config.toml.

## Alternatives to OpenAI Codex

- [Claude Code](https://cookiesforai.app/coding-agents/claude-code): Claude Code is a terminal coding agent by Anthropic that reads a codebase, edits files and runs commands, and also works in VS Code, JetBrains, a desktop app and the web.
- [Gemini CLI](https://cookiesforai.app/coding-agents/gemini-cli): Gemini CLI is an open source terminal coding agent by Google that runs Gemini models from the command line, with MCP, agent skills, subagents and hooks, under the Apache-2.0 license.
- [GitHub Copilot](https://cookiesforai.app/coding-agents/github-copilot): GitHub Copilot is an AI coding assistant by GitHub that works in VS Code, JetBrains and other editors, in a CLI, and as a cloud agent that opens pull requests on GitHub.
- [Cursor](https://cookiesforai.app/coding-agents/cursor): Cursor is an AI code editor by Anysphere that pairs a desktop editor with an agent, a CLI and cloud agents, using models from several vendors plus its own Composer models.
- [Devin](https://cookiesforai.app/coding-agents/devin): Devin is a cloud coding agent by Cognition that works in its own virtual machines, takes tasks from Slack, GitHub, Linear or Jira, and also ships as a CLI and the Devin Desktop editor.

## Compare coding agents

| Tool | Type | Runs on | Free tier |
|---|---|---|---|
| OpenAI Codex | Terminal coding agent | macOS · Windows · Linux · VS Code · Cursor · Windsurf · JetBrains · Xcode · Web · Desktop app · iOS | Free plan |
| [Aider](https://cookiesforai.app/coding-agents/aider) | Terminal coding agent | macOS · Windows · Linux · Docker | Free |
| [Amp](https://cookiesforai.app/coding-agents/amp) | Terminal coding agent | macOS · Linux · Windows (WSL) · Web · macOS app · iOS · Slack | Free plan |
| [Claude Code](https://cookiesforai.app/coding-agents/claude-code) | Terminal coding agent | macOS · Windows · Linux · VS Code · JetBrains · Desktop app · Web · iOS · Android | Paid only |
| [Cline](https://cookiesforai.app/coding-agents/cline) | Editor extension | VS Code · Cursor · Windsurf · VSCodium · Antigravity · JetBrains · CLI · Desktop app (macOS, Windows) | Free plan |

[Compare all 20 →](https://cookiesforai.app/coding-agents)

## More in Coding agents

- [Aider](https://cookiesforai.app/coding-agents/aider): Aider is an open source terminal coding agent from the Aider-AI project that edits files in your git repo with the model of your choice and commits each change automatically.
- [Amp](https://cookiesforai.app/coding-agents/amp): Amp is a coding agent by Amp Frontier Corporation, spun out of Sourcegraph, that runs in a terminal CLI, a web app and macOS and iOS apps, with per-thread cloud machines.
- [Claude Code](https://cookiesforai.app/coding-agents/claude-code): Claude Code is a terminal coding agent by Anthropic that reads a codebase, edits files and runs commands, and also works in VS Code, JetBrains, a desktop app and the web.
- [Cline](https://cookiesforai.app/coding-agents/cline): Cline is an open source coding agent by Cline Bot Inc. that runs as a VS Code or JetBrains extension and a CLI, using your own model keys or local models.
- [Continue](https://cookiesforai.app/coding-agents/continue): Continue is an open source coding agent for VS Code, JetBrains and the terminal by Continue Dev, Inc., which Cursor acquired; its GitHub repo is now read-only and no longer maintained.
- [Cursor](https://cookiesforai.app/coding-agents/cursor): Cursor is an AI code editor by Anysphere that pairs a desktop editor with an agent, a CLI and cloud agents, using models from several vendors plus its own Composer models.
- [Devin](https://cookiesforai.app/coding-agents/devin): Devin is a cloud coding agent by Cognition that works in its own virtual machines, takes tasks from Slack, GitHub, Linear or Jira, and also ships as a CLI and the Devin Desktop editor.
- [Gemini CLI](https://cookiesforai.app/coding-agents/gemini-cli): Gemini CLI is an open source terminal coding agent by Google that runs Gemini models from the command line, with MCP, agent skills, subagents and hooks, under the Apache-2.0 license.
- [GitHub Copilot](https://cookiesforai.app/coding-agents/github-copilot): GitHub Copilot is an AI coding assistant by GitHub that works in VS Code, JetBrains and other editors, in a CLI, and as a cloud agent that opens pull requests on GitHub.
- [Google Antigravity](https://cookiesforai.app/coding-agents/antigravity): Google Antigravity is an agentic development platform by Google that runs coding agents in a desktop command center, a standalone IDE, a CLI called agy and extensions for other editors.
- [Goose](https://cookiesforai.app/coding-agents/goose): Goose is an open source AI agent, created by Block and now part of the Agentic AI Foundation at the Linux Foundation, that runs as a desktop app and CLI with any model provider.
- [Hermes Agent](https://cookiesforai.app/coding-agents/hermes-agent): Hermes Agent is an open source personal AI agent by Nous Research that runs in the terminal, a desktop app and messaging apps, and writes new skills for itself from completed tasks.
- [Junie](https://cookiesforai.app/coding-agents/junie): Junie is a coding agent by JetBrains that runs as a CLI on macOS, Windows and Linux, inside JetBrains IDEs and in GitHub or GitLab pipelines, with any model you choose.
- [Kilo Code](https://cookiesforai.app/coding-agents/kilo-code): Kilo Code is an open source coding agent by Kilo Code, Inc., acquired by Anaconda in 2026, that runs in VS Code, JetBrains IDEs, a CLI and cloud agents with 500+ models.
- [OpenClaw](https://cookiesforai.app/coding-agents/openclaw): OpenClaw is an open source personal AI agent from the OpenClaw Foundation that runs on your own machine and takes tasks from WhatsApp, Telegram, Slack, Discord and other chat apps.
- [OpenCode](https://cookiesforai.app/coding-agents/opencode): OpenCode is an open source terminal coding agent by Anomaly that works with 75+ model providers, local models included, and also ships as a desktop app and IDE extension.
- [Roo Code](https://cookiesforai.app/coding-agents/roo-code): Roo Code was an open source coding agent extension for VS Code by Roo Code, Inc.; the extension was shut down on 15 MAY 2026 and its GitHub repository is archived.
- [Windsurf (now Devin Desktop)](https://cookiesforai.app/coding-agents/windsurf): Windsurf is an AI code editor by Cognition, renamed Devin Desktop on 02 JUN 2026, that pairs a desktop editor and Tab completions with a local agent and handoff to Devin's cloud agents.
- [Zed](https://cookiesforai.app/coding-agents/zed): Zed is an open source code editor by Zed Industries, written in Rust, with a built-in AI agent, edit predictions, external agents over ACP and real-time collaboration.
