IR4 Leaders

OpenAI product dossier 062

Codex: Agent Architecture, Tools and Product System

How models, the agent loop, local and cloud environments, repository context, tools, permissions, skills, plugins, MCP, subagents, worktrees, automation and developer interfaces fit together.

· verified

Part I — System analysis. Sections 01–14 explain what Codex is, where it runs, how the agent loop produces and verifies changes, and where authority and trust boundaries sit. The exhaustive command inventory is deliberately separated into Part II.
01

Codex in one minute

Codex is OpenAI's software-engineering agent system: a model-directed runtime that can inspect a workspace, plan work, call tools, edit files, run commands, verify results and return reviewable evidence. It is delivered through the ChatGPT desktop app, command-line interface, IDE extension, web and cloud execution, Remote and automation interfaces.

Codex is not one model, one application or a synonym for the OpenAI API. The selected model supplies reasoning; the agent harness manages the conversation and tool loop; the environment holds code and processes; the sandbox constrains execution; approvals govern boundary crossings; skills, plugins and MCP extend behaviour and reach.

Original Codex modelAug 2021API model trained for code
Cloud coding agentMay 2025Delegated repository tasks
Current product surfaces6Desktop, Remote, web, CLI, IDE, cloud
Execution choicesLocal + cloudPolicy and environment differ
Canonical formula. Codex = selected OpenAI model + agent runtime + context + tools + execution environment + controls + integrations + product interface. Codex product capability ≠ underlying model capability. A model upgrade changes reasoning capability; it does not by itself change the permissions, repository, network or verification boundary.

Essential questions

QuestionConcise answer
Is Codex a model, an application or an agent system?Today it is an agent system delivered through several applications and developer interfaces. It uses models from the Codex catalogue, but the harness, tools, policies and environments are separate system layers.
Which model does Codex use?The active catalogue and account determine the choices. The user can select a model and, where supported, reasoning effort and service tier. Product behaviour must therefore not be inferred from a model name alone.
Where does code execute?Local sessions run tools on the user's machine inside the configured sandbox. Cloud tasks run in an isolated hosted environment. Remote steers a Codex session from another interface; it does not make every local process a cloud process.
What can Codex access?Only what the current surface, workspace, filesystem roots, network policy, credentials and connected tools expose. Model intent is not execution authority.
What is the difference between sandboxing and approvals?The sandbox is the technical boundary around commands and filesystem or network access. The approval policy decides when Codex must stop and request permission to cross that boundary.
What is AGENTS.md?A repository instruction file whose scoped content is supplied to Codex. It can define project conventions and commands, but it cannot grant operating-system access or override higher-priority policy.
How do skills, plugins and MCP differ?A skill packages task-specific instructions and resources. A plugin packages one or more extension assets for installation and distribution. MCP is a protocol for exposing tools and data. They may be combined, but they are not interchangeable.
What are subagents and worktrees?A subagent is a delegated reasoning context; a worktree is an isolated Git checkout. Subagents divide cognitive work, while worktrees reduce file and branch collisions.
What is Codex cloud?A hosted execution path that checks out a repository into an isolated environment, runs the agent and returns logs, changes and results for review. Its credentials and network policy are configured separately from a local machine.
What is the Codex SDK?A programmatic interface for embedding Codex workflows. App Server exposes the harness to rich clients; MCP Server lets another MCP client call Codex; non-interactive mode supports scripts and CI.
Does Codex have Claude Code-style slash commands?Yes. The CLI and desktop app expose native / commands, but their sets differ. CLI subcommands and keyboard controls are separate control surfaces; Appendix 16 records all three without treating them as synonyms.
Can Codex work in parallel?Yes, through separate tasks, subagents, cloud attempts and worktrees. Parallelism increases throughput only when responsibilities, dependencies and file ownership are divided clearly.
Can Codex operate autonomously?It can complete long multi-step work, but autonomy remains bounded by instructions, tool availability, sandboxing, approvals, credentials, time, context and verification. Human review remains important for consequential changes.
What are the principal enterprise risks?Untrusted instructions, excessive credentials, unsafe commands, data leakage, compromised extensions, weak review and mistaken confidence in incomplete tests. Sections 11 and 14 map the controls and residual risks.
02

The Codex system

