# Codex vs Claude Code 2.0: A CTO's 9 Part Real-World Test
<!--
ref: @content/youtube/patrick-ellis/2025-10-17-codex-vs-claude-code-2-real-world-test
version: 3
updated_at: 2026-10-31T19:26:22.288Z
-->

Patrick Oakley Ellis (2025-10-17): Ellis compares Codex and Claude Code 2.0 with Sonnet 4.5 across nine dimensions while building a large web application, and concludes the answer is not a single winner but a division of labor.

*Synthesized from Patrick Oakley Ellis on Patrick Oakley Ellis, 2025-10-17.*

Patrick Oakley Ellis is CTO and co-founder of a Seattle-based AI-native startup working with companies including Google, Amazon, FIFA, and Disney; he has run Claude Code heavily since February and Codex since its May release.

## Core Thesis

Ellis compares Codex and Claude Code 2.0 with Sonnet 4.5 across nine dimensions while building a large web application, and concludes the answer is not a single winner but a division of labor. Sonnet 4.5 wins on model autonomy and context self-management, Claude Code wins decisively on the CLI harness, and Codex wins on IDE integration and its cloud environment — a category Anthropic simply does not compete in. His resolution is to use each where its temperament fits: Codex Cloud for parallel exploration and research, Sonnet 4.5 for hands-on implementation, and each model reviewing the other's output.

## Key Insights

- Sonnet 4.5 leads SWE-bench Verified and the usual benchmarks, but Ellis's practical observation is grittiness: set loose in a codebase it plans for itself, greps around gathering context, and writes internal markdown artifacts to persist memory state. On a one-shot task migrating data models off a legacy Python Django stack onto a modern JavaScript/React stack, Sonnet 4.5 solved it directly where both Codex and Opus required him to decompose the research into separate steps.
- Speed turned out to matter more than he expected. Sonnet 4.5 is substantially faster than Codex, and the tighter synchronous iteration compounds into more shipped work per day.
- Sonnet 4.5 writes its own scripts and tests to build validation loops, so it can tell quickly whether an approach is wrong rather than continuing down it.
- He believes Sonnet 4.5 is the only model aware of its own context window, citing a Cognition report: as it nears the limit it documents more of its state and reasons less, trying to land an answer before the window closes. In practice he stopped worrying about compaction, which is what lets him assign longer tasks.
- The stated task-duration ceilings differ by roughly 4x: OpenAI cites Codex running up to about 7 hours on a task, Anthropic cites Sonnet 4.5 at 30+ hours.
- Where Codex still wins on model quality: raw front-end UI/UX work from a generic prompt with no style guidance, and deeper architectural or back-end reasoning. Sonnet 4.5 closes the front-end gap once given real context — a style guide, or a screenshot loop through Playwright.
- The CLI harness is not close, in his assessment. Claude Code's `/add-dir` lets him attach another service's directory and have the model crawl, map, and integrate it; `/context` shows what is actually filling the window. Anthropic has also shipped a memory tool and the Claude Agent SDK (renamed from the Claude Code SDK) with example slash commands for security and code review. Codex's counterweight is being open source with community development and, in theory, bring-your-own-model.
- Codex's biggest CLI gap is the absence of sub-agents. Ellis treats sub-agents primarily as a context-management mechanism: scope specific MCPs, system prompts, and task context to a delegate so none of it pollutes the main thread.
- IDE integration inverts the result. Claude Code's VS Code extension is essentially a GUI wrapper on the CLI; Codex's inherits context from the editor (which tabs and files are open), has more sophisticated retrieval, and — the feature he calls a killer use case — hands a local task up to Codex Cloud carrying session context, then pulls the work back down and applies the diff locally.
- Codex Cloud has no Anthropic equivalent: connect a repo through GitHub, spin up a container, and run a swarm of one to four agents doing in the cloud what you would do locally. Ellis frames it through the "abundance mindset" he credits to Greg and others on the OpenAI side — kick off several agents on a migration, security updates, or a legacy-service rewrite and compare real code that comes back. He finds it best for exploration and learning plus smaller front-end changes; when he wants tighter steering he returns to the CLI or IDE. The second benefit is unblocking the local machine while delegated work runs.
- Both have strong GitHub agents — tag `@claude` or `@codex` in an issue or comment to implement changes, plus automatic review on push or PR. He gives a slight edge to Claude Code for extensibility with MCPs and Anthropic's open-sourced review workflows, while preferring Codex's out-of-the-box reviewer for finding nuanced bugs without padding the thread; Claude's security-review agent is comparably succinct.
- The roadmap difference is philosophical. OpenAI is AGI-pilled — Codex Cloud is a step toward a fully autonomous asynchronous software development agent targeted for year-end. Anthropic is tactical and feedback-driven, and Claude Code's harness reflects it: no embeddings or RAG-style retrieval, just grep, markdown files, and CLI tools that already exist. Ellis finds Anthropic's approach more useful day to day while calling the OpenAI vision exciting but further out.
- Two context hygiene tips: in `config.toml` for the Codex CLI, enable web search (accepting the security tradeoff) so the model can find documentation and run agentically for longer; and audit context for poisoning, since a single MCP can expose 25+ tools whose names and descriptions both bloat the window and confuse tool selection.
- His research-to-agent pipeline: run deep research (Gemini Deep Think is his preference) to acquire world-class practice in a domain he is not expert in — SEO, front-end design, architecture, data modeling, QA — then have a model compress it into an actionable checklist or system prompt, which becomes a sub-agent, a section of CLAUDE.md, or a PRD. He notes this is also how junior teammates get up to speed on a workflow quickly.
- Model temperament as a routing rule: Sonnet 4.5 reads as a startup entrepreneur — tactical, hands-on, learns by testing and iterating; Codex reads as an academic, measure twice cut once. He wants the former trying things in the weeds and the latter thinking systematically about analysis.

