Codex vs Claude Code in November 2026: which agent fits your work

Codex vs Claude Code, checked November 16, 2026: default models, plans, sandboxing, AGENTS.md, MCP, hooks, CI, cloud agents, and dated benchmarks.

Published
Reading time
15 min read
Level
Intermediate
By
AI for Devs
TL;DR
  • As of November 16, 2026, Claude Code starts every paid plan on Claude Opus 5.5 at medium effort, and Codex points paid plans to GPT-6.1 Sol. The entry plan for each costs $20 a month.
  • The biggest Codex vs Claude Code difference is the default safety boundary. Codex runs commands inside an operating system sandbox with no network, while Claude Code starts in auto mode, where a classifier model reviews commands and the Bash sandbox stays off until you turn it on.
  • One instruction file now serves both agents: Codex reads AGENTS.md, and Claude Code reads it when no CLAUDE.md exists, or through an @AGENTS.md import.
  • On the third-party Terminal-Bench 4.1 board, Claude Code with Opus 5.5 resolves 65.76% of trials at $14.30 each, and Codex with GPT-6.1 Sol resolves 60.91% at $1.92 each.
  • Pick Claude Code for long interactive sessions and policy hooks; pick Codex for unattended runs, cost per task, native Windows, and GitLab cloud tasks.

Codex vs Claude Code is now a choice between two agents with mostly matching features: both run in a terminal, an IDE, a desktop app, and the cloud, and both read AGENTS.md, connect to MCP servers, and load Agent Skills. The differences that matter sit in the defaults, such as which model a session starts on, what a command can touch before anyone approves it, and what a solved task costs. Every claim below was checked against OpenAI's and Anthropic's own docs on November 16, 2026, for Claude Code v2.1.325 and Codex CLI 0.169.0. Model rankings live in the best LLM for coding comparison, so this page sticks to the two agent tools.

#Codex vs Claude Code at a glance

Claude Code and Codex cover the same surfaces and extension points. They differ in safety defaults, source licensing, model reach, and where cloud work can start. Both versions below were released on November 13, 2026.

Claude Code (Anthropic)Codex (OpenAI)
Version checkedv2.1.325CLI 0.169.0
SurfacesTerminal, VS Code and Cursor, JetBrains, desktop app, web, mobile, SlackTerminal, IDE extension for VS Code, Cursor, and Windsurf, Xcode and JetBrains integrations, ChatGPT desktop app, web, mobile, Slack, Linear
SourceProprietaryCLI and SDK under Apache 2.0; IDE extension and cloud closed
Default model on paid plansOpus 5.5, medium effortGPT-6.1 Sol, per OpenAI's guidance
Default local safetyAuto mode: a classifier reviews commands; Bash sandbox offAuto preset: OS sandbox, workspace writes only, no network
Project instructionsCLAUDE.md, or AGENTS.md when no CLAUDE.md existsAGENTS.md and AGENTS.override.md
Settingssettings.json at user, project, local, and managed levelsconfig.toml for user, trusted project, and managed requirements.toml
Headlessclaude -p, Agent SDK for Python and TypeScriptcodex exec, Codex SDK for TypeScript
CIanthropics/claude-code-action@v1openai/codex-action@v1
Cloud tasksCloud sessions; cloning needs GitHubCodex Cloud; GitHub, GitLab, or no repository
Model sourcesClaude models only, from Anthropic, Bedrock, Google Cloud, or FoundryAny Responses API provider, plus Ollama and LM Studio

Claude Code began reading AGENTS.md in v2.1.277 on September 18, 2026, and Codex CLI has an /import command that copies a Claude Code setup, so a team can trial both agents on one repository without rewriting its instructions.

#Default models and model choice

Claude Code starts on Claude Opus 5.5 and Codex starts on GPT-6.1 Sol for paid plans. Both switch models mid-session with /model and expose effort levels.

