Grok Build vs Claude Code vs Codex: Which Terminal Coding Agent Wins in 2026

Three terminal coding agents, one verdict: what each really costs, where each breaks, and which to install. Real 2026 pricing, plus the new Grok Build.

Published Updated

Grok Build vs Claude Code vs Codex: Which Terminal Coding Agent Wins in 2026

Start with the terminal coding agent your eligible subscription already includes. In Grok Build vs Claude Code vs Codex, the useful distinction is how you control changes and pay for usage: xAI's Grok Build now runs Grok 4.7, Claude Code offers a checkpoint-based review workflow, and OpenAI's Codex CLI separates sandbox boundaries from approval settings.

The verdict: use the one your subscription already includes

Start with the agent bundled into the plan you already pay for, then switch only when a representative task exposes a workflow or usage limit that matters. Claude's paid plans include Claude Code; ChatGPT Plus, Pro and eligible workplace plans include Codex CLI; The X Subscription includes Grok Build, with limited Free access and paid access from Plus. The plan details below matter more than the brand on your existing chat tab.

Since October 12, 2026, The X Subscription has been the new buying route, while existing SuperGrok and X Premium subscribers can keep their plans. Grok Build now runs Grok 4.7. Since October 14, 2026, GPT-5.5 has left Codex with ChatGPT sign-in, though API-key sessions are unaffected. Plans, models and capabilities below were verified against the vendors' pages on October 17, 2026.

When you get to choose, here is the blunt call:

  • Claude Code is the default recommendation here for a developer who wants multi-file changes, reusable project instructions and checkpoints in the same workflow. That is a workflow judgment, not a claim that its code is proven more reliable than the alternatives.
  • Codex CLI is the pick for existing ChatGPT users and developers who want explicit controls over filesystem writes, network access and approvals. It can act automatically inside those boundaries.
  • Grok Build is the lowest-priced paid entry of these advertised terminal subscriptions, and its limited Free access makes it an easy first trial. Choose it for its current plan, plugin and worktree workflow, not because you think an old X subscription is required.
AgentCurrent model orientationPick it forLimit to account for
Grok BuildGrok 4.7Low entry cost; parallel worktrees and pluginsIncluded usage is limited; API billing is separate
Claude CodeOpus 5.5 default, subject to account settingsMulti-file work with checkpoints and reusable instructionsCheckpoints do not undo every kind of change
Codex CLIGPT-6.1 Sol when available; Luna for focused tasksConfigurable sandbox boundaries and ChatGPT accessModel availability and permissions depend on your account and setup

These recommendations compare documented controls, entitlement and review workflows. They do not rank coding accuracy from a hands-on benchmark.

What a "terminal coding agent" actually is

A terminal coding agent is a program you run from your command line that reads repository files, writes and edits code, runs commands like tests and installs, and shows changes you can review. Think of it less as autocomplete and more as a coding assistant working in your actual project folder. Depending on its permissions, it may edit files before asking you to approve anything.

The reason builders move here from the chat window is friction. Copy-pasting code into a browser tab, getting an answer, pasting it back, and re-explaining your file structure every time is slow and lossy. A terminal agent can use your files, project instructions and shell. You type the goal, it does the legwork, you review the diff. All three offer that loop; their Grok Build, Claude Code and Codex CLI documentation describes the supported workflows.

Price: what each one actually costs to run

An included subscription allowance is the sensible starting point if you already have it. It is not unlimited usage, and a paid API account is a separate billing route. The following are advertised US dollar web prices, with annual billing identified where applicable.

Grok Build plans

The X Subscription plan page explicitly includes Build in Plus and the higher tiers; Free has limited access. Team tier prices are confirmed in the subscription announcement.

  • Free: $0/month, limited Grok Build access.
  • Plus: $8/month, Grok Build included with the base paid usage pool.
  • Premium: $30/month, includes Build and 4x Plus usage.
  • Super: $100/month, includes Build and 15x Plus usage.
  • Ultra: $200/month, includes Build and 50x Plus usage.
  • Teams Premium: $30/user/month, with team administration.
  • Teams Super: $100/user/month, with team administration.
  • Teams Ultra: $200/user/month, with team administration.
  • Enterprise: custom quote and pooled usage.
  • API-key use: Grok 4.7 lists $2 per million input tokens and $6 per million output tokens, with higher pricing above 200K context; API usage is billed separately.

