Master Codex, OpenAI's agentic coding system.
7 modules · 31 lessons · 6 hours. Start at the top, or jump to what you need.
Your progress
Loading your progress…
Start the course
What Codex Is (and Isn't)
Getting Started with Codex
Build the right mental model: OpenAI Codex in 2026 is an agentic software-engineering system, not the deprecated 2021 code model and not autocomplete. Tour the family of surfaces that share one account (CLI, IDE, cloud, desktop, mobile, GitHub, SDK), install the Rust CLI on every platform and package manager, authenticate with ChatGPT or an API key, and understand the plans, the 5-hour usage window, and credits. End able to launch a first session and steer it.
What Codex Is (and Isn't)
An agentic coding system, three eras of one name
13 minOne Codex, Many Surfaces
CLI, IDE, cloud, desktop, mobile, GitHub, SDK
12 minInstalling the Codex CLI
npm, Homebrew cask, install scripts, and binaries on every OS
12 minAuthentication, Plans & Usage
Sign in with ChatGPT or an API key, and how billing works
13 minYour First Session
Launch, watch the loop, steer, and recover
11 minThe Core Interactive Workflow
Master the day-to-day muscle memory of the Codex CLI: the inspect-propose-approve agent loop, the four-element prompt, plan mode and goals, @-file mentions and images, the slash-command surface, interrupting and editing, queuing follow-ups, reviewing changes with /diff and /review, and resuming/forking sessions. This is the productive core every other module builds on.
The Agent Loop & the Four-Element Prompt
How Codex thinks, and how to brief it well
13 minPlan Mode & Goals
Separate research from execution for multi-step work
11 minSlash Commands, @-Mentions & Images
Driving the composer fluently
12 minReviewing & Verifying Changes
/diff, /review, and trusting the transcript
10 minSessions, Resume & Forking
Continue, branch, and recover long-running work
11 minControl & Context: Approvals, Sandboxing, AGENTS.md & Config
The two pillars that make Codex safe and effective. First, the independent controls of approvals (when Codex asks) and sandboxing (where it can act), the UI presets, network rules, and OS enforcement. Then context engineering: the AGENTS.md standard with its discovery/merge algorithm, the config.toml hierarchy with precedence and profiles, models and reasoning effort, and compaction for long-horizon runs.
Approvals & Sandboxing
When Codex asks vs where it can act — two separate controls
14 minWidening & Bypassing Access Safely
/permissions, --add-dir, profiles, and the --yolo warning
11 minAGENTS.md: Project Context for Agents
The open standard, discovery, and the merge algorithm
13 minconfig.toml, Precedence & Profiles
Tuning Codex with layered configuration
13 minModels, Reasoning Effort & Compaction
Picking the right brain and managing long-horizon context
14 minExtending Codex: MCP, Skills & Tools
Move from operator to power user. Configure Codex as an MCP client over stdio and streamable HTTP, gate tools and authenticate remote servers, and run Codex itself AS an MCP server so other agents can call it. Learn when to reach for MCP versus skills versus automations, and how the codex/codex-reply tool schema lets you embed Codex in larger agent systems.
Cloud, IDE & GitHub Collaboration
Codex is one product across local and cloud. Delegate background and parallel tasks to isolated cloud sandboxes, configure environments and internet access, and bring diffs back locally. Drive Codex from the IDE extension with its three modes and cloud hand-off, and wire up automated GitHub code review that follows your AGENTS.md review guidelines and flags only P0/P1 issues.
Delegating to Codex Cloud
Background, parallel tasks in isolated sandboxes
13 minCloud Environments & Internet Access
Base images, setup scripts, secrets, and network policy
12 minThe IDE Extension
Codex in VS Code, Cursor, Windsurf & JetBrains
12 minAutomated GitHub Code Review
@codex review, P0/P1 findings, and review guidelines
12 minHeadless Automation, CI & the Codex SDK
Take Codex to production and pipelines. Run one-shot tasks with codex exec, capture the final message or a JSON event stream, force structured output against a schema, and pipe data in and out. Authenticate safely in CI, use the official GitHub Action with its safety strategies, and embed the agent with the TypeScript and Python SDKs — including the auto-fix-CI pattern.
Headless Runs with codex exec
One-shot tasks for scripts, cron, and pipelines
14 minJSON Events & Structured Output
Parsing what Codex did and forcing schema-conforming results
12 minCI Auth & the GitHub Action
Running Codex safely in pipelines
13 minEmbedding Codex with the SDK
TypeScript and Python SDKs for custom automations
13 minCheat Sheets, Shortcuts & Power Tips
A dedicated quick-reference module: the complete CLI flags and subcommands cheat sheet, the full slash-commands and keyboard-shortcuts cheat sheet, a curated best-practices and pitfalls playbook, the security and prompt-injection field guide, and a troubleshooting/diagnostics reference built around codex doctor, logs, and recovery patterns. Built to be skimmed, bookmarked, and returned to.
Cheat Sheet: CLI Flags & Subcommands
Every command-line option in one scannable place
11 minCheat Sheet: Slash Commands & Shortcuts
The full in-session command and keyboard reference
11 minBest Practices & Common Pitfalls
What separates productive Codex users from frustrated ones
12 minSecurity & Prompt-Injection Field Guide
Sandboxing as defense, secrets hygiene, and untrusted content
12 minTroubleshooting & Diagnostics
codex doctor, logs, sandbox failures, and recovery
11 min