In Claude Code, the default setting resolves to Opus 5.5 on Pro, Max, Ultra, Team, Enterprise, the Anthropic API, Amazon Bedrock, and Google Cloud. Microsoft Foundry still defaults to Sonnet 4.5. Opus 5.5, Sonnet 5.5, and Haiku 5.5 start at medium effort, with low through max available. Fable 5.2, Anthropic's most capable model, is never the default; select it with /model fable. Pro bills Fable to usage credits, and Max and Ultra include it for up to half the weekly limit.

Codex reads the model from config.toml, and with none set it uses a recommended model from OpenAI's catalog. After GPT-5.5 retired from ChatGPT sign-in on October 14, 2026, OpenAI's guidance is GPT-6.1 Sol on Plus, Pro, Business, Enterprise, and Edu, and GPT-6 Luna on Free and Go. GPT-6 Astra is the most capable option, GPT-6.1 Terra the fast one, and GPT-6.1 Sol runs with a 500,000-token default context window in Codex. Effort runs from Low to Extra High, plus Max and an Ultra setting that splits a task across subagents.

The tools part ways on models from other vendors. Claude Code reaches Claude models through Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or any gateway that speaks the Anthropic format, and Anthropic does not support routing it to non-Claude models. Codex accepts any custom provider with a compatible Responses API endpoint and ships built-in ollama and lmstudio providers for local models.

#Plans and pricing on November 16, 2026

Both vendors charge $20 a month for the entry plan that includes the CLI, and both sell heavier individual plans at $100 and $200. Codex adds a free tier, an $8 Go plan, and a $500 Pro option, while Claude's free plan has no Claude Code.

Plan levelClaude, for Claude CodeChatGPT, for Codex
Free$0; no Claude Code$0; GPT-6 Luna in the desktop app, subject to rollout
Low costNoneGo, $8 a month; GPT-6 Luna in the desktop app
EntryPro, $20 monthly or $17 a month billed annuallyPlus, $20 a month; CLI, IDE extension, web, iOS, code review, GPT-6.1 Sol
Heavy useMax, $100: 5x Pro usage per 5 hours and per week, $100 of API credits. Ultra, $200: 10x Pro weekly usage, no 5-hour limit for verified accounts, $200 of API creditsPro at $100, $200, or $500 a month; no five-hour limit; Ultrafast mode on $500
TeamStandard seat $25 monthly or $20 annually; Premium seat $125 or $100, with 5x Standard usageBusiness, $25 per user monthly or $20 annually, 2 users or more
Enterprise$20 per seat a month billed annually, 20-seat minimum, usage at API ratesContact sales; flexible pricing runs on credits
Pay per tokenAnthropic Console API keyOpenAI API key, without cloud features

Anthropic publishes no message count for Claude Code. OpenAI publishes estimates for Codex: Plus covers 15 to 160 local GPT-6.1 Sol messages per five-hour window, 5 to 45 on GPT-6 Astra, and 350 to 3,000 on GPT-6 Luna, with weekly limits on top. Anthropic says enterprise deployments of Claude Code average about $13 per developer per active day, and its plan usage is shared with Claude on the web, desktop, and mobile.

With an API key, you pay token rates instead. Claude Opus 5.5 costs $4 per million input tokens and $20 per million output, and GPT-6.1 Sol costs $2 and $10 at short context, rising to $4 and $15 at long context. Codex on a ChatGPT plan charges no long-context surcharge for GPT-6.1 Sol. The Claude API pricing guide and the LLM pricing dataset carry the full rate tables.

Speed costs extra on both. Codex Fast mode draws on included limits at 2.5x the Standard rate, and Anthropic's fast mode for Opus 5.5 and Fable 5.2 runs up to 2.5x faster at 2x standard pricing.

#Sandboxing and approval modes compared

Codex fences commands with the operating system by default, while Claude Code reviews them with a second model by default. That difference decides how much you can leave either agent unattended.

