Skip to content

Codex

📖 4 min read openaicodexcodingagenticmcp
Complete guide to OpenAI Codex — the agentic coding platform across Desktop, IDE, CLI, Web, and CI/CD. Setup, workflows, AGENTS.md, Skills, MCP, Hooks, Computer Use, and comparison with Cursor/Claude Code.
Key Takeaways
  • Codex runs on 7 surfaces: Desktop app, IDE extension, CLI, Web (cloud), Chrome extension, GitHub Action, and Codex SDK
  • AGENTS.md = OpenAI's equivalent of CLAUDE.md. Skills = same SKILL.md standard as Anthropic. MCP = same open protocol
  • Codex supports Subagents, Automations (scheduled tasks), Worktrees (parallel branches), and Computer Use
  • Integrates with GitHub, Slack, Linear for end-to-end developer workflows

Codex is OpenAI’s agentic coding platform. It reads your entire codebase, edits files across multiple files, runs terminal commands, and integrates with your development workflow — from Desktop to CI/CD.

Installation — 7 Surfaces

SurfaceBest ForKey Feature
Desktop AppVisual workflow, multi-sessionComputer Use, Appshots, Automations, Worktrees
IDE ExtensionVS Code integrationInline diffs, slash commands, @-mentions
CLITerminal-first, scriptingcodex "prompt" for quick tasks, non-interactive mode
Web (Cloud)No setup, browserCloud environments, internet access
Chrome ExtensionBrowser-based actionsWeb automation, scraping, testing
GitHub ActionCI/CD automationAutomated PR review, issue triage
Codex SDKBuild custom agentsFull programmatic control
Terminal window
# Install Codex CLI
pip install openai-codex
# Start in any project
cd your-project
codex
# Non-interactive mode for CI/CD
codex --non-interactive "review this PR for security issues"

Core Capabilities

AGENTS.md — Project Instructions

Like Anthropic’s CLAUDE.md, Codex reads AGENTS.md from your project root at session start:

AGENTS.md
## Code Style
- Use TypeScript strict mode
- Prefer functional patterns over classes
- Tests colocated with source in __tests__/
## Architecture
- API routes in src/api/
- Business logic in src/services/
- Database queries in src/db/

Skills — Same SKILL.md Standard

Terminal window
# Project skills
.codex/skills/
generate-migration/
SKILL.md
review-pr/
SKILL.md

Codex supports the same SKILL.md open standard as Claude Code. Skills are portable across 32+ tools. See Agent Skills for details.

MCP — Model Context Protocol

.codex/mcp.json
{
"mcpServers": {
"github": {
"command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"]
},
"slack": {
"command": "npx", "args": ["-y", "@modelcontextprotocol/server-slack"]
}
}
}

See MCP & Integrations for the full guide.

Hooks

.codex/config.json
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{"type": "command", "command": "prettier --write ${CODEX_TOOL_INPUT_FILE}"}]
}],
"PreToolUse": [{
"matcher": "Bash(git commit*)",
"hooks": [{"type": "command", "command": "npm run lint && npm test"}]
}]
}
}

Subagents — Parallel Task Execution

Terminal window
codex "audit all services for vulnerabilities, checking each in parallel with subagents"

A lead agent coordinates, assigns subtasks, and merges results. See the Agents SDK for building custom subagent architectures.

Computer Use

Codex can control your browser and desktop applications — navigate websites, fill forms, test UIs:

Terminal window
codex "go to github.com/trending, find the top Python repo, clone it, and analyze the codebase for security issues"

Available on Desktop, CLI, and Web surfaces.

Automations & Worktrees

  • Automations: Scheduled tasks that run on your machine or in the cloud — morning PR reviews, nightly dependency audits
  • Worktrees: Parallel git branches that Codex works on simultaneously — isolate experiments without cluttering your workspace

Codex vs Cursor vs Claude Code

FeatureCodexCursorClaude Code
Primary interfaceDesktop app + IDE + CLI + WebIDE fork (VSCode-based)Terminal CLI + IDE + Desktop
ModelsGPT-5.5 / 5.4 / 5.4 miniClaude Sonnet + GPTClaude Opus 4.7 / Sonnet 4.6
Project instructionsAGENTS.md.cursorrulesCLAUDE.md
Skills standardSKILL.md (same as Claude)SKILL.mdSKILL.md
MCP supportYes (same protocol)YesYes
Computer UseYes (Desktop, CLI, Web)NoCowork (research preview)
SubagentsYesNoYes
Scheduled tasksAutomationsNoRoutines
CI/CDGitHub Action, Codex SDKNoneGitHub Actions
PricingChatGPT Plus/Pro or API tokens$20-40/moPro/Max or API tokens
Unique strengthsGPT-5.5 reasoning, 7 surfaces, computer use, Commerce/Ads platformLargest IDE market shareBest reasoning, 1M context, Agent Skills pioneer

Integrations

IntegrationWhat It Does
GitHubAuto PR review, issue triage, repo management
Slack@Codex mention — bug reports become PRs
LinearIssue → code fix pipeline

Pricing

PlanWhat You Get
ChatGPT Plus ($20/mo)Codex access on 1 surface
ChatGPT Pro ($200/mo)Codex across all surfaces, extended usage
API (Platform)Pay-per-token via platform.openai.com
EnterpriseCustom plans, admin controls, SSO