Appearance

Language

Mastering AI agents

Claude Code vs Codex vs Grok Build in 2026: Which AI Coding Agent Fits You

Claude Code (Anthropic), Codex (OpenAI) and Grok Build (xAI, sold in one subscription with Cursor) are AI agents that read and edit a project on your own computer. Each compared on the same criteria: who it's for, how you install it, November 2026 official pricing, and usage limits. No winner picked.

Kelvin Wang · · 9 min read

You describe a task in plain words, and the agent edits code and runs commands. What separates the three is the company behind each, which models you get, and how you pay. Claude Code is Anthropic’s and isn’t on the free Claude plan; it starts with Claude Pro at US$20/month. Codex is OpenAI’s; ChatGPT’s free plan gets limited use in the desktop app, and the command-line version (CLI) starts with Plus at US$20/month. Grok Build is xAI’s terminal agent, sold in one X Subscription together with the Cursor code editor. The free tier includes a small allowance, and paid plans start at an introductory US$8/month that covers Grok models only.

Prices are in US dollars before tax, taken from each vendor’s official pages on November 7, 2026. These plans change often (xAI and Cursor rebuilt their whole lineup a month ago), so check again before you pay.

What these tools actually do

With a regular AI chat, you paste code in, get a suggestion back and paste it into your files yourself. These three skip the copying. You start one inside your project folder and say something like “add a post list to the home page and run the tests”, and it finds the relevant files, edits them and runs the tests. By default it asks before it changes a file or runs a command. The code stays on your machine, and you decide where it gets hosted.

All three are built around the terminal, and each has a way in without one. Claude Code has a desktop app and VS Code and JetBrains extensions. Codex lives in the ChatGPT desktop app and also comes as an IDE extension and on the web. On the xAI side, that role goes to the Cursor editor; Grok Build itself is a terminal program.

Monthly price of the entry paid plan US$ per month, billed monthly, before tax; 2026-11-07
  • Claude Code (Claude Pro) 20
  • Codex (ChatGPT Plus) 20
  • Grok Build and Cursor (X Subscription Plus) 8

The first paid plan from each vendor that works in the terminal. X Subscription Plus at US$8 is marked introductory and is limited to Grok models. ChatGPT Go (US$8) also includes Codex, but only in the desktop app.

Source: claude.com, chatgpt.com, cursor.com

Claude Code (Anthropic)

Who it’s for: people who want to hand off a task in plain words and let the AI read the project, edit several files and run tests. A natural fit if you want Claude models or already pay for Claude Pro or higher.

How you use it: paste the install command into a terminal on macOS, Linux or WSL; on Windows, use the PowerShell version 2:

curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex

Then run claude in your project folder and log in through the browser the first time. If you’d rather avoid the terminal, there’s a desktop app and VS Code and JetBrains extensions.

Pricing: the free Claude plan doesn’t include Claude Code. Pro is US$20/month billed monthly (US$17/month billed yearly). Max is US$100/month with 5x Pro usage. Ultra is US$200/month with 10x Pro weekly usage and, for verified accounts, no 5-hour limit. A standard Team seat is US$25 per user billed monthly or US$20 billed yearly, and includes Claude Code 1. You can also use an Anthropic Console API key and pay per use 2.

Limits: subscriptions have usage caps every 5 hours and every week; when you hit one, you wait for the reset or upgrade. It needs macOS 13+, Windows 10 1809+ or Ubuntu 20.04+, 4 GB of RAM, and a country Anthropic supports 2.

Codex (OpenAI)

Who it’s for: the same kind of tool as Claude Code. If you already pay for ChatGPT Plus or higher, it’s included, so there’s no extra subscription. If you don’t pay yet, the free plan lets you try it in the desktop app.

