OpenAI Codex
- Surfaces represented
- Codex CLI
- Model context represented
- GPT-5.2
Practical agent comparison
Both products document repository guidance, coding tools, file modification, shell execution, and approval boundaries. Codex prompt claims are scoped mainly to Codex CLI with GPT-5.2. Claude Code documentation covers CLI and IDE-oriented surfaces without fixing one model, and it documents repository auto memory. Comparable Codex memory is not established. Before moving automation, recheck context, memory, and permission assumptions.
Comparison orientation
Each dimension links to its detailed evidence row. State labels describe the selected evidence.
Who this comparison is for
Developers and platform teams transferring repository-based coding workflows between Codex CLI and Claude Code.
Evidence-bounded scope
These summaries combine only the scope stated in the reviewed answers. Each criterion keeps its narrower limits.
Practical behavior comparison
“Not established” records an evidence gap. It does not mean the product lacks the capability.
| Criterion | OpenAI Codex | Claude Code | Interpretation |
|---|---|---|---|
| Repository / project instructions Repository guidance must be placed in the target agent's documented instruction hierarchy. | Documented AGENTS.md repository guidance
| Documented Scoped CLAUDE.md hierarchy
| Read practical implication |
| Memory / persistent context Durable workflow context should not be assumed to persist across agent environments. | Not established Persistent memory not established
| Documented Repository-scoped auto memory
| Read practical implication |
| Planning / work decomposition Planning assumptions shape how teams structure, review, and resume multi-step work. | Documented Making and updating plans
| Documented Plan mode before source edits
| Read practical implication |
| Tools / tool calling A portable workflow must use only the tools established by the selected evidence. | Documented Terminal and patch function calls
| Documented Read, edit, execute, and external tools
| Read practical implication |
| Filesystem / file modification Repository reads and mutations require the correct workspace and review boundary. | Documented Workspace files and patch calls
| Documented Reads and edits codebase files
| Read practical implication |
| Shell / terminal execution Command-heavy automation depends on the target harness's execution controls. | Documented Terminal command function calls
| Documented Runs commands through codebase tools
| Read practical implication |
| Browsing / network access Current external information cannot be assumed available when browsing scope is unestablished. | Documented Cached or live CLI web search
| Documented WebSearch and WebFetch
| Read practical implication |
| Approvals / permissions Consent, confirmation, and isolation rules determine which delegated actions can proceed. | Documented Configuration-dependent approval escalation
| Documented Deny, ask, allow, and permission modes
| Read practical implication |
| Context scope / inheritance Instructions and tools remain dependable only when their surface, model, and configuration boundaries are preserved. | Documented Harness, workspace, and repository context
| Documented Managed, user, project, local, and memory scopes
| Read practical implication |
Criterion-by-criterion interpretation
Behavior Intelligence supplies the factual answers. Editorial implications remain separate.
Why it matters. Repository guidance must be placed in the target agent's documented instruction hierarchy.
Codex supports repository-scoped guidance through AGENTS.md and AGENTS.override.md in the documented context assembly. Codex home guidance loads before project guidance; project discovery selects at most one file per directory from the project root to the working directory.
Claude Code documents managed, user, project, and local CLAUDE.md instruction scopes for coding-agent work.
Why it matters. Durable workflow context should not be assumed to persist across agent environments.
The limited Codex excerpt and repository-guidance source do not establish a separate persistent memory mechanism.
No source link is attached because the reviewed evidence does not establish this answer.
Claude Code documents repository-scoped auto memory that stores selected learnings separately from human-authored CLAUDE.md instructions.
Why it matters. Planning assumptions shape how teams structure, review, and resume multi-step work.
The selected Codex prompt excerpt explicitly names making and updating plans as part of the assistant's working interface.
Plan mode researches and proposes changes before source edits. It can run exploratory shell commands and write a plan. Outside sessions with bypass permissions available, source edits remain blocked until plan approval. Command review depends on mode, settings, and version; approval exits planning into the selected execution mode. CLI evidence is not a universal read-only sandbox claim.
Why it matters. A portable workflow must use only the tools established by the selected evidence.
Codex's selected prompt excerpt names function calls for terminal commands and patch application.
Claude Code documents tools for reading code, editing files, running commands, and connecting to external tools.
Why it matters. Repository reads and mutations require the correct workspace and review boundary.
Codex's selected excerpt says the harness can supply workspace files and that the assistant can emit patch function calls.
Claude Code's official overview says the product reads code, edits files, and runs commands.
Why it matters. Command-heavy automation depends on the target harness's execution controls.
Codex's selected excerpt explicitly names function calls that run terminal commands.
Claude Code's official overview documents command execution as part of codebase operations.
Why it matters. Current external information cannot be assumed available when browsing scope is unestablished.
Interactive Codex CLI defaults to cached web search; --search selects live web search. This tool capability does not establish unrestricted shell network access or every session configuration.
WebSearch returns search titles and URLs; WebFetch retrieves and processes a page, with lossy summarization and possible truncation. Tool/domain rules and provider support apply. Amazon Bedrock does not expose the server-side search tool; an Azure-hosted Foundry deployment does not support it. Web tools do not establish arbitrary network access.
Why it matters. Consent, confirmation, and isolation rules determine which delegated actions can proceed.
Codex's selected excerpt says terminal and patch calls may be escalated to the user for approval depending on configuration.
Claude Code documents deny, ask, and allow rules with precedence, plus permission modes that constrain tool execution.
Why it matters. Instructions and tools remain dependable only when their surface, model, and configuration boundaries are preserved.
Codex's selected sources establish harness-supplied workspace context and authored guidance from Codex home followed by project instruction files. Current discovery documentation is separate from the pinned GPT-5.2 prompt excerpt.
Claude Code documents managed, user, project, and local CLAUDE.md scopes plus separate repository-scoped auto memory.
Workflow guidance
These implications follow from the reviewed criteria. They do not express a product preference.
Keep the same review contract while separating team instructions, personal preferences, and the permission to edit.
A documented Codex planning interface and Claude Code auto memory do not create equivalent behavior across both products; state required artifacts and persistence needs.
Preserve filesystem, shell, and approval boundaries when moving automation, because tool descriptions do not imply identical execution policy.
For a documentation lookup, require a source URL and the relevant page evidence. Check whether Codex search is live or cached; on Claude Code verify search-provider support and permission to fetch the destination domain.
Comparison-specific evidence
Available first-party evidence covers different parts of the Codex and Claude Code instruction systems. Those evidence differences do not establish a product preference. The analysis below adds prompt and product context to the shared behavior criteria.
Codex has a limited first-party prompt excerpt. The selected Claude Code sources establish an instruction architecture but not a complete default prompt.
Codex documents repository/project guidance through AGENTS.md, while Claude Code documents scoped CLAUDE.md instructions and a separate repository auto-memory mechanism.
Both products document tool use and harness-level control boundaries, but the selected sources expose different levels of permission detail.
Source-specific detail
These criteria cover prompt visibility, product identity, and other evidence specific to this comparison.
| Criterion | OpenAI Codex | Claude Code |
|---|---|---|
| Product and model roleEditorial interpretation. Both products are coding agents whose active model remains separate from the product itself. | documented Codex CLI is the product surface; GPT-5.2 is the model named in the selected pinned prompt, not every Codex runtime. | documented Claude Code is a multi-surface coding product with separately selectable Claude model context. |
| Base-prompt visibilityEditorial interpretation. Evidence availability differs; absence from the selected source set is not proof that a product lacks internal base instructions. | documented Promptcred maps a limited prompt excerpt published in OpenAI's first-party repository, with completeness and rights limits attached. | not established The selected official Claude Code documentation does not establish a complete default system prompt; its public reader is architecture analysis. |
| Project instructionsEditorial interpretation. Both products document repository guidance, but Codex assembles AGENTS.md files along the project path while Claude Code documents managed, user, project, and local CLAUDE.md scopes. | documented Codex documents repository and project guidance through AGENTS.md and AGENTS.override.md files aggregated from the Git/project root to the working directory. | documented Managed, user, project, and local CLAUDE.md scopes are documented as instruction inputs. |
| ToolsEditorial interpretation. Both products expose agentic operations, but the sources describe them at different levels of detail. | documented The Codex excerpt names terminal-command and patch calls and says availability depends on configuration. | documented Claude Code documentation describes reading code, editing files, running commands, and connecting to external tools. |
| Permission controlsEditorial interpretation. Both products enforce some tool permissions through the product harness, outside the prompt text. | documented The prompt excerpt makes approval escalation configuration-dependent but does not provide a complete permission-rule taxonomy. | documented Claude Code documents deny, ask, and allow rule evaluation plus permission modes. |
| Persistent memoryEditorial interpretation. Only Claude Code's selected source set supports a repository-scoped memory claim. | not established The limited Codex excerpt does not establish a persistent memory mechanism. | documented Claude Code documents auto memory as a repository-scoped store separate from human-authored CLAUDE.md files. |
Using the evidence
Codex supports limited excerpt-level statements. Claude Code supports architecture claims, not a full-prompt transcription.
Both products document repository guidance: Codex through AGENTS.md and Claude Code through scoped CLAUDE.md files. Claude Code's selected sources also establish a separate auto-memory mechanism.
Tool descriptions do not fully define what an agent may execute. Both products retain harness and configuration boundaries.
Primary-source trail
Each source links to its product evidence, with provenance and publication limits preserved.
Deeper cross-agent context
Open the six-product answer for broader evidence and scope.
Continue comparing