Skip to content
86% off$349 $48.86code BF2026

Guides

Codex vs Claude Code: Which Is Better? Compare Side by Side

Run Codex and Claude Code on the same task in separate git worktrees, then compare the diffs, cost and effort yourself. Manual and Sledbot methods.

GuideUpdated 8 min read

On this page

"Which is better, Codex or Claude Code?" Threads on Hacker News disagree. Some people call Codex "more hands off," others say it follows instructions better, others ask whether it is really on par. Several replies suggest trying each for a week on your own work. This guide shows how to do that without the two agents overwriting each other.

Why the internet can't settle this

Both agents change often, and the result depends on your repo, your prompt and your instructions files. A review from someone else's codebase tells you little about yours. Some differences are also about workflow, not quality: one tool may stop to ask more often, another may run longer unattended. Whether that is better depends on how you like to work. The only answer that holds up is the one from your own code.

What makes the comparison fair

Check these first. Otherwise you are comparing your setup, not the agents.

  • Same starting commit. Commit or stash first. A new worktree is created from a commit, so uncommitted edits are not copied into it.
  • Separate working folders. Never point both agents at the same folder.
  • Same prompt, pasted verbatim. Write it once, paste it twice.
  • Same project instructions. If you keep an instruction file for each agent, make sure they say the same thing.
  • Same setup in each folder. A fresh worktree has no node_modules, no .env and no build output. Install and copy before you start.
  • Both logged in. As of November 2026, Codex CLI is free, open-source software, but usage comes from your ChatGPT plan or an API key. Claude Code needs a paid Claude plan or an Anthropic Console account. Running both draws on both.

One task is one sample. Run three to five tasks that look like your real work: a bug fix, a small feature, a refactor.

Method 1: run both by hand with git worktrees

This needs only Terminal and git. If Claude Code is not installed yet, see how to install Claude Code on a Mac.

  1. In your repo, run git status and confirm it is clean.

  2. Create one worktree per agent. Replace myrepo with your folder name:

    bash
    git worktree add -b compare/claude ../myrepo-claude
    git worktree add -b compare/codex ../myrepo-codex

    Each command creates a new branch from your current commit in a sibling folder.

  3. Open two Terminal windows. In one, cd ../myrepo-claude and run claude. In the other, cd ../myrepo-codex and run codex (run codex login first if needed).

  4. Install dependencies in both folders, then paste the same prompt into each agent.

  5. While they work, note how often each stops to ask permission and how long it takes.

  6. Commit each result so you can diff them:

    bash
    git -C ../myrepo-claude add -A
    git -C ../myrepo-claude commit -m "claude attempt"
    git -C ../myrepo-codex add -A
    git -C ../myrepo-codex commit -m "codex attempt"

    add -A stages new files too, so make sure .gitignore covers node_modules and build output first.

  7. From your main repo, compare the branches:

    bash
    git diff --stat compare/claude compare/codex
    git diff compare/claude compare/codex

    The first lists which files differ and by how much. The second shows every line.

The manual route gives you two windows and git diff. It has no hunk-by-hunk review and no single place showing which agent is waiting on you.

Method 2: compare side by side in Sledbot

We make Sledbot, so weigh this section accordingly. The manual method works, and for a one-off test it may be all you need. Sledbot saves the setup and adds a review step. It runs the CLI agents you already use through their own logins, and both Claude Code and Codex CLI are on its supported list.

Requirements: the folder must be a git repository, and starting agents needs an active 7-day trial or a MacSuite license.

  1. Add your project with File ▸ Add Project Folder… (⌘O), or drag the folder onto the sidebar. It becomes a space.
  2. Choose Agents ▸ Compare Agents…, or press ⌘K and pick Compare agents….
  3. Describe the task, pick Claude Code and Codex CLI, and click Start 2 agents.
  4. Each agent gets its own worktree on a branch named compare/<slug>-<agent>-<n>, and they open side by side in one tab. Compare accepts up to 4 agents, so Gemini CLI or another agent can be a third contestant.
  5. Let them work. Each shows a live status: working, needs you, or done. Approval requests and questions collect under Needs you, and ⌘J jumps to the next agent waiting for an answer.

Your own checkout is not touched while they work. Nothing reaches your branch until you merge.

If your project needs setup in a fresh worktree, Sledbot reads setup and copy entries from .sledbot/config.json at the repo root, for example {"setup": ["npm ci"], "copy": [".env"]}. Still check in each worktree that dependencies and .env are actually there before you trust a result.

Review each result