## Actionable Takeaways

1. Route by temperament, not by loyalty: Codex Cloud for parallel research, exploration, and skeleton scaffolding; Sonnet 4.5 in Claude Code for implementation; feed Codex's research output into PRDs that Sonnet implements.
2. Cross-review across vendors — have Claude Code security-audit anything Codex generated and Codex review anything Claude Code generated. The value is the differing perspective, not redundancy.
3. Use sub-agents as your context firewall: scope MCPs, system prompts, and gathered task context to the delegate so the main thread stays clean. This is the concrete reason to prefer the Claude Code harness today.
4. Audit what is in the window before blaming the model. Run `/context`, and disable MCPs you are not using in the current task — one server can inject 25+ tool definitions that degrade tool selection.
5. Enable web search in the Codex CLI's `config.toml` if the security posture allows, so the agent can pull documentation mid-run instead of stalling.
6. Use `/add-dir` to attach sibling service directories when doing cross-service integration or migration work, rather than copying context by hand.
7. To bootstrap expertise you lack, run a deep research report on best practice in that discipline, compress it into a checklist or system prompt, and install it as a sub-agent or CLAUDE.md section.

## Notable Quotes

> "For the CLI agent, I definitely have to give the win to Claude Code." — Patrick Oakley Ellis

> "Anthropic doesn't have a cloud environment. So this is a huge win for Codex." — Patrick Oakley Ellis

> "I find myself almost not concerned about when it was compacting, which allows me to just let this run for much longer." — Patrick Oakley Ellis, on Sonnet 4.5

> "Codex is measure twice cut once, where Sonnet 4.5 is more of a cut twice measure once." — Patrick Oakley Ellis, relaying a framing from X

> "It's really important to make sure that you're only exposing the tools that are needed in a given time." — Patrick Oakley Ellis

> "We just need to create the environments where they can truly thrive." — Patrick Oakley Ellis

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*