Codex canonical seven-layer architectureSeven persistent layers run from product surfaces through agent runtime, model, action control, execution and integrations to the local or cloud environment. PRODUCT SURFACESDesktop · Remote · web · CLI · IDE · cloud AGENT RUNTIMETask state · context assembly · planning · iteration · orchestration MODEL LAYERSelected model · reasoning effort · service tier ACTION + CONTROLTool selection · sandbox · approval policy · rules · credentials EXECUTION LAYERFilesystem · patch · shell · tests · Git · browser EXTENSIONS + INTEGRATIONSAGENTS.md · skills · plugins · hooks · MCP · apps ENVIRONMENTLocal workspace or cloud container · repository · network · services
Architecture diagram — component taxonomy. These are persistent layers, not chronological steps. A product surface may supervise either a local or cloud runtime.
Canonical layerResponsibilityExamplesBoundaryDetail
1. Product surfacesPresent, steer and review work.Desktop, Remote, web, CLI, IDE and cloud.The interface does not by itself locate execution.04
2. Agent runtimeAssemble context, preserve task state, plan and iterate.Chats, goals, compaction, subagents and attempts.Runtime coordination does not grant tool authority.05, 06, 09
3. Model layerReason over evidence and propose outputs or actions.Selected model, reasoning effort and service tier.Model capability is not product capability or execution authority.01, 05
4. Action / controlSelect and govern attempted actions.Tool routing, sandbox, approvals, rules and credentials.Proposal, authorisation and execution are separate events.07, 11
5. Execution layerRead or change files and run processes.Patch, shell, tests, Git, browser and computer use.The executing host owns actual side effects.05, 07
6. Extensions / integrationsAdd behaviour, context, lifecycle actions and connected systems.AGENTS.md, skills, plugins, hooks, MCP and apps.Each extension adds its own trust and permission boundary.06, 08, 10
7. EnvironmentHold code, data, processes, network and external connections.Local workspace, cloud container, repository and services.Local and cloud have separate identity, persistence and rollback boundaries.04, 11
03

From code model to agent platform

DateRelease typeMilestoneWhat changedMeaning
10 Aug 2021Model / APIOriginal OpenAI CodexA GPT-derived model translated natural language into code and powered the first GitHub Copilot preview.Codex began as a model capability, not the present agent product.
7 May 2025ProductCodex CLI announcedAn open-source terminal coding agent brought repository inspection, editing and command execution into a local loop.Established the local harness and user-controlled workspace boundary.
16 May 2025Cloud productCodex cloud research previewParallel delegated tasks ran in isolated cloud environments connected to repositories.Separated supervision from execution and enabled background work.
Aug–Oct 2025Model + surfacesGPT-5-Codex, IDE extension and GACodex-specific model optimisation and broader local/cloud workflow integration arrived.Joined model, CLI, IDE and cloud into one product family.
Nov 2025PlatformCodex SDK and App ServerDevelopers gained programmatic and client-facing access to the agent harness.Moved Codex from finished product towards reusable agent infrastructure.
2 Feb 2026Product surfaceCodex desktop appA graphical multi-task workspace added projects, chats, worktrees, review and local/cloud handoff.Made parallel agent work visible and operable beyond the terminal.
2026Extension / orchestrationSkills, plugins, hooks, Remote and subagentsReusable capabilities, connected systems, lifecycle automation and delegated contexts broadened the harness.Codex became a general workspace-agent platform centred on software work.
24 Aug 2026Research cutCurrent documented systemDesktop, Remote, web, CLI, IDE and cloud share a growing set of agent, security and extension concepts.Surface capability remains uneven; the live documentation is authoritative.
Lineage boundary. The 2021 Codex model and the current Codex product share a name, but the modern system is a multi-surface agent harness using a changing model catalogue. Product, model and platform milestones are labelled separately.
04

Product surfaces and execution locations

Current as of 24 August 2026. Surface, runtime and tool location are independent dimensions. The same interface may supervise local work in one task and a hosted environment in another.

SurfacePrimary roleExecutionBest fitBoundary
ChatGPT desktop appGraphical workspace for projects, chats, tasks, worktrees, diffs and integrated terminals.Local or cloud, selected per task.Parallel supervised engineering and visual review.App access does not erase workspace or cloud policy.
RemoteStart, steer and inspect engineering work from another device.Connected Codex environment.Continuing work away from the main workstation.Remote control is an interface link, not unrestricted machine access.
ChatGPT webBrowser access to projects and compatible Codex workflows.Primarily hosted services.Repository-connected tasks without a local terminal.Its composer commands differ from CLI slash commands.
Codex CLIKeyboard-first interactive and non-interactive agent.Local workspace; optional remote/cloud commands.Repository work, automation and terminal-native control.Shell commands inherit the active sandbox and approval policy.
IDE extensionEditor-aware chat, code selection and file context.Local or connected Codex path.Focused iteration while editing.Open editor context is not automatically the entire repository.
Codex cloudHosted background tasks and parallel attempts.Isolated cloud environment.Delegated work, reproducible setup and asynchronous review.Secrets, setup and network rules are environment-specific.