Codex's Auto preset pairs a workspace-write sandbox with on-request approvals. Commands run inside Seatbelt on macOS, bubblewrap on Linux and WSL2, or the native Windows sandbox, with writes limited to the workspace and network access off. Going outside the workspace or onto the network triggers an approval prompt, and .git, .codex, .agents, and .aws stay read-only inside the workspace. For a folder outside version control, Codex recommends read-only mode instead.

Setting approvals_reviewer = "auto_review" sends eligible prompts to a reviewer agent that checks for data exfiltration, credential probing, and destructive actions, and fails closed on errors. The --yolo flag removes both the sandbox and the prompts.

Claude Code v2.1.283 and later start interactive sessions in auto mode. Reads and edits in the working directory run, and nearly everything else goes to a classifier, Claude Sonnet 5 by default. It blocks actions that escalate beyond your request, target unrecognized infrastructure, or appear driven by hostile content. The Bash sandbox, built on Anthropic's open-source sandbox runtime, stays off until you run /sandbox, and it works on macOS, Linux, and WSL2 only. On native Windows, Claude Code runs commands unsandboxed.

At launch, Codex runs project commands inside an operating system sandbox and asks before network access or outside edits, while Claude Code sends those actions to a classifier model; headless runs of both refuse edits by defaultCodexAuto presetClaude Codeauto modecodex execheadlessclaude -pheadlessRead a project filerunsrunsrunsrunsEdit a project filerunsrunssandbox blocksdeniedRun a build or testruns in OS sandboxclassifier reviewssandbox blocksdeniedReach the networkasks youclassifier reviewssandbox blocksdeniedEdit outside the projectasks youclassifier reviewssandbox blocksdeniedruns without askingasks youclassifier model reviewsdenied or blocked
Fig. 1At launch, Codex fences commands with the operating system and asks before leaving the fence, while Claude Code sends the same actions to a classifier model. In headless runs, both refuse edits until you widen their permissions.

Headless runs are stricter in both tools. codex exec starts in a read-only sandbox, and from v2.1.302 claude -p starts in Manual mode, denying any call that needs approval unless an allow rule, hook, or callback approves it. Destructive MCP tool calls get a check in both: Codex always prompts when a tool advertises a destructive annotation, and Claude Code's classifier reviews MCP calls in auto mode.

Anthropic's own docs warn that auto mode reduces prompts but does not guarantee safety. For unattended local work, the OS boundary Codex applies by default is the stronger guarantee. Claude Code reaches the same place once you turn on its sandbox or run it inside a container.

#AGENTS.md and CLAUDE.md: one file for both agents

Keep your rules in AGENTS.md and add a CLAUDE.md that imports it. Codex ignores CLAUDE.md by default, and Claude Code skips AGENTS.md once any CLAUDE.md exists.

Codex builds its instruction chain once per session: ~/.codex/AGENTS.md first, then one file per directory from the repository root down to the working directory, checking AGENTS.override.md before AGENTS.md. It stops adding files at 32 KiB by default, set by project_doc_max_bytes. Claude Code v2.1.277 and later load AGENTS.md only when no CLAUDE.md, .claude/CLAUDE.md, or CLAUDE.local.md sits in the working directory or above it.

Codex and Claude Code read the same rules only when the repository has AGENTS.md alone, or a CLAUDE.md that imports AGENTS.mdCodex loadsClaude Code loadsSame rulesAGENTS.md onlyno CLAUDE.md anywhereAGENTS.mdAGENTS.mdCLAUDE.md onlyno AGENTS.mdno project fileCLAUDE.mdBoth filesCLAUDE.md has no importAGENTS.mdCLAUDE.md onlyBoth filesCLAUDE.md starts with @AGENTS.mdAGENTS.mdCLAUDE.md + AGENTS.mdshared AGENTS.md rulesClaude-only rulesno project fileboth agents match
Fig. 2Both agents read the same rules only when the repository has AGENTS.md alone, or a CLAUDE.md that imports it. A CLAUDE.md without the import hides AGENTS.md from Claude Code, and Codex never reads CLAUDE.md unless you list it as a fallback filename.

