← Blog

Codex vs Claude Code: which one leaves a record you can sign?

Marco Masut

Codex and Claude Code are the two coding agents most often compared right now, and the comparison almost always stops at the same place: which one writes better code, faster, inside a session. For a team shipping production code, that is the easy half of the question.

Which is better, Codex or Claude Code?

Codex and Claude Code are both agentic coding tools: you give them a goal, they read the repository, edit files, run commands and report back. Codex is OpenAI's agent, available as a CLI, an IDE extension, a cloud agent and inside the ChatGPT apps. Claude Code is Anthropic's agent, available in the terminal, in IDEs, as a desktop app and on the web. On raw coding ability the two trade places depending on the task, the model version and the week, so no verdict lasts. The more durable difference is what each leaves behind once the session closes: a transcript in the tool's own format, a diff, maybe a pull request. Neither produces, on its own, a verifiable record of intent, execution and approval that a reviewer can sign. That gap is the same for both.

Two agents, two different ideas of a session

Codex is described by OpenAI as a coding agent that runs locally on your computer, and it also runs as a cloud agent and inside the ChatGPT apps. Its safety model is built around sandbox modes and approval policies: OpenAI's documentation shows a common preset pairing sandbox_mode = "workspace-write" with approval_policy = "on-request", and a read-only mode for inspection. Project instructions live in an AGENTS.md file.

Claude Code is Anthropic's agentic coding tool for terminal, IDE, desktop and web. It reads a CLAUDE.md file at the start of every session (and can read an existing AGENTS.md), supports hooks that run shell commands before or after its actions, and can run non-interactively with claude -p, for example inside GitHub Actions or GitLab CI/CD.

Different vocabulary, same shape: a goal goes in, edits and a summary come out.

What does Codex leave behind when it finishes?

When a Codex task completes you have the changes it made in the working tree or in a branch, the summary it wrote, and the session history kept by the tool. The cloud agent can propose its work as a pull request. What you do not get is a portable object that ties together the request, the context the agent was allowed to use, the commands it ran and the person who accepted the result. If the team changes tool next quarter, that history stays in the old tool's format.

What does Claude Code leave behind when it finishes?

Claude Code leaves the same kind of residue: the diff, the commit or pull request it created through git, and its own session history. It adds more places to encode rules, with CLAUDE.md, skills and hooks, and those files live in the repository, so they are versioned. That is a real advantage for repeatability. But the rules are inputs. They tell the agent how to behave. They are not evidence of what happened in a given run, and the session history is, again, the tool's own.

Side by side on the criterion nobody compares: residual proof

CodexClaude Code
MakerOpenAIAnthropic
Where it runsCLI, IDE extension, cloud, ChatGPT appsTerminal, IDE, desktop app, web
Project instructionsAGENTS.mdCLAUDE.md (can also read AGENTS.md)
GuardrailsSandbox modes and approval policiesPermissions and hooks
Output after the sessionDiff, summary, optional pull request, tool-owned historyDiff, commit or pull request, tool-owned history
Linked record of request, execution and approvalNot produced by the toolNot produced by the tool
If the team switches toolHistory stays behindHistory stays behind

Feature details change with every release, so check each vendor's documentation before deciding. The last two rows are the ones that do not change from one release to the next, because they describe a category limit, not a missing feature.

Why does this matter more than the benchmark?

The Stack Overflow Developer Survey 2025 reports that 69% of developers using coding agents say they got more productive individually, while only 17% say team collaboration improved. The distance between "I work faster" and "the team trusts what I produced" is where proof is missing, and choosing the better of the two agents shrinks it only a little. We cover the wider version of this argument in what coding agents leave as proof, and the same logic applied to a single tool in how to evaluate Claude Code for a team. The earlier comparison in the same series, Claude Code vs Cursor, reached the same conclusion.

How should a team choose between them?

For one developer on one task, it is a workflow preference: try both on a real ticket from your backlog, and pick the one whose way of asking for approval you can live with. Many teams keep both, because the cost of switching is low when the work is a diff.

For a team that answers to clients or auditors, use a different checklist:

  • Can you show, for each change, who asked for it and what context the agent was allowed to use?
  • Can you show what ran, and what verified it, independently of the agent's own report?
  • Is there a named person who approved the release, and can you prove it?
  • Does that evidence survive if you replace the agent next quarter?

If the answer to those is no for both tools, the choice between Codex and Claude Code is not the decision that protects you. The agents stay the executors. The layer above them is where the record lives, which is what Detent, the end-to-end delivery system (detent-ai.com), is built to hold. If you are at the stage of asking who signs what an agent ships, start with who signs what they ship and the governance framework for agent-written code.