Local versus cloud execution

DimensionLocal executionRemote / cloud execution
WorkspaceThe user's accessible local repository and working tree.A provisioned container checks out the selected repository branch or commit.
ComputeUser machine, local operating system and installed tools.Managed container image plus configured setup and maintenance scripts.
NetworkLocal sandbox, policy and machine configuration govern access.Setup runs with internet access; agent access is off by default unless configured as limited or unrestricted.
CredentialsUser-controlled credentials exposed to the active local process and integrations.Environment values are configured explicitly; cloud secrets are removed before the agent phase after setup.
PersistenceFiles remain in the local working tree; process lifetime depends on the session and host.Task and cached-container lifetime are environment-dependent; cache is not the system of record.
ResultLocal file changes, command output, tests and Git diff.Answer and reviewable diff, with an optional pull request or application of the cloud diff locally.
Location rule. Ask three separate questions: where the interface runs, where the agent runtime runs and where each tool executes. These locations can differ in one workflow.
05

How a task moves through Codex

Codex task loopA task flows from request and context through reasoning, authorised tool execution, observation, verification and review, with iteration where evidence is insufficient. REQUESTGoal + constraintsCONTEXTRepo + instructionsREASONPlan next actionAUTHORISEPolicy + approvalEXECUTETool in environmentVERIFYEvidence + review Observe results, update state and iterate until evidence is adequate
Execution diagram. The model selects a proposed action; policy decides whether it may run; the environment produces the actual side effect; tests and review determine what was demonstrated.
AuthorityOwned byDecisionWhat it cannot prove
Instruction authorityUser, project and policy layersWhat outcome and constraints should guide the task.That the requested action is safe or technically possible.
Reasoning authoritySelected model within the harnessWhat to inspect, infer and attempt next.That a requested tool action has permission to execute.
Execution authorityHost, sandbox, approval policy and external serviceWhether and where a side effect occurs.That the change is correct or complete.
Verification authorityTests, builds, diffs, logs and human reviewersWhether specified observable properties hold.Correctness outside the evidence and scenarios examined.

Verification is a subsystem, not an afterthought

StageQuestionTypical evidenceFailure if omitted
GenerationWhat code or configuration should change?Proposed patch, created files or migration plan.Plausible output without proof that it can run.
ExecutionCan the environment perform the requested operation?Command exit codes, process output and resulting files.Textual code that was never exercised.
VerificationDo observable technical properties hold?Diff inspection, tests, lint, type checks, builds, browser checks and logs.Undetected regressions, omissions or unintended changes.
EvaluationDoes the verified result satisfy the actual request?Acceptance criteria, scenario coverage and accountable human review.Passing checks for the wrong or incomplete outcome.
Central rules. Proposal ≠ authorisation ≠ execution. Model intent is not execution authority. Generating code ≠ verifying that the task is complete. A dependable loop is edit → inspect diff → validate → observe failure → revise → revalidate.
06

Context, instructions and working state

Context sourcePurposeScope / lifetimeLimit
User and system instructionsDefine the current request, safety and operating constraints.Conversation or managed runtime.Conflicts are resolved by instruction priority, not by recency alone.
AGENTS.mdRecord repository conventions, commands and local guidance.Directory tree and applicable descendants.Text guidance cannot grant permissions or make stale instructions true.
Workspace evidenceFiles, Git state, tests, logs and configuration inspected by tools.Current accessible environment.Uninspected or inaccessible material is absent from the model's evidence.
SkillsLoad task-specific procedures, references, scripts and assets.Selected turn or workflow.A skill influences behaviour; it does not automatically execute actions.
Conversation statePreserve requests, tool observations, decisions and partial results.Chat or task.Long sessions require compaction; detail may be summarised.
Memories and historyReuse durable preferences or locate previous work where enabled.User, project or product feature.Availability and retention depend on surface and policy.
Connected sourcesAdd external files, data and application context.Connection, account and permission scope.Freshness and completeness remain source-specific.
Context is selected evidence. A large context window does not mean Codex has read every file, retained every earlier token or discovered every relevant dependency. Retrieval, inspection, compaction and source quality still determine what the model can reason over.
07

Tools and side-effect ownership