The fourth row is the layout to use. The import line comes first, and anything only Claude Code needs goes below it:

CLAUDE.md
markdown
@AGENTS.md
 
## Claude Code only
 
Ask before running database migrations.

Settings live in different files. Claude Code uses JSON settings.json files, and Codex uses config.toml in ~/.codex or a trusted project's .codex folder. Codex CLI's /import command converts a Claude Code setup: instruction files become AGENTS.md, settings.json becomes config.toml, and up to 50 chats from the last 30 days come along. Context engineering covers what to put in the file and how to keep it short.

#MCP, skills, subagents, and hooks

Both agents implement MCP and the open Agent Skills format, so servers and SKILL.md folders move between them with little change. The gaps are in delegation and hooks: Claude Code delegates to subagents without being asked and fires hooks at 33 lifecycle events, while Codex delegates when asked and fires hooks at 14.

Extension pointClaude CodeCodex
MCP transportsstdio, HTTP, WebSocket, and SSE (deprecated)STDIO and streamable HTTP
MCP config~/.claude.json for local and user scope, .mcp.json for project scope~/.codex/config.toml or a trusted .codex/config.toml, shared by app, CLI, and IDE
Skills.claude/skills/<name>/SKILL.md, run as /name or loaded automatically.agents/skills up to the repository root and in your home folder, run as $name or loaded automatically
SubagentsBuilt-in Explore and Plan; custom Markdown agents in .claude/agents/; delegates when a task matches an agent's descriptionDelegates when you ask, when AGENTS.md or a skill says to, or on its own at Ultra effort; custom TOML agents in .codex/agents/
Hooks33 events; command, HTTP, MCP tool, prompt, and subagent handlers14 events; scripts or MCP tools; non-managed hooks need trust before they run

An MCP server you build works in both, since each takes the same stdio command or streamable HTTP URL, and building an MCP server walks through one. Codex reads each server's instructions field, and OpenAI advises keeping its first 512 characters self-contained.

Because Claude Code delegates by description, a well-described reviewer subagent runs without a prompt, while Codex waits for you, AGENTS.md, or a skill to ask. Claude Code's agent teams, which coordinate several full sessions, are experimental and off by default.

Claude Code's 33 hook events include PreToolUse, PermissionRequest, FileChanged, WorktreeCreate, and PreModelSwitch. Codex's 14 events include PreModelRequest and PostModelRequest, which fire around every model call. If your team enforces rules in code around the agent, Claude Code gives you more places to do it.

#Headless runs, CI, and cloud agents

Both tools run unattended from a script, a GitHub workflow, or the vendor's cloud. Codex has safer defaults in untrusted checkouts and reaches more repository hosts from its cloud, and Claude Code has more ways to trigger a cloud run.

claude -p and codex exec both print the final answer to stdout. Claude Code adds --output-format json or stream-json, and a --bare flag that skips hooks, skills, MCP servers, and CLAUDE.md, which Anthropic plans to make the default for -p. Without --bare, a -p run in a folder you never trusted still runs that folder's hooks and connects its .mcp.json servers. codex exec streams JSON Lines with --json and checks the final answer against a schema with --output-schema. Since 0.169.0, it keeps project config and MCP servers off in untrusted directories unless you pass --trust.

In GitHub Actions, anthropics/claude-code-action@v1 answers @claude mentions in issues and pull requests and can push commits, and /install-github-app sets it up from the CLI. openai/codex-action@v1 installs the CLI, starts a Responses API proxy so the key stays out of the job's environment, and runs codex exec. Each vendor also offers a managed pull request review, and both document GitLab setups.