The subscription pool spans Grok and Cursor, refreshes weekly and supports top-ups. Those usage multipliers describe the plan allowance, not a guaranteed number of completed coding tasks. Existing SuperGrok or X Premium subscribers should check their retained entitlement before switching; the launch did not cancel their existing plans.

Claude Code plans

Anthropic's pricing page includes Claude Code in every paid plan, but not Claude Free. Max's two tiers have distinct prices and allowances.

  • Pro: $20/month, or $200 billed annually; Anthropic displays the annual equivalent as about $17/month.
  • Max 5x: $100/month, with 5x Pro's per-session allowance.
  • Max 20x: $200/month, with 20x Pro's per-session allowance.
  • Team Standard: $25/seat/month monthly, or $20/seat/month billed annually; minimum 2 members.
  • Team Premium: $125/seat/month monthly, or $100/seat/month billed annually; minimum 2 members.
  • Enterprise: $20/seat/month billed annually, minimum 20 seats, plus usage charged at API rates; sales-assisted terms may vary.
  • Education: institutional quote; Claude for Education offers Claude Code, with access governed by the institution's agreement.
  • API-key use: metered model usage through an Anthropic Console account or supported provider, separate from the subscription allowance.

Claude chat and Claude Code draw from the same subscription pool. Longer tasks, model choice and context affect consumption. Moving to Max is one response to repeated limits; waiting for a reset or buying usage credits are others.

Codex plans

OpenAI's Codex pricing page lists the following plans. Its Free and Go cards specifically advertise Luna in the desktop app, subject to rollout; Plus explicitly includes the CLI. For this terminal comparison, do not assume the desktop offer guarantees identical CLI access.

  • Free: $0/month, GPT-6 Luna in the desktop app where available.
  • Go: $8/month, GPT-6 Luna in the desktop app where available.
  • Plus: $20/month, including Codex CLI.
  • Pro $100: $100/month, including Codex CLI.
  • Pro $200: $200/month, including Codex CLI.
  • Pro $500: $500/month, including Codex CLI and eligible Ultrafast access.
  • Business: $25/user/month monthly, or $20/user/month billed annually; minimum 2 users.
  • Enterprise: contact sales; Codex included, subject to workspace controls.
  • Edu: contact sales; Codex included, subject to workspace controls.
  • API-key use: separately metered at API rates; CLI access is supported, but subscription cloud features are not included through this route.

Codex and ChatGPT Work share usage. The model, reasoning effort and task size affect consumption, so a subscription price cannot be converted into a fixed number of refactors.

Grok Build: the low-cost entry with a complete toolkit

Grok Build is xAI's terminal coding agent, now powered by Grok 4.7 and available to try for free. Its current product page describes planning, code editing, testing, review and sandboxed execution. An existing X subscription is no longer a prerequisite for trying it.

Grok Build CLI launch page from xAI
Grok Build, xAI's terminal coding agent

What makes it worth considering:

  • Plan mode. For anything non-trivial, start with a plan: edits are blocked until you approve it. You can comment on individual steps or rewrite the approach before handing over execution.
  • It reads your existing setup. AGENTS.md, plugins, hooks, skills and MCP servers are supported. MCP, the Model Context Protocol, connects an agent to external tools and data sources. Check each integration's configuration rather than assuming every vendor's plugin package is interchangeable.
  • Parallel subagents. Specialized agents can work concurrently with their own context and separate git worktrees, which are isolated working copies of a repository. That is useful for investigating different parts of a codebase without putting every edit in the same folder.
  • Headless mode and ACP. grok -p runs non-interactively, while the Agent Client Protocol lets other applications host the agent. Both are documented in the Build overview.

The Grok 4.7 model page lists a 500,000-token context window. That is the API model's capacity for input and conversation, not a promise of unlimited repository size or included subscription work.

Who should reach for it: a cost-sensitive developer starting from no paid coding subscription, or someone who values its plugin and parallel-worktree workflow. Who shouldn't: someone whose current agent already fits the job and who has no concrete reason to migrate.

Claude Code: the production default

Claude Code remains the default recommendation here for developers who want a reviewable, multi-file workflow. Anthropic documents repository edits, test execution, MCP connections, skills, hooks and parallel agents. Its paid-plan access is listed above.

Claude Code product page from Anthropic
Claude Code, Anthropic's terminal agent

Where that recommendation earns its place is the combination of project instructions and rollback. For a cross-file rename, ask for the affected call sites and tests, let it make the change, then review the diff. Checkpoints let you rewind tracked edits if the approach is wrong. They do not undo changes made by shell commands, and generally do not capture other subagents' edits, so keep git checkpoints as well.