How you use it: Codex comes as a CLI, inside the ChatGPT desktop app, as an IDE extension and on the web. The CLI installs on macOS and Linux with one command; Windows, npm and Homebrew have their own tabs on the official page 4:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Run codex in your project folder and choose “Sign in with ChatGPT”. According to the pricing page, the CLI starts at Plus; Free and Go currently get Codex only in the desktop app 3.

Pricing: Codex is included in every ChatGPT plan. Free and Go (US$8/month) get the GPT-6 Luna model in the desktop app only, rolling out gradually. Plus at US$20/month adds Codex on the web, CLI, IDE extension and iOS, with GPT-6.1 Sol and GPT-6 Luna, and you can buy extra credits when you run out. Pro comes in US$100, US$200 and US$500 tiers. Business is US$20 per user per month billed yearly, US$25 monthly. You can also use an OpenAI API key in the CLI and IDE extension at API prices, without cloud features such as GitHub code review 3.

Limits: Plus has a message cap per 5 hours that depends on the model, from an estimated 5–45 up to 350–3,000 messages, and weekly limits may apply. Cloud tasks use more of the allowance than local messages. Pro currently has no 5-hour limit. The page gives no numbers for Free and Go 3.

Grok Build and Cursor (xAI)

xAI now has two coding tools. Grok Build is xAI’s own terminal agent; the command is grok, and it works much like Claude Code and Codex. Cursor is the AI code editor built by Anysphere, which SpaceX announced it would acquire in June 2026 10; xAI is also part of SpaceX. Since October 12, 2026, Grok, Grok Bot, Cursor and X Premium have been sold as one X Subscription 5. The two tools share the same plans and the same usage pool, so they’re compared together here.

Who it’s for: people who want Grok models; people who want a full code editor with AI autocomplete, chat and agents in one window (Cursor); and anyone already paying for X Premium or SuperGrok.

How you use it: install Grok Build with the bash command on macOS and Linux, or the PowerShell one on Windows, then check it with grok --version 7:

curl -fsSL https://x.ai/cli/install.sh | bash
irm https://x.ai/cli/install.ps1 | iex

Run grok in your project folder and it opens the browser to log in the first time. Where there’s no browser, set XAI_API_KEY to use an API key instead 8. It can also plug into supported editors through the Agent Client Protocol (ACP). Grok Build’s source code is on GitHub under the Apache 2.0 license 7.

For Cursor, download it from cursor.com and open your project folder. It looks much like VS Code. Cursor also has its own CLI, run as agent, installed on macOS, Linux and WSL with curl https://cursor.com/install -fsS | bash 9.

Pricing: the X Subscription plans 6:

  • Free: US$0, with a small allowance for Cursor’s agent and chat and for Grok Build.
  • Plus: US$8/month (marked introductory), includes Cursor and Grok Build, Grok models only.
  • Premium: US$30/month, 4x Plus usage, plus cloud agents, AI code review and Grok Bot (which xAI calls “AI teammates”). Other vendors’ models are available in Cursor, billed separately at API list price.
  • Super: US$100/month, 15x Plus usage.
  • Ultra: US$200/month, 50x Plus usage.
  • Teams: from US$30 per user per month.

You can also run Grok Build on an xAI API key and pay per use instead of subscribing 8. Existing SuperGrok, Cursor and X Premium subscribers can keep their old plan or switch 5.

Limits: paid plans draw on one weekly pool shared between Grok and Cursor, with top-ups for sale when it runs out 6. The more you use Grok chat, the less is left for coding. Using Claude or GPT models inside Cursor needs Premium or above and is billed per use on top of the subscription, so the monthly bill is harder to predict 5. The official pages don’t give request or token counts for each plan.

All three on the same criteria