Cloud sessions run Claude Code on Anthropic-managed infrastructure for Pro, Max, Ultra, and Team plans, and for Enterprise premium seats. claude --cloud sends a task from the terminal, and scheduled tasks, in research preview, fire on a schedule, an API call, or a GitHub event. Cloning and pull requests in Anthropic-hosted environments require GitHub. Codex Cloud starts tasks from the web, the desktop app, mobile, or codex cloud exec, can begin with no repository, and checks out GitHub or GitLab repositories through reusable environments.

#Benchmark results and who ran them

On third-party boards, Claude Code holds the top score and Codex holds the lower cost per task. Every row pairs an agent with a model, and no board runs one model in both agents, so these numbers compare products rather than agent loops alone.

Terminal-Bench 4.1, hosted by Stanford, Harbor, and Laude Institute, updated its task verifiers on November 9, 2026, and runs 66 tasks five times each. Each row names the maker of its agent and model but not who submitted the run. On November 16, the best Claude Code rows were Opus 5.5 and Fable 5.2 at max effort, both at 65.76%, and the best Codex row was GPT-6.1 Sol at max effort, at 60.91% ±2.97.

On Terminal-Bench 4.1, Claude Code rows reach 65.76 percent at 14.30 dollars or more per trial, Codex with GPT-6.1 Sol reaches 60.91 percent at 1.92 dollars, and Claude Code with Kimi K3.1 Pro reaches 59.70 percent at 3.29 dollarsTerminal-Bench 4.1 resolution rate (%), by cost per trial (log scale)10203040506070$0.25$0.50$1$2$4$8$16$32$64Opus 5.5Fable 5.2Sonnet 5.5Haiku 5.5Kimi K3.1 ProDeepSeek V4.1 FlashGPT-6.1 SolGPT-6 AstraGPT-6.1 TerraGPT-6 LunaClaude Code, Opus 5.5: 65.76% at $14.30 a trialClaude Code, Kimi K3.1 Pro: 59.70% at $3.29 a trialCodex, GPT-6.1 Sol: 60.91% at $1.92 a trialClaude Code, Claude modelClaude Code, other modelCodex, OpenAI model
Fig. 3Claude Code rows hold the top Terminal-Bench 4.1 score, and Codex rows hold the low-cost end. Claude Code with Kimi K3.1 Pro lands beside Codex with GPT-6.1 Sol, so the model moves cost more than the agent does.

The cost per solved trial widens the gap. This script divides each row's published total cost by its trials and its resolved trials, and it ran on Python 3.15.1 with no dependencies:

tb_cost.py
Python
TRIALS = 330  # 66 tasks, 5 trials each
 
rows = [
    # agent, model, resolved trials, total cost in USD
    ("Claude Code", "Opus 5.5", 217, 4718.65),
    ("Claude Code", "Kimi K3.1 Pro", 197, 1086.66),
    ("Codex", "GPT-6.1 Sol", 201, 634.24),
    ("Codex", "GPT-6 Astra", 199, 3267.18),
]
 
for agent, model, solved, cost in rows:
    print(
        f"{agent:<12} {model:<14} {solved / TRIALS:6.2%}"
        f"  ${cost / TRIALS:6.2f} a trial  ${cost / solved:6.2f} a solved trial"
    )
Text
Claude Code  Opus 5.5       65.76%  $ 14.30 a trial  $ 21.74 a solved trial
Claude Code  Kimi K3.1 Pro  59.70%  $  3.29 a trial  $  5.52 a solved trial
Codex        GPT-6.1 Sol    60.91%  $  1.92 a trial  $  3.16 a solved trial
Codex        GPT-6 Astra    60.30%  $  9.90 a trial  $ 16.42 a solved trial

Artificial Analysis runs its own Coding Agent Index v2.1, built from FrontierCode-AA 2.0, Terminal-Bench 4.1, and SWE-Atlas-QnA-AA, and dates no individual row. Its headline pair puts Claude Code with Fable 5.2 at xhigh effort at 58 against Codex with GPT-6 Astra at max at 53. Claude Code took 94.7 turns and 9.75 million tokens per task against 40.8 turns and 3.47 million for Codex, and cost $15.47 per task against $7.63. At matched scores the costs split the same way: Codex with GPT-6.1 Sol scored 52 at $1.51 a task, and Claude Code with Fable 5.2 at medium effort scored 53 at $2.89.