Tool classTypical operationsExecutorControl boundaryPreferred evidence
Workspace read/searchList files, search text, inspect configuration and Git state.Local or cloud runtime.Readable roots and ignore rules.Exact paths, lines and repository state.
Patch / file writeCreate or modify source and configuration.Runtime filesystem tools.Writable roots, policy and review.Diff plus focused tests.
Shell / terminalBuild, test, format, run scripts and inspect processes.Sandboxed host process.Sandbox, approvals, network and credentials.Exit code, logs and reproducible command.
Browser / computer useNavigate applications, observe screens and interact with UI.Browser or desktop automation environment.Session, domains, login and approval policy.Rendered state, screenshots and console/network checks.
Web searchFind and retrieve current public information.Search and retrieval service.Internet policy, source restrictions and citation rules.Opened primary source and retrieval date.
MCP and appsCall typed external tools and read connected resources.External server or connector.Connection auth, exposed schema and server policy.Tool result plus target-system confirmation.
Media generationCreate or edit images and other supported media.Specialised model or service.Tool availability and content policy.Rendered asset and acceptance criteria.
Git / hosting integrationReview diffs, inspect pull requests and publish approved changes.Local Git or connected provider.Repository permissions, branch rules and user authority.Commit, check result or provider record.
Safer interface principle. Prefer typed APIs, repository-native commands and narrow file operations over free-form GUI control when they provide the same outcome. Computer use is valuable when no reliable structured interface exists, but it expands ambiguity and attack surface.
08

Extensions: what each mechanism actually does

MechanismPrimary objectBest useNot equivalent toKey risk
AGENTS.mdScoped repository instructionsStable project conventions and commands.A tool, plugin or permission grant.Stale or malicious repository guidance.
SkillInstruction package with optional references, scripts and assetsRepeatable specialist workflows.An MCP connection or automatic hook.Over-broad instructions or unreviewed scripts.
PluginInstallable bundleDistributing skills, MCP servers and optional UI or metadata together.A single skill or the agent runtime.Supply-chain and permission expansion.
MCPProtocol connection to tools and resourcesTyped access to external systems.Procedural knowledge or policy.Server trust, credentials and prompt injection.
App / connectorManaged external integrationUsing a supported service or account from the product.General internet access.Account scope and unintended writes.
HookLifecycle-triggered deterministic actionValidation, logging or policy around defined events.Model-selected reasoning.Hidden side effects or untrusted hook changes.
Rule / managed policyEnforced decision constraintAllowing, prompting or blocking actions.An instruction that the model may interpret.Misconfiguration that is too permissive or obstructive.
Separation rule. Skills change what Codex knows how to do; MCP and apps change what systems it can reach; plugins package extensions; hooks react to lifecycle events; rules constrain actions. Combining them does not collapse their security boundaries.
09

Orchestration, parallelism and isolation

ObjectWhat it isolatesWhat it sharesUseFailure mode
Chat / threadConversation and working context.Workspace and configured tools may remain shared.One coherent line of work.Long context, drift or hidden dependency.
Side chatTemporary question from the main transcript.Current environment and selected context.Clarification without derailing the task.Important decisions fail to return to the main work.
SubagentDelegated reasoning context and task responsibility.Tools or workspace according to runtime configuration.Independent investigation or implementation unit.Duplicate work, conflicting edits or missing synthesis.
WorktreeGit checkout, branch and files.Repository history and external services.Parallel implementation without local file collisions.Integration conflicts or stale base.
Cloud attemptHosted environment and execution run.Repository snapshot and configured setup.Alternative approaches or background delegation.Divergent environment, credentials or dependency state.
GoalPersistent objective and progress state.Active task context and tools.Long-running work that spans turns.Vague objectives or unchecked completion claims.
Handoff / RemoteSupervision surface.Underlying task or environment.Continue or review from another device or surface.Mistaking interface movement for environment migration.
Coordination rule. A subagent divides reasoning; a worktree divides files; a cloud attempt divides execution; a handoff changes supervision. Reliable parallel work requires explicit ownership, dependency ordering and final integration checks.
10

Codex as a developer platform

Current as of 24 August 2026. OpenAI's controlled maturity vocabulary is Under development, Experimental, Beta and Stable. Where a feature lacks a published maturity label, this article says Documented rather than silently promoting it to Stable.[20]