The cost reality is shared usage, not a guaranteed number of daily sessions. A long investigation can consume more allowance than several small fixes. Upgrade when that limit repeatedly interrupts useful work, not because a production repository automatically requires Max.

Who should reach for it: an engineer who values persistent project rules and checkpoints while working across files. Who shouldn't: someone whose existing Codex or Grok Build workflow already passes the same review and test requirements.

Codex CLI: the ChatGPT-native, sandbox-first pick

Codex CLI is OpenAI's terminal agent, and it is a sensible first choice if you already have eligible ChatGPT access. Its CLI documentation covers local repository work, automation, review and cloud handoffs.

OpenAI Codex CLI documentation page
Codex CLI, OpenAI's terminal agent

Its defining trait for this decision is explicit execution boundaries. The sandbox controls where commands can write and whether they can reach the network; the approval policy controls when Codex asks you. In the documented Auto configuration, it can read, edit and run commands inside the workspace without a prompt. Actions beyond the configured boundaries need approval. A sandbox is not a promise that every edit waits for consent. OpenAI's security guidance explains the distinction.

The practical details:

  • Models: OpenAI recommends GPT-6.1 Sol for complex coding when available and GPT-6 Luna for focused, repeatable tasks. Use /model to inspect the choices and reasoning effort available to your account. Enterprise and Edu administrators must enable Sol. Current model guidance replaces the old GPT-5.4 and GPT-5.3-Codex recommendations for ChatGPT-authenticated sessions.
  • Existing GPT-5.5 configurations: change saved model settings and scripts that select it when signing in with ChatGPT. API-key sessions retain their separate API availability.
  • Install paths: the CLI offers a standalone installer, npm, Homebrew and Windows installation options.
  • Automation and review: codex exec supports scripted runs; MCP and image inputs bring tools and visual context into a task. Use /review for a dedicated review of changes rather than assuming every generated diff has already received one.
  • Codex Cloud: submit work to a configured cloud environment and apply the result locally, useful for tasks you want to hand off from the terminal.

Who should reach for it: a developer with eligible ChatGPT access, or one who wants to configure filesystem and network boundaries explicitly. Who shouldn't: someone unwilling to maintain those settings when the project needs external services or writes outside the workspace.

Where each one hits a wall

The wall to watch is the one that affects your own repository, not an unsupported ranking of which agent makes fewer mistakes.

The upside
What it does well
4 points

  • An eligible subscription can cover the first trial without another purchase
  • Claude Code: project instructions and checkpoints support reviewed multi-file work
  • Codex: sandbox and approval settings expose execution boundaries
  • Grok Build: limited Free access and a low paid entry make comparison accessible
The downside
Where it falls short
4 points

  • Grok Build: an included usage pool is not unlimited agent work
  • Claude Code: shared usage limits and incomplete checkpoint coverage need attention
  • Codex: model entitlements and permission settings can require configuration
  • Any of them: none replaces reading the diff and running relevant tests

The deeper point under all three walls: these agents are accelerators, not autopilots. Write down the house rules, review the patch and keep a way back. An agent-generated commit still needs the same care as any other change.

Install all three and compare them on your repository

You do not have to choose blind. Keep the tools available and compare a bounded task on separate branches or working copies. These commands are the vendors' macOS/Linux installation paths; use their linked documentation for Windows options.

  1. Install Grok Build

    Use the official installer, then run grok in your project and complete browser sign-in. Limited Free access is available.

    Bash
    curl -fsSL https://x.ai/cli/install.sh | bash
  2. Install Codex CLI

    Use the official installer, run codex in your project, and sign in with an eligible ChatGPT account or choose API-key authentication.

    Bash
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
  3. Install Claude Code

    Use the official installer, then run claude in your project and authenticate with your paid Claude account or supported API billing route.

    Bash
    curl -fsSL https://claude.ai/install.sh | bash
  4. Add project instructions

    Put framework conventions, test commands, code style and protected files in AGENTS.md. Grok Build and Codex support it. Current Claude Code can read it directly when there is no project CLAUDE.md or CLAUDE.local.md in the working directory or above it. If you already use CLAUDE.md, import the shared rules with @AGENTS.md or configure which instruction files load.

Now give each agent the same bug report and acceptance criteria. Compare the patch, test results, interruptions and allowance consumed. That tells you which workflow fits your repository better than treating any model name as a guarantee.

