I use both, often on the same project, and I built this website in Codex. This isn't a benchmark. It's where each one earns its place in my week, plus the use cases where someone else might choose differently.
The short version
Where Claude Code wins for me
Customizing how the agent works. Skills, subagents, hooks, plugins and MCP servers are all first-class, and /context and /skill-doctor show what each one costs. When I want to shape the workflow itself, this is where I go.
Enforcing rules, not just asking. Instructions in CLAUDE.md are guidance. Hooks and permission rules are enforcement, so if something must never happen, there's a place to guarantee it.
Long tasks with fewer interruptions. Auto mode lets a safety classifier review actions instead of stopping for every approval, and /goal keeps working until a condition is met.
Parallel and background work. /batch splits a large change across worktrees, /background frees the terminal, and /schedule sets up cloud routines that run without an open session.
Where Codex wins for me
A visual feedback loop. The built-in browser, browser annotations and Appshots let me point at the exact thing that's wrong instead of describing it. For a website, that shortens every round of changes.
Everything in one workspace. Previews, diffs, files, image generation and Sites sit next to the conversation in the ChatGPT desktop app.
Sandboxed by default. Codex runs local commands inside a sandbox that limits file and network access, and asks before crossing that boundary. Claude Code has a sandbox too, but you turn it on yourself.
It comes with ChatGPT. Codex is included in ChatGPT plans and shares usage with ChatGPT Work, so there's no separate subscription if you already pay for ChatGPT.
Where they're closer than people think
- Both keep going until done. Each has a
/goalcommand. - Both plan before editing. Claude Code has plan mode. Codex has
/plan. - Both read project instructions. Claude Code reads
CLAUDE.mdand Codex readsAGENTS.md, and one file can point to the other. - Both use skills and MCP. Skills follow the open Agent Skills standard, so one skill can serve both.
- Both work away from your desk. Claude Code has Remote Control and Codex has Remote, so you can check on work from your phone.
Which one fits your situation
| If you... | Consider | Why |
|---|---|---|
| Want to build your own agents on the same engine | Claude Code | The Agent SDK exposes the Claude Code agent loop to your own code |
| Deploy through AWS, Google Cloud or Microsoft Foundry | Claude Code | It runs on Amazon Bedrock, Google Cloud and Microsoft Foundry |
| Hand off tasks from Slack, Linear or GitHub issues | Codex | Cloud tasks start from those tools and run in isolated environments |
| Run lots of routine, high-volume tasks | Codex | Smaller models like GPT-5.6 Luna stretch usage limits further |
| Want to use a model from another provider | Codex | Codex can point at any provider that supports OpenAI's Responses API |
| Work mostly on Windows | Codex | The desktop app has a native Windows sandbox |
| Share a workspace with teammates who aren't developers | Codex | It lives in ChatGPT alongside Chat and Work |
| Care most about deep customization and guardrails | Claude Code | Hooks, permission rules and plugins give you the most control |
Using both without starting over
The hard part isn't picking a tool. It's keeping them from drifting apart.
- Keep one source of instructions. Write project guidance once and have the other tool's file reference it instead of repeating it.
- Share skills instead of copying them. Copies drift. One version referenced from both stays accurate.
- Pick by task, not loyalty. Send system-building to one and visual iteration to the other, and let the project files carry the context between them.
More on keeping a setup clean: How I Keep My Claude Code Setup From Drifting.
Go deeper: 5 Codex Features That Put It Back in My AI Stack · Claude Code Commands I Use on Repeat · ChatGPT Work vs Codex