InterfaceStatusConsumerControl levelTypical useBoundary
Codex SDKDocumentedApplication developerProgrammatic task and event interface.Embed Codex workflows in services and internal tools.The application still owns identity, product UX and policy.
App ServerExperimentalRich local clientStructured protocol over the Codex harness.Build custom interfaces with thread, turn and event control.Experimental interfaces can change; client must handle lifecycle state.
MCP Server modeDocumented; CLI command StableAnother MCP-capable agent or clientCodex exposed as an MCP tool.Delegate coding work from a wider agent system.The caller and Codex retain separate permissions and context.
Non-interactive CLIStable commandScript or CI systemCommand, JSONL and exit-code interface.Repeatable automation, review and batch tasks.Unattended runs require narrow sandbox and credential design.
GitHub ActionDocumentedRepository workflowEvent-triggered hosted automation.Review, issue handling and approved repository changes.Workflow permissions and untrusted event content are critical.
Cloud task API / integrationsSurface-dependentProduct or external workflowHosted task creation and result retrieval.Asynchronous background work from GitHub, Slack or Linear.Availability, repository access and organisation policy vary.
Platform boundary. The Responses API and Agents SDK are OpenAI's general agent-building primitives. Codex SDK, App Server and Codex automation expose the specialised coding harness. They can interoperate, but they are not the same product layer.
11

Security and permission model

Trust model. Codex interprets instructions and evidence from sources with different authority and reliability. Authoritative instructions can still be mistaken; untrusted content can contain plausible commands or prompt injection. Trust classification therefore works with enforcement, not instead of it.

Trust classExamplesHow Codex should treat itEnforcement boundary
Instruction authorityUser request, system constraints and managed organisational policy.Resolve by documented priority and scope; do not infer broader authorisation.Policy still cannot bypass operating-system or service enforcement.
Conditionally trusted host contextKnown local environment, reviewed configuration, approved tools and credentials.Use only within their configured scope and current state.Sandbox, filesystem roots, network rules and credential permissions.
Potentially untrusted inputsRepository text, dependencies, issues, terminal output, web pages, retrieved files, MCP results and generated commands.Treat as evidence, not higher-priority instructions; inspect before execution.Approval, containment, source checking and least-privilege access.
Produced artefactsGenerated code, patches, commands, test output and completion claims.Verify independently against task requirements and observable results.Diffs, tests, builds, logs, review and audit records.
ControlProtectsHow it worksResidual risk
Filesystem sandboxHost files outside allowed roots.Constrains reads and writes for spawned commands and built-in operations.Allowed workspace files may still contain secrets or destructive scripts.
Network policyExternal data flow and dependency retrieval.Disables, restricts or approves network use according to environment.An allowed destination can still return malicious content.
Approval policyBoundary crossings and consequential actions.Pauses for human authorisation under configured conditions.Approval fatigue and misleading command descriptions.
Automatic reviewSuspicious commands that policy might otherwise allow.Reviews an action and can deny it before execution.False positives and false negatives; not a proof of safety.
Rules and managed configurationOrganisation-wide consistency.Require, deny or constrain settings and command patterns.Policy gaps or overly broad exceptions.
Credential scopingRepositories and external services.Supplies only required identities to the selected environment.Agent can misuse credentials within their granted scope.
Environment isolationLocal machine and parallel tasks.Uses cloud containers or Git worktrees to limit interference.Shared upstream services, secrets and merge paths remain connected.
Diff, tests and human reviewCorrectness and unintended changes.Examines produced artefacts before publication.Incomplete tests and reviewers can miss semantic or supply-chain risk.
Defence in depth. Sandboxing limits technical capability; approvals add human control; rules add policy; credentials define external reach; verification checks the result. No single layer substitutes for the others.
12

Users, buyers and workflow fit

User / buyerPrimary jobBest-fit surfaceValue mechanismAdoption constraint
Individual developerImplement, debug, refactor and learn a codebase.CLI, IDE or desktop.More work completed per engineering hour.Trust, review discipline and usage limits.
Software teamParallelise backlog, reviews and maintenance.Desktop projects, cloud tasks and Git integrations.Throughput across many independent work units.Coordination, conventions and merge quality.
Platform / SRE teamOperate repositories, infrastructure and incident workflows.CLI, cloud and controlled integrations.Faster diagnosis and repeatable automation.Credential scope and production risk.
Enterprise engineering organisationStandardise governed agent-assisted development.Managed desktop, IDE, cloud and policy controls.Scaled productivity with audit and administration.Compliance, data residency and measurable quality.
Open-source maintainerTriage issues, update dependencies and review contributions.GitHub integration and cloud tasks.Automates high-volume maintenance work.Untrusted contribution content and limited maintainer time.
Developer-tool vendorEmbed an agentic coding loop in another product.SDK, App Server or MCP Server.Uses the Codex harness without recreating the full runtime.Interface maturity, product differentiation and policy ownership.
Non-engineering technical professionalAnalyse data, automate files or build internal tools.Desktop app and plugins.Turns natural-language objectives into executable workflows.Domain validation and accidental side effects.
Commercial boundary. Codex is packaged through ChatGPT plans, usage entitlements and enterprise arrangements rather than as one standalone unit with one disclosed price. Pricing and limits change faster than the architecture and are deliberately excluded from this dossier.
13