Which to pick: the decision rules

Strip away the features and it comes down to four rules.

  1. Already have eligible access? Use it first. Pay for another agent only when it solves a specific problem in your current workflow.
  2. Want project instructions and checkpoints for multi-file work? Claude Code is the default recommendation here. Keep git for changes its rewind cannot restore.
  3. Want explicit sandbox boundaries and already use ChatGPT? Codex CLI. Confirm the current model selection and permissions before starting.
  4. Starting without a paid subscription or prioritizing entry cost? Try Grok Build's limited Free access, then evaluate its paid plans against the usage you need.

This week's move: take a small issue from your backlog, define what a passing result looks like, and run that comparison before buying another annual plan. Switch for a demonstrated workflow benefit, not a leaderboard position.

Is Claude Code still the best coding agent?

It is the default recommendation here for developers who value its project instructions and checkpoint workflow. That does not establish a universal accuracy winner. Codex is attractive for explicit sandbox controls and existing ChatGPT access; Grok Build offers a low-cost way to evaluate a comparable terminal workflow.

What are the big three coding agents in 2026?

This comparison covers Anthropic's Claude Code, OpenAI's Codex CLI and xAI's Grok Build. All offer terminal workflows, but their products also extend into other surfaces or integrations. This is the comparison's scope, not a claim that only these agents exist.

Can you use Grok with Claude Code?

You can use Grok Build and Claude Code alongside each other as separate tools. An X Subscription does not provide Claude Code entitlement, and changing Claude Code's model setting does not make it Grok Build. For the documented Grok coding workflow, install Grok Build itself.

Is Grok better than Claude at coding?

There is no head-to-head test in this comparison that establishes that. Grok Build now runs Grok 4.7; Claude Code's documented account-type default is Opus 5.5, subject to overrides. Use the same bounded repository task and review criteria to decide whether either produces a better result for your work.

Does it cost extra to run these on top of my subscription?

Using an included agent within your plan's allowance does not require another agent subscription. Extra usage, API-key billing and some model choices can add charges; Claude Enterprise also separates seat price from usage. Check the exact plan and authentication route rather than assuming every paid chat account grants the same terminal access.

Want the build-tooling calls without testing every release yourself? I break down which AI tools are actually worth your stack, with real pricing and the production gotchas, in a short weekly note. Subscribe to the newsletter.

Last Updated
Category
Build
Related Articles
Vision Language Models: What Builders Can Trust

Vision Language Models: What Builders Can Trust

What vision language models can read, where they fail, and how to choose API or self-hosted models with a test plan for your own images.Oct 26, 2026Build
Multi Agent Systems: When One Agent Beats a Team

Multi Agent Systems: When One Agent Beats a Team

When should you split one LLM agent into several? Compare supervisors, hierarchies, handoffs and group chat, with a task-based decision table.Oct 26, 2026Build
Prompt Injection: Direct and Indirect Attacks in AI Agents

Prompt Injection: Direct and Indirect Attacks in AI Agents

Understand direct and indirect prompt injection, how agents expose business data, and the safeguards to use before connecting an inbox or CRM.Oct 26, 2026Build
GraphRAG: How It Works and When to Use It

GraphRAG: How It Works and When to Use It

How Microsoft GraphRAG answers questions across documents, what drives indexing work, and when to use it instead of vector, hybrid or agentic RAG.Oct 26, 2026Build
AI Agent Architecture: The Production Map

AI Agent Architecture: The Production Map

Map the model, tools, memory, orchestration, approvals and evaluation behind a production AI agent, with a support workflow and buy-versus-build decisions.Oct 25, 2026Build
Cursor Models: What You Can Use After the October Change

Cursor Models: What You Can Use After the October Change

Which Cursor models you can use after October, how Auto routes tasks, and how to choose across Grok, Composer, Claude, GPT and Gemini.Oct 25, 2026Build
LLM Parameters: Model Weights and Generation Settings

LLM Parameters: Model Weights and Generation Settings

Understand model size, active MoE weights and API controls, with provider-specific rules and starting settings for extraction, drafting and code.Oct 25, 2026Build
Continuous Batching: How It Improves LLM Throughput

Continuous Batching: How It Improves LLM Throughput

How continuous batching improves shared LLM throughput, changes latency, and works with KV cache in vLLM, SGLang, TensorRT-LLM and TGI.Oct 25, 2026Build
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.