Learning Path
s01 to s20: Progressive Agent Harness Design
Layer Legend
The Agent LoopOne Loop Is All You Need
“The smallest useful agent is a loop that calls the model, runs tools, and feeds results back.”
Learn MoreTool UseStructured Tools, Not Just a Shell
“The loop stays stable while capabilities register into a dispatch table.”
Learn MoreApproval & PermissionsAsk Before You Act
“Codex's approval modes (untrusted / on-failure / on-request / never) are a harness decision point before the shell runs.”
Learn MoreSandboxRun It, But Contain It
“read-only / workspace-write / danger-full-access, backed by OS isolation, decides what a command can actually touch.”
Learn MoreThe Plan ToolAn Agent Without a Plan Drifts
“Explicit plans keep long-running work visible and correctable — Codex exposes this as the update_plan tool.”
Learn MoreSubagentsDelegate With a Clean Context
“Subagents give each subtask a clean message history while preserving the main thread.”
Learn MoreSkillsLoad Expertise Only When Needed
“Codex skills inject specialized instructions only when the task actually needs them.”
Learn MoreContext CompactionContext Will Fill Up
“Compaction keeps the conversation usable when the context window gets crowded.”
Learn MoreMemory & SessionsDon't Lose the Details
“Session rollouts let codex resume survive restarts; some facts should outlive summarization.”
Learn MoreInstructions & AGENTS.mdAssembled at Runtime, Never Hardcoded
“The system prompt is a generated product of AGENTS.md, config.toml, profiles and built-ins.”
Learn MoreError RecoveryErrors Are the Start of a Retry
“A robust harness classifies failures (rate limit, overflow, abort) and decides what kind of retry is worthwhile.”
Learn MoreTask SystemBreak Big Goals Into Small Tasks
“A task graph turns vague goals into ordered, observable work.”
Learn MoreBackground TasksSlow Work Goes to the Background
“The agent keeps reasoning while slow commands finish elsewhere — codex exec taken further.”
Learn MoreAutomationsWork on a Schedule
“Recurring work should be created by the harness, not remembered by the model.”
Learn MoreAgent TeamsOne Agent Isn't Enough, Form a Team
“Persistent teammates let work continue in parallel without stuffing every thought into one context.”
Learn MoreTeam ProtocolsTeammates Need Agreements
“Multi-agent systems need explicit message contracts, not vibes.”
Learn MoreAutonomous AgentsCheck the Board, Claim the Task
“Teammates become useful when they can discover and claim work themselves.”
Learn MoreWorktree IsolationSeparate Directories, No Conflicts
“Parallel agents need isolated filesystems as much as isolated conversations — the model Codex Cloud runs on.”
Learn MoreMCP ServersExternal Tools, Standard Protocol
“External services become agent tools through a standard discovery and call protocol configured in config.toml.”
Learn MoreThe Full HarnessAll Mechanisms, One Loop
“The final harness is still one loop, now surrounded by the systems that make it production-shaped.”
Learn MoreThe Codex CLI SurfaceOne Binary, Many Doors
“codex exec/resume/review/login/mcp and the /slash commands are one dispatch layer over the same harness.”
Learn Moreconfig.toml in DepthEvery Knob, One Resolver
“model_providers, wire_api, sandbox_workspace_write, profiles and mcp_servers all resolve through one precedence chain.”
Learn MoreReview, CI & CloudThe Harness Leaves Your Laptop
“codex review, codex exec in CI, and Codex Cloud tasks are the same loop running unattended on real work.”
Learn MorePlugins, Apps & HooksExtend Codex Beyond Skills and MCP
“Plugins bundle skills/MCP/prompts into installable marketplaces, hooks run on lifecycle events, and codex mcp-server turns Codex itself into a tool.”
Learn MoreTools Beyond the ShellSee, Search, and Drive a Browser
“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.”
Learn MoreLocal Models & Custom ProvidersRun Without OpenAI
“The same harness points at a local Ollama/LM Studio model or a compatible gateway by swapping one provider and its wire_api.”
Learn MoreCodex as a Service & the Other SurfacesOne Engine, Many Frontends
“One Codex engine serves the CLI, a desktop app, a VS Code extension, a remote app-server, and the hosted ChatGPT/GitHub integrations.”
Learn MoreSessions, Sandbox & Safety in DepthFork, Trust, and the Full Safety Model
“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.”
Learn More