Direction: from coding assistant to workspace agent

DirectionEvidence in the productPotentialDependencyStatus
Longer autonomous workGoals, long-running tasks, background terminals, compaction and cloud execution.Complete larger engineering units with less continuous steering.Reliable planning, verification and recovery.Operational and expanding
Parallel agent operationsSubagents, worktrees, cloud attempts and multi-task desktop UI.Scale one developer across independent workstreams.Task decomposition and integration discipline.Operational and expanding
Local / cloud continuityDesktop, CLI, Remote, cloud and handoff paths.Move supervision without restarting the work.Consistent context, environment and credential handling.Operational with surface differences
Composable capability systemSkills, plugins, MCP, apps, hooks and rules.Turn Codex into a domain-specific workspace agent.Extension quality, trust and discovery.Operational; ecosystem developing
Codex as infrastructureSDK, App Server, MCP Server and non-interactive mode.Power third-party and internal agent products.Stable protocols and clear policy ownership.Mixed stable and experimental
Beyond codeBrowser, computer use, files, data, media and connected apps.Execute end-to-end knowledge and operational workflows.Domain-specific controls and validation.Emerging from coding core
Strategic synthesis. Codex is evolving towards a software-engineering agent platform in which the model is only one layer. Differentiated value increasingly comes from orchestration, environment integration, controlled execution, verification and review. The competitive unit is therefore shifting from model quality alone towards verified end-to-end task completion under real software-development constraints.
14

Limits and unresolved questions

  • Fast-moving surface. Commands, models, plan entitlements and experimental features change frequently; live product discovery remains authoritative.
  • Uneven capability. Desktop, web, CLI, IDE and cloud do not expose identical commands or environment controls.
  • Verification gap. Passing tests can coexist with incorrect requirements, missing scenarios or unsafe external effects.
  • Prompt injection. Repositories, web pages, issues and connected systems may contain untrusted instructions aimed at the agent.
  • Credential concentration. A capable agent with broad credentials can produce large side effects quickly.
  • Parallelism cost. More agents can increase duplicated work, merge conflicts and review load when ownership is unclear.
  • Context loss. Retrieval and compaction trade completeness for tractability; important details can be omitted or summarised incorrectly.
  • Extension supply chain. Skills, plugins, MCP servers and hooks add code, instructions and third-party trust.
  • Cloud reproducibility. Hosted and local environments may diverge in dependencies, secrets, operating system and network access.
  • Economic opacity. Productivity and quality benefits vary by task; usage, review and integration costs must be measured in the user's environment.
15

Primary sources

  1. Codex developer commandsComplete documented CLI command, flag, interactive shortcut and slash-command reference.
  2. Codex desktop slash commandsComposer commands available in the ChatGPT desktop app.
  3. SandboxRelationship between technical sandbox boundaries and approval policies.
  4. Agent approvals and securityLocal execution risk, approval modes and safe operating patterns.
  5. AGENTS.mdRepository instruction discovery and directory scope.
  6. SubagentsDelegated contexts, agent definitions and orchestration.
  7. Git worktreesFile and branch isolation for parallel tasks.
  8. Build skillsSkill structure, progressive disclosure, scripts and assets.
  9. Build pluginsPlugin packaging and installable extension boundaries.
  10. Model Context ProtocolMCP server configuration, tools, resources and authentication.
  11. HooksLifecycle automation and trust model.
  12. Codex CLIInteractive local agent and terminal workflow.
  13. Codex cloud environmentsHosted repository checkout, setup, internet policy, secrets, container caching, execution loop and returned diff.
  14. RemoteRemote supervision and continuation of Codex work.
  15. Codex SDKProgrammatic embedding of Codex workflows.
  16. App ServerStructured client protocol for the Codex harness.
  17. Codex MCP ServerExposing Codex to another MCP client.
  18. Non-interactive modeScripted and CI execution through codex exec.
  19. Codex GitHub ActionRepository automation and workflow permissions.
  20. Feature maturityStable, beta and experimental labels used by the product.
  21. Codex changelogProduct and CLI release chronology.
  22. Introducing Codex, 16 May 2025Cloud coding-agent launch and isolated task model.
  23. Codex configuration referenceConfiguration layers, project trust, approval policy, sandbox and agent settings.