When an agent finishes, click Review changes in its header, or Review on its Board card. The review shows everything it changed against the base branch, one hunk at a time:

  • Accept (A) stages the hunk in that agent's worktree.
  • Reject (R) restores the original.
  • Comment (C) sends your note, with file and line, to that agent's terminal.

Merge and Open PR unlock only after every hunk is reviewed. Merge runs git merge --no-ff --no-edit in your main checkout, which must be on the base branch. Open PR needs the GitHub CLI (gh). See reviewing an agent's changes. To clear leftovers, use the space's Clean up worktrees… item and check what it lists first.

Method comparison

Two terminals, same folderManual worktreesCompare Agents
Agents stay out of each other's wayNoYesYes
SetupNoneTwo git worktree add commandsOne sheet
Side-by-side viewTwo windowsTwo windowsOne tab, up to 4 panes
Diff and reviewMixed togethergit diffPer-hunk Accept / Reject / Comment
One place for what needs youNoNoYes
Extra costNoneNoneMacSuite license, $349 one-time as of November 2026 (7-day trial)

Pick the manual method for a one-time test if you are comfortable with git. Pick Compare Agents if you will repeat the test across tasks or want hunk-by-hunk review.

Judge the diffs

Decide what matters before you read either diff, so the result doesn't bend toward whichever you saw first.

  • Does it work? Run your tests and the feature in each worktree.
  • Did it do what you asked? Look for missing parts and unrequested changes.
  • How big is the diff? A smaller diff that passes is easier to review.
  • How much supervision did it need? Count approval prompts and questions.
  • What did it cost in time and usage? Note wall-clock time and check usage.

Compare usage and cost

Sledbot's Insights reads the local logs of Claude Code, Codex and OpenCode, read-only. Open it from the sidebar and use the Agents & Teammates tab, or run sled stats --by agent in a Sledbot terminal. Costs are "exact" or an "estimate" from models.dev list prices, so treat them as a guide. Other CLI agents' usage isn't counted.

Hold both to the same checks

For a stricter test, use delegated jobs. They run headless in their own copy of the project and support Claude Code and Codex. Each job can carry "Done when" verify commands and caps on turns, minutes and dollars. Submit the same task once per agent with identical checks and you compare pass or fail instead of impressions. This tests unattended runs only, not how either agent feels to steer by hand. See jobs and Night shift.

If the result is mixed

You don't have to pick one. The agent chip on the New task page lets you choose per task.

Checklist before you run the comparison

  • Working tree is clean and both agents start from the same commit.
  • Each agent has its own worktree.
  • Dependencies installed and .env copied into both.
  • Both agents logged in, with usage left on each plan.
  • The prompt is written once and pasted unchanged.
  • You have written down your judging criteria.

If nothing works

Most failures are listed here:

  • "Isn't a git repository." Compare needs git. Run git init and make a first commit.
  • An agent shows "Not installed". Use Install… in the picker or Settings ▸ Agents. It runs the vendor's install command in a terminal after you confirm.
  • "Sledbot needs a license to start agents." The trial has ended. Enter a key, or see pricing.
  • "At limit" or "Resets <time>". That plan hit its usage limit. Wait, or switch account in Settings ▸ Accounts. A run cut short by a limit is not a fair result, so rerun it.
  • Neither agent can run the project. The worktrees lack dependencies and ignored files. Install and copy, then rerun both.
  • Merge fails with "The main checkout is on X, not <base>." Switch your main checkout to the base branch and merge again.
  • Open PR fails. It needs gh, installed and signed in.
  • "This tab is full." A tab holds up to 4 panes. Close one.

If it still fails, contact support through the support page:

text
Subject: Compare Agents will not start

Sledbot version: 1.0.0, macOS: (your version)
Task: Compare Agents with Claude Code and Codex CLI
Exact message shown: (paste it here)
Repo is a git repository: yes/no
Steps already tried: reinstall agent, check login, rerun
Screenshot attached: yes

Common questions

Can I compare more than two agents?

Yes. Compare Agents runs 2 to 4 agents at once, each in its own worktree.

Will this change my working files?

Not until you merge. Each agent works on its own branch in its own worktree.

Do I need API keys?

Not for the CLI agents. Claude Code and Codex use their own logins on your Mac. Keys saved in Sledbot are for its native agent, routines and Night shift.

Is one run enough to pick a winner?

No. One task is one sample. Try a few real tasks, and rerun when either agent ships a big update.

For a feature-level comparison, see Codex vs Claude Code. Sledbot is part of MacSuite, and you can try it free for 7 days on its product page.

Every app.
One purchase.