Claude Code vs Codex:what differs in setup, plans and MCP.

Both are coding agents that read an instruction file, can plan before they edit and connect to tools over MCP. This article compares those parts as the official documentation describes them, and leaves the question of which is better to you.

macOS 14 or later. Reading is free; editing and reviews are one payment.

Quick answer

Claude Code vs Codex is mostly a question of setup. Claude Code reads CLAUDE.md, Codex reads AGENTS.md. Both have a plan mode, both connect to MCP servers, and both support skills built on the same open standard. They differ in file names, folders and settings, as the table below shows. Claude Code writes its plans to files by default, and Codex's documentation names no plan file. Both can connect to DotMD, so you can read and review what either one writes.

·

Claude Code vs Codex side by side

Every cell comes from the official documentation, checked in November 2026. "Not documented" means the docs we read say nothing about it.

Claude CodeCodex
Made byAnthropicOpenAI
Where it runsTerminal, VS Code and JetBrains extensions, a desktop app, and the webThe ChatGPT desktop app, Codex CLI, Codex IDE extension and Codex Cloud (also listed: ChatGPT mobile and web)
Instruction fileCLAUDE.md in the project, or ~/.claude/CLAUDE.md for all projects. Reads AGENTS.md only if there is no CLAUDE.mdAGENTS.md in the project, or ~/.codex/AGENTS.md globally. AGENTS.override.md takes priority in the same folder
Plan modeShift+Tab, /plan before a prompt, or claude --permission-mode plan/plan switches to plan mode, with an optional request after it
Where a plan is saved~/.claude/plans, or the folder set by plansDirectoryNot documented
MCP configurationclaude mcp add --transport http <name> <url>. Stored in ~/.claude.json, or .mcp.json for a project server[mcp_servers.<name>] in ~/.codex/config.toml, or .codex/config.toml in a trusted project. codex mcp add adds a server from the command line
Approvals and sandboxPermission modes: default, acceptEdits, plan, auto, dontAsk, bypassPermissionsapproval_policy (such as on-request or never) and sandbox_mode (read-only, workspace-write, danger-full-access)
Skills and reusable commandsSkills in .claude/skills/<name>/SKILL.md; older .claude/commands files still workSkills in .agents/skills in a repository and $HOME/.agents/skills for you; custom prompts are deprecated

Instructions: CLAUDE.md and AGENTS.md

Both files are plain Markdown that the agent reads at the start of a session. They hold commands, conventions and rules, and the agent treats them as guidance. Claude Code reads CLAUDE.md. Codex reads AGENTS.md: it starts at the project root and walks down to the current folder, and files closer to your folder come later and override earlier guidance.

In recent versions Claude Code can also read AGENTS.md, but only when there is no CLAUDE.md in your working directory or above it. If a project uses both agents, keep the shared rules in AGENTS.md and import them from CLAUDE.md with @AGENTS.md. The details are in CLAUDE.md vs AGENTS.md, and CLAUDE.md and AGENTS.md shows how to read and edit both in DotMD.

Planning: where the plan goes

In plan mode both agents propose a plan before they change your code. The difference that matters for review is where the plan ends up. Claude Code saves its plans as Markdown files, by default in ~/.claude/plans. Codex's documentation names no plan file, so ask for the plan as a file in a folder you choose.

A file can be read rendered, commented on and kept in git. A chat message cannot. The two guides cover each tool: Claude Code plan mode and Codex plan mode.

Connecting tools over MCP

Both agents are MCP clients, and both connect to DotMD's local MCP server. In Claude Code, run this once in Terminal:

claude mcp add -s user --transport http dotmd http://127.0.0.1:8089/mcp

In Codex, add this to ~/.codex/config.toml and restart Codex:

[mcp_servers.dotmd]
url = "http://127.0.0.1:8089/mcp"
tool_timeout_sec = 3600

Codex documents tool_timeout_sec with a default of 60 seconds, so DotMD asks for a longer one: Codex can then wait while you review. The guides Claude Code and Codex have the full steps.

Skills and reusable commands

Both docs describe skills as folders with a SKILL.md file and say they build on the open Agent Skills standard. The folders differ, as the table shows. Claude Code's custom commands have been merged into skills. Codex's custom prompts are deprecated in favour of skills. See Claude Code skills for the format.

Using both on one project

Nothing stops you from running both agents in one repository. Keep the shared rules in AGENTS.md, and let each agent write its plans and specs into the same folder. A useful split is that one agent writes and the other reviews. The reviewing agent leaves comments on the exact lines in DotMD, you keep the ones that matter, and the writing agent fixes them. The agents never talk to each other: the file and its comments carry everything, and you decide. See Agent reviews agent.

DotMD's list of all chats, grouped by agent: Claude Code, Codex and OpenCode, each chat with its workspace and date
Every chat with every agent, in one list.

How to choose between Claude Code and Codex

This page does not pick a winner, and the docs give no basis for one. Use facts about your own work:

  • Which one you already have an account for and a habit with.
  • Where you want it to run: in a terminal, in an editor extension, in a desktop app or in the cloud. Check the table for each tool's surfaces.
  • Which instruction file your repository already has.
  • How much you want to approve by hand. Compare the permission modes with the approval and sandbox settings.

Cursor is a third option with its own plan mode and MCP setup: see the Cursor guide.

Questions about Claude Code and Codex

What is the difference between Claude Code and Codex?

They are made by different companies, read different instruction files (CLAUDE.md and AGENTS.md), and configure MCP, approvals and skills in different places. Both have a plan mode and both support MCP servers.

Which is better, Claude Code or Codex?

This page makes no claim about quality. Choose by what you already use and where you want the agent to run.

Can I use Claude Code and Codex on the same project?

Yes. Share the rules in AGENTS.md, import it from CLAUDE.md, and let one agent review what the other writes.

Does Codex read CLAUDE.md?

Codex's documentation names AGENTS.md. It also lets you list other file names in project_doc_fallback_filenames in config.toml.

Can both connect to DotMD?

Yes. Both are MCP clients and connect to DotMD's local server. Reading is free; comments and reviews with agents need DotMD Reviewer, see pricing.

More questions