Research cut. Facts and command availability were re-checked against official OpenAI documentation on 24 August 2026 at 19:21 ICT. Surface-dependent and experimental capabilities are labelled; pricing is excluded.
Part II — Technical reference. The system analysis ends above. This appendix preserves exact operator controls for practical use, but it is subordinate to the architecture: commands are grouped first by why they exist, then listed by surface.
16

Appendix: Codex command reference

Yes—these are the Codex equivalents of Claude Code's / commands. They are controls for the Codex product, not prompts sent to the model as ordinary text. The CLI, desktop app, CLI executable and IDE command palette expose different sets, so this appendix keeps them separate.

Operator taxonomy

Priority classWhy it existsRepresentative controlsRead first when
CoreChoose the model and operating mode; inspect state; attach context; review changes./model, /permissions, /status, /mention, /diff, /reviewStarting ordinary interactive work.
AdvancedManage long, parallel or isolated work./goal, /agent, /subagents, /worktree, /compact, /forkTasks span contexts, agents or branches.
AutomationRun Codex from scripts, CI or another application.codex exec, SDK, App Server, MCP Server and GitHub ActionNo interactive operator is guaranteed to be present.
SecurityConstrain execution, network, credentials and boundary crossings./permissions, sandbox controls, codex execpolicy, rules and managed configurationActions can change files, call services or use credentials.
IntegrationAdd external tools, data, behaviour and lifecycle actions./mcp, /apps, /plugins, /skills and /hooksThe built-in runtime lacks required context or reach.
DiagnosticExplain configuration, processes, usage and failures./debug-config, /ps, /usage, codex doctor and codex debugObserved behaviour differs from expectation.
Status and version boundary · current as of 24 August 2026. Stable, Beta, Experimental and Under development follow OpenAI's published maturity vocabulary. Command availability additionally depends on product surface, installed version, operating system, account, policy and feature flags. Unlabelled availability is not evidence of Stable status.

Codex CLI built-in slash commands

CommandPurposeSurface / boundary
/permissionsSet what Codex can do without asking first.CLI; policy can restrict choices.
/ideInclude open files, selection and IDE context.CLI with IDE integration.
/keymapInspect and remap terminal UI shortcuts.CLI; persists to configuration.
/vimToggle Vim behaviour in the composer.CLI.
/setup-default-sandboxConfigure the elevated default sandbox.Windows only.
/sandbox-add-read-dirAdd read access for an external directory.Windows only; read access, not write.
/agent / /subagentsSwitch the active agent thread.When subagents exist.
/appsBrowse apps and insert one into the prompt.Availability depends on installed connections.
/pluginsBrowse and manage installed or discoverable plugins.Plugin support and policy required.
/hooksInspect, trust or disable lifecycle hooks.Hook-enabled releases.
/clearClear the terminal and start a fresh chat.Resets visible UI and chat context.
/renameRename the current saved chat.CLI session metadata.
/archiveArchive the current session and exit.Preserves transcript.
/deletePermanently delete the current session and descendants.Destructive; exits the CLI.
/compactSummarise the visible chat to release context capacity.Detail is compressed.
/copyCopy the latest completed Codex output.Same function as Ctrl+O.
/diffShow tracked and untracked Git changes.Git workspace.
/exit / /quitExit the CLI.Save important work first.
/experimentalToggle experimental features.Options can change without stable guarantees.
/approveApprove one retry of an automatic-review denial.Only after a denied action.
/memoriesConfigure memory use and generation.Feature and policy dependent.
/skillsBrowse and invoke available skills.Local, project and plugin skills can vary.
/importImport supported Claude Code or Cursor setup and chats.Supported external artefacts only.
/feedbackSubmit feedback and optional diagnostics.May include selected logs.
/initGenerate an AGENTS.md scaffold.Current project directory.
/logoutClear local authentication credentials.Shared-machine safety.
/mcpList configured MCP tools and server details.Use verbose view for connection details.
/mentionAttach a file or folder to the chat.Accessible workspace paths.
/modelSelect the active model and supported reasoning effort.Catalogue and account dependent.
/fastToggle the model catalogue's Fast service tier.Shown only when supported.
/planEnter plan mode and optionally send a task.Separates planning from implementation.
/goalSet, edit, pause, resume, inspect or clear a persistent goal.Goal-enabled surfaces.
/personalitySelect a response communication style.Does not override explicit instructions.
/psShow background terminals and recent output.Current session processes.
/stopStop all background terminals.Cancels session-started terminal work.
/forkBranch the current chat into a new chat.Original transcript remains.
/appContinue the session in the desktop app.macOS or Windows desktop support.
/side / /btwStart a temporary side chat.Does not interrupt the main transcript.
/rawToggle raw scrollback mode.Terminal display only.
/resumeResume a saved chat.Session inventory.
/newStart a new chat in the same CLI process.Fresh conversation context.
/reviewReview the working tree or compare with a base.Review target and Git state required.
/statusShow model, policy, writable roots, context and session details.Primary configuration check.
/usageInspect token activity and available rate-limit controls.Account dependent.
/debug-configShow configuration layers and policy requirements.Diagnostic output may expose paths.
/statuslineConfigure footer fields.Persists TUI configuration.
/titleConfigure terminal title fields.Terminal support dependent.
/themeSelect syntax-highlighting theme.Display only.
/pets / /petChoose or hide a terminal pet.Cosmetic; TUI availability.