The Claude Code rows for Kimi K3.1 Pro and DeepSeek V4.1 Flash show the agent running other vendors' models, a setup Anthropic does not support. To choose a model rather than an agent, use the best LLM for coding picks.

#Run Codex and Claude Code through one gateway

A gateway between both agents and the providers gives one place to hold provider keys, set budgets, and log every request, and it lets you change models without touching each laptop. Bifrost, an open-source AI gateway, has documented setups for both agents.

Claude Code connects through the Anthropic-compatible /anthropic path: set ANTHROPIC_BASE_URL to the gateway and ANTHROPIC_AUTH_TOKEN to a Bifrost virtual key. To keep billing on Claude subscriptions, sign in with /login and send the virtual key in an x-bf-vk header instead, so Bifrost applies governance and logging while plan limits still apply.

Codex CLI connects as a named custom provider on the /openai/v1 path:

~/.codex/config.toml (not run here)
TOML
model = "openai/gpt-6.1-sol"
model_provider = "bifrost"
 
[model_providers.bifrost]
name = "Bifrost"
base_url = "http://localhost:8080/openai/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"
requires_openai_auth = false
supports_websockets = false

Codex appends /responses to the base URL, so the trailing /v1 is required, and OPENAI_API_KEY holds the virtual key. Codex signed in with ChatGPT can also pass through Bifrost with the key in an x-bf-vk header, but routing, fallbacks, and non-OpenAI models do not apply on that path. The Bifrost CLI skips the file edits and launches either agent with the gateway, credential, and model set for that process only:

not run here
Shell
bifrost claude --model anthropic/claude-opus-5-5
bifrost codex --model openai/gpt-6.1-sol

Comparing models in one agent comes down to routing rules, CEL expressions scoped to a virtual key, team, customer, or the whole gateway. A rule can rewrite the model name Claude Code sends for its sonnet alias, so the same client can run Opus 5.5 one week and Sonnet 5.5 the next. Keep a recognizable Claude model name in that value if you rely on auto mode, because an arbitrary alias can stop Claude Code from treating the model as auto-mode capable. Codex needs the full provider/model ID at launch, and a non-OpenAI model must handle Responses tool calls through Bifrost.

Budgets sit on each developer's virtual key and reset daily, weekly, monthly, quarterly, or yearly, alongside token and request limits per minute, hour, or day. They nest from customer to team to virtual key to provider config, and a request must pass every level. Both agents send a session header that Bifrost uses for session affinity, so a session and its subagents stay on one provider and key and keep hitting the same prompt cache. The skills repository can also serve as a skills marketplace for both agents, so one versioned SKILL.md reaches each.

Both agents mostly run on employee laptops, outside any shared config. Bifrost Edge extends the gateway's governance to those machines: it routes traffic from Claude Code, Codex CLI, and the Codex desktop app through the same gateway, so the budgets, guardrails, and audit logs set there apply without per-laptop setup. Edge requires the Enterprise gateway, and its supported applications page lists what it covers. The Bifrost details here describe its docs as of November 16, 2026.

#Codex or Claude Code: picks by situation

If you can fund only one, choose Claude Code for long interactive sessions on hard code and for teams that enforce policy through hooks. Choose Codex for unattended runs, cost per solved task, native Windows, local models, and cloud tasks on GitLab. The table gives one pick per situation, dated November 16, 2026.

