页面简介
Start with Codex on ChatGPT Plus at $20 a month, or Claude Code if you already pay for Claude Pro. Compare review, permissions, and usage limits.
正文摘录
All postsThe agent says the fix is ready, and the tests are green. You read the modified files twice and still hesitate to hit accept. You have to make sense of the diff, ask for adjustments, and wait on the next round. When a small bug fix takes three tries, how Claude Code or Codex handles that back-and-forth matters just as much as its first draft. For a first coding subscription at $20 a month, we'd start with Codex through ChatGPT Plus. Already paying for Claude Pro, or want Claude to ask before it edits files? Start with Claude Code. Claude Code vs Codex: Desktop, CLI, IDE, and Cloud If you're new to terminal tools, start with the Code tab in Claude Desktop or Codex inside the ChatGPT desktop app. If you already live in a terminal or code editor, use the CLI or IDE extension instead. Both desktop apps keep the chat and file changes side by side. The CLIs run in your terminal, and the extensions sit inside your editor. Either way, you'll spend most of your review reading a diff: the added and removed lines in a proposed patch. Where you workClaude CodeCodexDesktopThe Code tab in Claude Desktop, with Changes for file review. Claude Code access requires an eligible paid plan.Codex inside the ChatGPT desktop app, with a diff pane and Git controls. The limited free offer is desktop-only.TerminalThe claude CLI works in your project directory.The codex CLI works in your project directory.Code editorClaude Code has a VS Code extension and a JetBrains integration.Codex has a VS Code extension, also used in compatible editors such as Cursor.CloudClaude Code cloud sessions run on Anthropic infrastructure and can be monitored at claude.ai/code.Codex Cloud runs the task in a selected remote environment. Cloud sessions run against their own remote checkout and dependencies, so uncommitted edits on your laptop won't show up there automatically. You can use both desktop apps alongside a terminal such as Ghostty for commands. If you'd rather combine manual edits, Tab suggestions, and an agent inside a single code editor, see our Cursor vs Claude Code comparison. Models from other providers are covered in our OpenCode vs Claude Code comparison. Permissions and Sandboxing in Claude Code and Codex Will either agent edit files without asking? In Claude Code, Manual mode prompts you before file edits and most commands unless a saved rule already allows them. In Codex, "Ask for approval" still lets the agent edit files and run commands inside your workspace, prompting only when it tries to cross that boundary. Starting in Claude Code v2.1.283, interactive terminal and VS Code sessions start in auto mode, where another AI model reviews actions in the background. Its default checks target destructive commands like force pushes and git reset --hard that could wipe out work. Codex's local workspace-write sandbox allows edits and commands inside the project, keeps command network access off by default, and mounts .git as read-only. That protects your Git metadata, though source files in the working tree can still be modified or deleted. Hosted search and connected tools use separate network controls. What you want to controlClaude CodeCodexWho approves actionsManual asks before file edits and most commands, except actions already allowed by a saved rule. Auto uses an AI reviewer.Ask for approval still permits edits and commands inside the workspace; it asks before crossing that boundary.Discuss a change before source editsPlan mode proposes changes before source editing.Read-only mode lets you discuss and inspect the project before granting write access.Where the setting isThe permission mode selector; /permissions in the CLI lists rules.The control below the prompt, or /permissions in the CLI. Saved settings or organization policies can override these starting modes. Codex's launch rules call its workspace-write preset Auto and recommend it for Git folders, with read-only for non-Git folders. The desktop app labels that same workspace boundary Ask for approval. The names are easy to mix up. Codex's Auto preset sets file access and approval boundaries. Claude's auto mode brings in an AI reviewer. A sandbox limits which files and network resources a command can touch. Approval decides whether the command runs at all. A person approves npm test, which runs inside a configured command sandbox. Cloud tasks run remotely. When a test command fails, check the error for a missing dependency or blocked network call before opening up broader permissions. Also, running commands on your machine doesn't make the model local. Both apps still send code context to hosted models. Compare Claude Code and Codex on the Same Coding Task A small validation fix tells you more about an agent than a whole-app build does. You can verify the behavior right away, and the diff stays small enough to discuss line by line. Whichever tool you already have installed is enough to start. Start with a contact form that accepts a name made entirely of spaces. Your fix should reject blank spaces while keeping valid names working. No form in your project? Filtering completed to-do items out of an active list gives you an equally clear change to verify. Before starting, make sure you can tell the agent's edits apart from your own. Run git status and git diff, commit your own intended changes, and leave anyone else's unfinished files out of that commit so earlier edits don't get mixed into the agent's patch. For the form fix, a short prompt is plenty: Find the name validation for this form. Reject names that contain only spaces, keep valid names working, and add or update the relevant test. Use the project's existing tools. Explain the files you expect to change before editing. Show the diff and the test command and result when finished. Do not commit or publish. Part of the taskClaude CodeCodexStartA local Code session in Claude Desktop, or claude in the project's terminal.Codex in the ChatGPT desktop app, or codex in the project's terminal.ReviewChanges shows the diff; comments on specific lines give Claude a correction to address.The diff pane shows changes; line comments plus a follow-up chat message give Codex a correction to address. The real evaluation starts once the patch comes back. Does its validation reject whitespace-only names cleanly, or does it accidentally block valid names too? Ask the agent to walk through that condition so you have something concrete to push on. If you'd rather make the edit yourself, ask for a proposed approach and explanation before any files change. Passing tests only help if they actually check the behavior you wanted. Ask for the test before the fix so you can watch it fail on the old code and pass after the change. Then open the page and submit a spaces-only name followed by a real name. Manual checks regularly catch UI quirks an automated test missed. Even if you don't read code, you can run both test submissions in the desktop workflow (or check off a to-do item and confirm it leaves the active list). After one round, you have concrete signals to compare: how much explaining and correcting the patch took, how long each revision ran, and how much plan allowance it used. Commit only the intended files you've reviewed. A fast first draft isn't worth much if you spend the rest of the session restoring a basic requirement. Optional: compare both tools. Spin up separate clones or Git worktrees at the same starting commit and hand Claude Code and Codex the exact same prompt so their edits can't collide. Running identical tasks makes wait times and correction rounds easy to compare, though you don't need to buy both tools just to run this exercise. Claude Code vs Codex Performance: Scores, Speed, and Review Time Across the four setups tested below by Artificial Analysis, Claude Code with Opus 5.5 posts the highest task score, while both Codex configurations finish faster. Day to day, what counts is total time from asking for a change to accepting the diff. When we're stringing together small edits, shorter waits keep us moving. On trickier changes, a slower run pays off if it saves rounds of cleanup. Artificial Analysis: Opus, Fable, Astra, and Sol Compared In Codex, you pick OpenAI models such as Astra and Sol. In Claude Code, you pick Anthropic models such as Opus and Fable. Switch models from your session picker or run /model in either CLI. Included models draw from your plan's allowance. On Claude Pro, Fable uses usage credits. On Max and Ultra, it pulls from the weekly allowance. Artificial Analysis comparison, checked November 3, 2026. Max reasoning effort for all four configurations. Inside Claude Code, Fable's quicker turnaround is useful for short edits. On API billing, Sol's lower cost per task puts it on our shortlist for repeated jobs. We'd still check how much cleanup either model leaves behind on our own codebase. Missing Requirements Leave the Agent to Decide In a published 48-run comparison, one book-site ticket asked for a year of asset caching without spelling out exact HTTP response headers. Five of the six runs picked headers that didn't match the researcher's expectations. When you see a miss like that, check what the prompt left unspoken before blaming the agent. On the seven clearer tickets, the researcher had a preparation agent write explicit specs from reference changes he had already finished. The specs covered every behavior his grading tests checked, without exposing the tests themselves. Given clear requirements, all 42 runs passed (three runs per tool on each ticket). Tests can repeat the implementation's mistake. A test that expects the wrong column label will pass when the code returns it. You still need to compare the patch with the original request. Claude Code vs Codex Pricing and Usage Limits Claude Code comes with paid Claude Pro, Max, and Ultra plans. Codex offers a limited free desktop tier and broader access on paid ChatGPT plans. Individual monthly web prices below are in US dollars before tax,