ChatGPT desktop app slash commands

CommandPurposeBoundary
/approveApprove one retry after automatic review denies an action.Only when auto-review is active.
/cloudRun the chat in cloud mode.Cloud execution must be available.
/cloud-environmentSelect the cloud environment.Configured environments only.
/compactCompact the current chat context.Summarises prior detail.
/fastToggle a supported Fast service tier.Catalogue dependent.
/feedbackOpen feedback and optional log submission.User confirmation required.
/forkCopy the local chat into a new local chat.Local chat only.
/goalSet a persistent task goal.Goal-enabled app versions.
/ide-contextToggle automatic IDE context.IDE connection required.
/initGenerate AGENTS.md for the project.Project workspace required.
/localRun the chat in the local workspace.Local environment available.
/mcpOpen MCP server status.Configured servers only.
/memoriesConfigure chat memory use and generation.Feature availability varies.
/modelSelect the active model.Catalogue and account dependent.
/personalitySelect response style.Supported models only.
/planToggle plan mode.Multi-step planning surface.
/projectSelect the project used for new chats.Configured projects only.
/reasoningSelect model reasoning effort.Model dependent.
/reviewStart code-review mode.Working tree or base comparison.
/sideOpen a temporary side chat.Main chat remains active.
/statusShow chat ID, context usage and rate limits.Read-only status.
/worktreeRun the chat in a new Git worktree.Git project required.

CLI executable commands

CommandMaturityPurpose
codexStableLaunch the terminal UI with optional prompt, images and global flags.
codex appStableLaunch or direct the user to the desktop app.
codex app-serverExperimentalRun the app-server protocol for client development and debugging.
codex applyStableApply the latest cloud-task diff to the local working tree.
codex archiveStableArchive a saved session by ID or name.
codex cloudExperimentalBrowse or execute cloud chats from the terminal.
codex completionStableGenerate shell completion scripts.
codex debugExperimentalInspect models, prompt input or app-server behaviour.
codex deleteStablePermanently delete a saved session.
codex doctorStableCreate a diagnostic report for installation, config, authentication and runtime.
codex execStableRun Codex non-interactively for scripts and CI; supports JSONL and resume.
codex execpolicyExperimentalEvaluate whether a rule would allow, prompt or block a command.
codex featuresStableList and persist feature-flag settings.
codex forkStableFork a previous interactive session.
codex loginStableAuthenticate using supported ChatGPT or API routes.
codex logoutStableRemove stored authentication credentials.
codex mcpStableList, add, remove and authenticate MCP servers.
codex mcp-serverStableExpose Codex as an MCP server over standard input/output.
codex pluginStableInstall, list and remove plugins from configured marketplaces.

Interactive keyboard and composer controls

ControlActionBoundary
@Search workspace files and add a path to the prompt.Accessible workspace files.
! prefixRun a local shell command.Current sandbox and approval settings apply.
Up / DownRestore draft history.Composer history.
Ctrl+RSearch prompt history.Press Enter to accept or Esc to cancel.
Ctrl+OCopy the latest completed output.Equivalent to /copy.
Tab while workingQueue a prompt, slash command or shell command for the next turn.Runs after the current turn completes.
Enter while workingInject new instructions into the current turn.May redirect active reasoning.
Esc twiceEdit the previous user message and fork from that point.Empty composer required.
Ctrl+CClose the session.Equivalent exit path.
Dynamic boundary · checked 24 August 2026. Surface, version, operating system, account, managed policy and experimental flags can change which commands appear. Skills, plugins and connected systems can also add invocable capabilities. Type / in the active surface and use /status or the official developer-command reference as the live authority.