SituationPickEvidence
Long interactive sessions on hard problemsClaude CodeTop Terminal-Bench 4.1 rows at 65.76%; Opus 5.5 by default
Unattended local runsCodexOS sandbox with no network by default; codex exec starts read-only and ignores untrusted project config
Cost per solved taskCodex with GPT-6.1 Sol$3.16 per solved Terminal-Bench 4.1 trial, against $21.74 for Claude Code with Opus 5.5
Native WindowsCodexNative Windows sandbox; Claude Code's sandbox needs WSL2
Policy enforced around the agentClaude Code33 hook events with HTTP, MCP tool, prompt, and subagent handlers
Cloud tasks on GitLab or with no repositoryCodexCodex Cloud checks out GitLab repositories and can start empty
Local or open-weight modelsCodexBuilt-in Ollama and LM Studio providers; Claude Code supports Claude models only
Source you can read and patchCodexCLI is Apache 2.0; Claude Code is proprietary
A team using bothBoth, behind one gatewayOne AGENTS.md, one budget per developer, one log for both agents

To settle it on your own code, take 10 to 20 recent merged tasks, give both agents the same AGENTS.md and a matched effort level, and count the diffs you would merge per dollar spent. Rerun that set when the coding agents hub or the news feed reports a new model or a changed default. Both tools changed defaults this fall: Claude Code moved to auto mode in v2.1.283 on September 25, 2026, and Codex replaced GPT-5.5 for ChatGPT sign-in on October 14.

#Questions

Is Codex better than Claude Code?

Neither wins everywhere as of November 16, 2026. Claude Code with Opus 5.5 posts the higher Terminal-Bench 4.1 score, 65.76%, while Codex with GPT-6.1 Sol reaches 60.91% at about one-seventh the cost per solved trial. Codex has the safer local defaults and a native Windows sandbox. Claude Code has more hook events and delegates to subagents without being asked.

Which is cheaper, Codex or Claude Code?

The entry plans cost the same, $20 a month for Claude Pro or ChatGPT Plus. Codex also runs on a free tier and an $8 Go plan with GPT-6 Luna, while Claude's free plan has no Claude Code. Per task, Codex costs less: on Terminal-Bench 4.1, GPT-6.1 Sol in Codex cost $1.92 per trial against $14.30 for Opus 5.5 in Claude Code.

Does Claude Code read AGENTS.md?

Yes. Claude Code v2.1.277 and later load AGENTS.md as project instructions when no CLAUDE.md, .claude/CLAUDE.md, or CLAUDE.local.md exists in the working directory or above it. When a CLAUDE.md exists, Claude Code reads only that file unless it imports AGENTS.md with an @AGENTS.md line. Codex reads AGENTS.md and ignores CLAUDE.md unless you list it as a fallback filename.

Can Claude Code use OpenAI models, or Codex use Claude models?

Both can reach other vendors through a gateway, but only OpenAI supports it. Anthropic does not support routing Claude Code to non-Claude models, although Terminal-Bench 4.1 lists Claude Code runs with Kimi and DeepSeek models. Codex accepts any custom provider with a compatible Responses API endpoint, so a gateway that translates those calls can serve other models, and it ships Ollama and LM Studio providers.

Is Codex open source?

The Codex CLI and Codex SDK are open source under Apache 2.0 in the openai/codex repository on GitHub. The IDE extension and Codex Cloud are not. Claude Code is not open source: its GitHub repository holds the changelog, plugins, and examples under an all-rights-reserved notice tied to Anthropic's commercial terms, although the runtime behind its Bash sandbox is an open-source package.

Which coding agent is safer to run unattended?

Codex, at default settings. It runs commands inside an operating system sandbox with writes limited to the workspace and no network, and codex exec starts read-only. Claude Code starts interactive sessions in auto mode, where a classifier model reviews commands but the Bash sandbox stays off until you enable it. Turn that sandbox on, or use a container, before long unattended Claude Code runs.

Can a team use Codex and Claude Code together?

Yes, and it takes less setup than it did a year ago. Keep project rules in AGENTS.md with a CLAUDE.md that imports it, reuse the same MCP servers and SKILL.md skills, and route both agents through one gateway so each developer has one budget and one log stream. Codex CLI's /import command copies an existing Claude Code setup into Codex.