ToolCompanyFree use?Entry paid plan (monthly)Where you use itHow usage is countedModels
Claude CodeAnthropicNoPro US$20Terminal, desktop app, VS Code/JetBrains extensions5-hour and weekly caps, or API per useClaude
CodexOpenAIYes, limited, desktop app onlyPlus US$20 (Go US$8, desktop app only)Terminal, desktop app, IDE extension, web, iOSMessages per 5 hours, possible weekly caps, or API per useOpenAI GPT models
Grok Build and CursorxAI (part of SpaceX)Yes, limitedPlus US$8 (introductory)Terminal (Grok Build, Cursor CLI), Cursor editorWeekly pool shared by Grok and Cursor, or API per useGrok only on Plus; other vendors' models from Premium, billed separately

Official pages, checked 2026-11-07, US dollars before tax. Sources at the end.

Do you rewrite your project rules when you switch tools?

Not from scratch. Codex reads a project’s AGENTS.md. Claude Code reads CLAUDE.md, and reads AGENTS.md directly when a repo has no CLAUDE.md. My shared rules live in one AGENTS.md, and Claude Code’s CLAUDE.md is a single @ import of it, so both tools see the same rules.

Go deeper How to Write AGENTS.md and CLAUDE.md: One Rules File for Every AI Coding Tool (2026) How to write shared rules, which file each tool reads, and what to keep separate.

Matching a tool to your situation

  • Already paying for ChatGPT Plus or higher: try the Codex that comes with your plan before adding a subscription.
  • Already on Claude Pro or higher: Claude Code is already included.
  • Already paying for X Premium, SuperGrok or Cursor: switching to the X Subscription gets you Grok Build and Cursor.
  • Not paying yet and want to try first: Codex on the free plan (desktop app) and the X Subscription Free tier both include a small allowance. Claude Code has no free allowance.
  • Want to read and change the code yourself: the Cursor editor, or the Claude Code or Codex VS Code extension, where every line the AI changes shows up in your editor.
  • Fixed budget: watch the pay-per-use parts: extra Codex credits, other vendors’ models in Cursor, X Subscription top-ups, and API-key billing with any of the three.

Whichever you pick, you need to notice when the AI gets something wrong. All three edit files on your own machine, so if the project is in Git you can roll back any change that broke something, and switching tools later doesn’t touch your code.

Go deeper What Is Vibe Coding? A Beginner's Guide, and Where It Breaks What building by prompt can do, and where it goes off the rails.

Before you install any of them

None of the three official installers needs Node.js, but you do need a terminal, and a website project (Astro, for example) needs Git and Node.js. On a fresh machine:

  1. Open a terminal. On macOS, use the Terminal app (Applications › Utilities). On Windows, search the Start menu for “PowerShell”.
  2. Install Git. On macOS, run xcode-select --install and follow the dialog. On Windows, download the installer from git-scm.com. Then run git --version; a version number means it worked.
  3. Install Node.js. Download the LTS version from nodejs.org, then check with node --version.
  4. Create a GitHub account at github.com. Your code will live there.
  5. Open the terminal in your project folder. Make a folder, type cd (with a space), drag the folder into the terminal window and press Enter. This is where you run claude, codex or grok.
Go deeper Set Up Your Computer for AI Coding from Zero: Terminal, Git, GitHub, Node.js Step-by-step setup before your first session with Claude Code, Codex or Grok Build.

Sources

  1. 1. Claude Pricing · Anthropic · checked 2026-11-07
  2. 2. Claude Code: Advanced setup · Anthropic · checked 2026-11-07
  3. 3. Codex pricing · OpenAI · checked 2026-11-07
  4. 4. Codex CLI · OpenAI · checked 2026-11-07
  5. 5. Introducing The X Subscription · xAI · 2026-10-12
  6. 6. Cursor Pricing · Cursor · checked 2026-11-07
  7. 7. Grok Build (grok) · xAI (GitHub) · checked 2026-11-07
  8. 8. Grok Build overview · xAI · checked 2026-11-07
  9. 9. Cursor CLI installation · Cursor · checked 2026-11-07
  10. 10. SpaceX to acquire the AI coding startup Cursor for $60 billion · CNBC · 2026-06-16

About the author

Kelvin Wang

Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.

More about me