Learn Codex

Architectural Layers

Five orthogonal concerns that compose into a complete agent harness

L6 Codex in Depth

codex

s21codex

The Codex CLI Surface

One Binary, Many Doors

264 LOC1 tools

codex exec/resume/review/login/mcp and the /slash commands are one dispatch layer over the same harness.

s22codex

config.toml in Depth

Every Knob, One Resolver

256 LOC1 tools

model_providers, wire_api, sandbox_workspace_write, profiles and mcp_servers all resolve through one precedence chain.

s23codex

Review, CI & Cloud

The Harness Leaves Your Laptop

266 LOC2 tools

codex review, codex exec in CI, and Codex Cloud tasks are the same loop running unattended on real work.

s24codex

Plugins, Apps & Hooks

Extend Codex Beyond Skills and MCP

225 LOC7 tools

Plugins bundle skills/MCP/prompts into installable marketplaces, hooks run on lifecycle events, and codex mcp-server turns Codex itself into a tool.

s25codex

Tools Beyond the Shell

See, Search, and Drive a Browser

237 LOC5 tools

Codex's built-in tools go far past the shell — it can search the live web, read images, generate them, and operate a browser or desktop.

s26codex

Local Models & Custom Providers

Run Without OpenAI

185 LOC2 tools

The same harness points at a local Ollama/LM Studio model or a compatible gateway by swapping one provider and its wire_api.

s27codex

Codex as a Service & the Other Surfaces

One Engine, Many Frontends

267 LOC3 tools

One Codex engine serves the CLI, a desktop app, a VS Code extension, a remote app-server, and the hosted ChatGPT/GitHub integrations.

s28codex

Sessions, Sandbox & Safety in Depth

Fork, Trust, and the Full Safety Model

239 LOC0 tools

The full session lifecycle (resume/fork/archive) and the safety knobs that dial autonomy from read-only up to full bypass — gated by feature flags.