AI coding agents in 2026: Claude Code, Codex, Cursor, OpenCode and Gemini CLI compared

Five AI coding agents, as of 12 November 2026: Claude Code, Anthropic's, from $20 a month; OpenAI Codex, with ChatGPT Plus at $20; Cursor, an editor with an agent, free or from $8; OpenCode, open source and free, which runs models from 200+ providers; and Google's Gemini CLI, open source, on a Code Assist licence or a paid API key since its free tier ended on 18 June 2026.

Dmitriy Solodukha · Updated · 5 min read

Checked against Caprock v0.175.1

to start: OpenCode or Cursor Free
$0
to start: OpenCode or Cursor Free
Gemini CLI's free tier ended 18 June 2026
a month: Claude Pro or ChatGPT Plus
$20
a month: Claude Pro or ChatGPT Plus
Cursor Plus: $8, its own models only
median OpenCode call, the lowest measured
$0.002
median OpenCode call, the lowest measured
9,309 calls, May – Jun 2026 · mostly DeepSeek V4 Pro
median Claude Code call, the highest measured
$0.094
median Claude Code call, the highest measured
79,014 calls, 18 Jul – 2 Oct 2026 · Codex: $0.032

A call is one request to the model. Medians are from one machine, on different projects, models and weeks — not a verdict on which agent writes better code. Cursor and Gemini CLI were not measured.

Pick one

What each one is best for

Facts about price, limits, where each runs and which models — no overall winner, and no verdict on code.

  • Anthropic

    Claude Code

    Best for Claude models all day on a flat fee.

    Price
    Pro $20, Max $100 or Ultra $200 a month; no Claude Code on Claude Free
    Limits
    A five-hour window and a weekly limit, shared with claude.ai; Ultra has no five-hour window for verified accounts
    Runs in
    Terminal, IDE extensions, desktop app, web
    Models
    Claude only, also via Bedrock, Google Cloud, Foundry
    Open source
    All rights reserved, Anthropic
  • OpenAI

    OpenAI Codex

    Best for people who already pay for ChatGPT.

    Price
    Plus $20; Pro $100, $200 or $500; Free and Go in the desktop app, subject to rollout
    Limits
    Five-hour and weekly on Plus; Pro has no five-hour window
    Runs in
    Web, CLI, IDE extension, iOS, desktop app
    Models
    OpenAI's GPT models
    Open source
    The Codex CLI is open source, Apache-2.0

    Codex vs Claude Code →

  • Anysphere

    Cursor

    Best for one editor that runs several makers' models.

    Price
    Free; Plus $8, Premium $30, Super $100, Ultra $200 a month
    Limits
    A weekly pool for Cursor's own models; Claude, GPT and Gemini at API list price on top
    Runs in
    Its own editor, a CLI, cloud agents in VMs
    Models
    Anthropic, OpenAI and Google, plus Grok and Composer in Cursor's own pool
    Open source
    No; Anysphere owns the software

    Cursor vs Claude Code →

  • Anomaly (SST)

    OpenCode

    Best for choosing the model, and its price, per task.

    Price
    Free itself; you pay the model: your own key, pay-as-you-go credit, or Go at $10 or $40 a month
    Limits
    None of its own; Go caps dollars per model over five hours, a week, a month
    Runs in
    Terminal, desktop app, phone, SDK
    Models
    More than 200 providers; a Claude plan sign-in is not allowed
    Open source
    Yes, MIT

    OpenCode vs Claude Code →

  • Google

    Gemini CLI

    Best for teams on Gemini Code Assist.

    Price
    No free tier since 18 June 2026; Code Assist Standard $22.80 or Enterprise $54 a user a month, or a paid API key
    Limits
    1,500 model requests a day on Code Assist Standard, 2,000 on Enterprise
    Runs in
    Terminal; VS Code, JetBrains and Zed through an extension or ACP
    Models
    Gemini only; Auto picks Pro or Flash
    Open source
    Yes, Apache-2.0

    Gemini CLI vs Claude Code →

Read 12 November 2026 from each maker's pricing pages and documentation, and each repository's licence on GitHub.

All five, one table

AI coding agents compared

Maker, licence, where each runs, which models, and what the plans cost and cap.

Five AI coding agents, from each one's pricing pages and documentation, read 12 November 2026
Agent Maker Open source Runs in Models Entry Heavy plan Limit shape Own API key Read by Caprock
Claude Code Anthropic No Terminal, IDE, desktop, web Claude only Pro, $20 Ultra, $200 5-hour + weekly; Ultra weekly Anthropic key Yes
OpenAI Codex OpenAI CLI: Apache-2.0 Web, CLI, IDE, iOS, desktop OpenAI GPT models Plus, $20 Pro, $100–500 5-hour + weekly OpenAI key Yes
Cursor Anysphere No Editor, CLI, cloud VMs Anthropic, OpenAI, Google; Grok, Composer Free; Plus $8, own models only Ultra, $200 Weekly pool; Claude, GPT per token Yes No
OpenCode Anomaly (SST) Yes, MIT Terminal, desktop, phone 200+ providers Free; Go $10 Go Plus, $40 Go: a $ cap per model Any provider's Yes
Gemini CLI Google Yes, Apache-2.0 Terminal, IDE via extension Gemini only Code Assist Standard $22.80 a user Code Assist Enterprise, $54 a user Requests a day Paid Gemini API key Sessions it starts
Prices a month, for one person. Codex's 5-hour window applies on Plus; Pro has none, and weekly limits may apply to any plan. Cursor's agent and OpenCode can also run Claude, at API rates rather than on a Claude plan.

Plans, per month

Every plan on one axis

Individual plans, $0 to the top tier. Team and business seats are per user, on each head-to-head page; Gemini CLI now runs only on those or a paid API key.

  • CodexChatGPT Free $0 desktop app
  • CursorFree $0 limited; no third-party models
  • OpenCodeNo plan $0 free, open source
  • CodexChatGPT Go $8 desktop app
  • CursorPlus $8 own models only, no Claude
  • OpenCodeGo $10 mostly open models; capped per model
  • Claude CodePro $20 $17 billed annually
  • CodexChatGPT Plus $20 web, CLI, IDE, iOS
  • CursorPremium $30 4× Plus; Claude at API price
  • OpenCodeGo Plus $40 the same models, higher caps
  • Claude CodeMax $100 5× Pro's usage
  • CodexChatGPT Pro $100 Pro 100; no five-hour limit
  • CursorSuper $100 15× Plus
  • Claude CodeUltra $200 10× Pro's weekly usage
  • CodexChatGPT Pro $200 Pro 200; more usage than Pro 100
  • CursorUltra $200 50× Plus
  • CodexChatGPT Pro $500 Pro 500; adds Ultrafast
One linear axis, $0 to $500 a month. Read 12 November 2026 from claude.com/pricing, OpenAI's Codex pricing and OpenCode's Go docs; Cursor's plans from cursor.com/pricing. Claude Free does not include Claude Code; Codex on ChatGPT Free and Go is subject to rollout. OpenCode at $0 still leaves the model to pay for.

Measured · read 3 October 2026

What a call cost on one machine

Caprock reads Claude Code, Codex and OpenCode into one table. A call is one request to the model; each bar carries its sample's dates.

Median cost per call

  • Claude Code 18 Jul – 2 Oct 2026 $0.094
  • Codex mostly 10–28 Sep 2026 $0.032
  • OpenCode May – Jun 2026 $0.002
  • Cursor measured before Caprock read Cursor not measured
  • Gemini CLI no Gemini CLI session measured here not measured
Linear axis. Claude Code and Codex at their provider's list prices; OpenCode at the cost it computes itself, mostly on DeepSeek V4 Pro.
The three samples, from Caprock's export, read 3 October 2026
Agent Calls When Models Median context Cache hit Priced at
Claude Code 79,014 18 Jul – 2 Oct 2026 mostly Opus 5 and Opus 4.8 169K 98.8% Anthropic's list prices
Codex 16,415 mostly 10–28 Sep 2026 a third on Luna models 128K 97.6% OpenAI's list prices
OpenCode 9,309 May – Jun 2026 84% DeepSeek V4 Pro, 16% MiniMax M3 298K 98.7% OpenCode's own cost
Median context is the tokens of conversation a call re-sends; cache hit is the share of input read from the cache.

Run them all in one place

Several agents, one app.

Caprock is a desktop app for macOS, Windows and Linux that runs Claude Code, Codex, OpenCode and Gemini CLI in tabs and split panes per project. It also reads the Claude Code, Codex and OpenCode sessions you start elsewhere, and Cursor's Agent and Composer chats with the cost Cursor recorded. Live activity, cost per call and per repository, plan limits, history and search, in one table. Free, open source, local.

Install Caprock ↓

The full guide

AI coding agents, step by step

An AI coding agent is a program that takes a task in plain language, then reads your code, runs commands and edits files until the task is done, calling a language model at every step. This page compares five: Claude Code, OpenAI Codex, Cursor, OpenCode and Gemini CLI. They differ less in what they do than in who makes them, which models they run, how you pay, and how the plan stops you.

What an AI coding agent is

A chat assistant answers; an agent acts. You ask for a change, and the agent reads the files it needs, runs the tests, edits, runs them again, and reports back. Each of those steps is a call to a model, and each call re-sends the conversation so far. That is why agentic coding tools cost more than a chat: on one machine, the median Claude Code call re-sent 169K tokens of context, almost all of it read from the cache.

All five run in a terminal or an editor, on your own files. Claude Code and Codex also run on the web and in desktop apps; Cursor is an editor of its own, with an agent built in.

How the five differ

Who makes them. Anthropic makes Claude Code, OpenAI makes Codex, Anysphere makes Cursor, Google makes Gemini CLI, and Anomaly, the team behind SST, makes OpenCode.

Which models they run. Claude Code runs only Claude, Codex only OpenAI's GPT models, and Gemini CLI only Gemini. Cursor's agent runs models from Anthropic, OpenAI and Google, plus its own pool: Grok and Composer. OpenCode connects to more than 200 providers, so the model, and its price, is yours to pick.

How you pay. Claude Code and Codex come with a plan from their maker, paid plans from $20 a month (Codex also comes with ChatGPT Go at $8, in the desktop app), or bill an API key per token. Cursor sells its own plans, from $8 a month, with a weekly pool for its own models; Claude, GPT and Gemini bill at API list price on top, from Premium at $30. OpenCode costs nothing itself; you pay the provider of the model. Gemini CLI runs on a Gemini Code Assist licence or a paid API key; its free tier ended on 18 June 2026.

How the plan stops you. A Claude plan has a five-hour window and a weekly limit, shared with claude.ai; Ultra drops the five-hour window for verified accounts. Codex on ChatGPT Plus has a five-hour window and a weekly limit; ChatGPT Pro has no five-hour limit, and weekly limits may apply to any plan. Cursor counts a weekly pool. Gemini CLI counts model requests a day — and one prompt can make several. OpenCode Go caps dollars per model.

Free AI coding agents

Two of the five start at $0. OpenCode is free and open source, but the model is not: on a cheap open model the median call on my machine cost $0.002. Cursor's Free plan includes limited use of its own models. ChatGPT Free and Go include Codex in the desktop app, subject to rollout. Claude Free does not include Claude Code. Gemini CLI's free tier ended on 18 June 2026; Google moved free users to Antigravity CLI, with a weekly quota: Antigravity vs Claude Code.

Open-source coding agents

OpenCode is MIT-licensed, Gemini CLI Apache-2.0, and the Codex CLI Apache-2.0. Claude Code's licence reserves all rights to Anthropic, and Cursor's terms keep the software Anysphere's. Open source here means you can read and change the agent; the model it calls is still billed by whoever serves it. Every open-source agent, the editor extensions and the ones that stopped included, is in open-source AI coding agents.

Claude Code alternatives, free and paid

If you are leaving Claude Code over price or limits, the alternatives split in two. Codex and Gemini CLI swap the model as well as the agent: GPT or Gemini instead of Claude. Cursor's agent and OpenCode can keep Claude, but bill it at API rates rather than on a Claude plan; Anthropic does not allow third-party apps such as OpenCode to use a Claude Pro, Max or Ultra sign-in. If it is Claude you want, most of the day, a Claude plan is the flat-fee way to get it — and Claude Code runs inside Cursor as an extension, covered by that plan.

The free ones are Antigravity, Google's agent, on a weekly quota; OpenCode, with a model you pay for or one of OpenCode's free models; Codex on ChatGPT Free, in the desktop app; and Cursor's Free plan. What $0 gets on each, and the cheapest way into Claude Code itself: Is Claude Code free?

What they cost, measured

Plans say what you may use, not what the work costs. Caprock reads Claude Code, Codex and OpenCode on my machine and prices every call: at list prices for the first two, at OpenCode's own figure for the third. The medians are in the chart above. Most of the gap is the model — most Claude Code calls ran Opus 5 or Opus 4.8, a third of Codex's ran its cheaper Luna models, and most OpenCode calls ran DeepSeek V4 Pro — and the rest is how much context each call carried.

None of this ranks the agents. The three ran on different projects, in different weeks, on models priced very differently. Cursor is not measured, because these figures predate Caprock reading it (v0.177.0, 16 November 2026); Gemini CLI is not measured, because Caprock has measured no Gemini CLI session on this machine. The head-to-head pages go further on each pair: Codex, Cursor, OpenCode and Gemini CLI against Claude Code.

Using several at once

You can: Claude Code or Codex on a plan for long work, OpenCode on a cheap model for chores. Each keeps its own sign-in, its own limits and its own record. Each also sees only itself: /usage in Claude Code, /status in Codex.

Caprock puts them in one record. It is a free desktop app for macOS, Windows and Linux that reads Claude Code's and Codex's transcripts and OpenCode's database from disk, with nothing to configure, so the sessions you start in your own terminal are there too, and the telemetry of the Gemini CLI sessions it starts. Who is waiting on you, who is stuck, how close each subscription is to its limit, and what each session and repository cost at list price, in one table; the tabs and split panes it runs them in are how you live with that record. Since v0.177.0 it also reads Cursor's Agent and Composer chats, read-only, with the cost Cursor recorded per chat and model, and starts cursor-agent; Cursor's background agents and team usage stay on Cursor's servers and are not read. How it compares with other apps for running agents is in desktop apps for coding agents.

Free, open source; nothing leaves your machine. Install Caprock and it reads back every session those agents still have on disk.

Questions people ask

What is an AI coding agent?
A program that reads your code, runs commands and edits files on its own to finish a task you describe, calling a language model at each step. Claude Code, Codex, Cursor's agent, OpenCode and Gemini CLI all work this way.
What is the best free AI coding agent?
OpenCode is free and open source but you pay for the model, and Cursor's Free plan has limited use of its own models. Gemini CLI's free tier ended on 18 June 2026; Google's free agent is now Antigravity, with a weekly quota.
What are the best Claude Code alternatives?
Codex with ChatGPT Plus at $20, Cursor from $8 (Premium at $30 for Claude and GPT), OpenCode, free with any of 200+ providers, and Gemini CLI on a Code Assist licence or a paid API key. Cursor's agent and OpenCode can also run Claude, at API rates.
Is there a free alternative to Claude Code?
Yes: Google Antigravity on a weekly quota, OpenCode with a model you pay for or one of its free models, Codex on ChatGPT Free in the desktop app, subject to rollout, and Cursor's Free plan with limited use of its own models.
Which AI coding agent is cheapest?
To start, OpenCode costs nothing; Claude Code's paid entry plan is $20 a month; Codex comes with ChatGPT Go at $8 in the desktop app, subject to rollout, or Plus at $20; Cursor's is $8 for its own models only. Per call on one machine, OpenCode cost $0.002 at the median, Codex $0.032 and Claude Code $0.094.
Are there open-source AI coding agents?
Yes: OpenCode under MIT, Gemini CLI under Apache-2.0, and the Codex CLI under Apache-2.0. Claude Code and Cursor are not open source.
Can I use several AI coding agents at once?
Yes; each keeps its own sign-in and limits, and Claude Code also runs inside Cursor on a Claude plan. Caprock, a free desktop app, records Claude Code, Codex and OpenCode sessions whether or not it started them, and the Gemini CLI sessions it starts, in one table with each one's cost and limit. Since v0.177.0 (16 November 2026) it also reads Cursor's Agent and Composer chats, with the cost Cursor recorded.

Sources

Try it

The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.

Caprock is a desktop app: it installs on your computer, not your phone.

Or email yourself the link:

macOS, Windows and Linux. Your phone pairs with it by QR code. Install options →

Download on the App StoreDownload on the App Store

On an iPhone, pair it with the app.

Download for Mac

Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.

Download for Windows

Windows 10 22H2 or later, x64. Windows may ask once whether to run it: click More info, then Run anyway.

Paste it into Claude Code, Codex or any coding agent.

See what it says ▾
Install the Caprock desktop app for me. It is open source (Apache-2.0), a local
app for my coding agents: https://github.com/dspv/caprock

What the install does and how to remove it:
https://github.com/dspv/caprock/blob/master/docs/install-agent.md

Run the install script for my system: https://caprock.dev/mac.sh, /win.ps1 or
/linux.sh. Read it before you run it if you like. Leave my Claude Code settings
alone; the app asks me itself. Tell me when it's open.

Or run it yourself:

curl -fsSL https://caprock.dev/mac.sh | sh

Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app

Or run it yourself:

irm https://caprock.dev/win.ps1 | iex

Paste in PowerShell: it installs Caprock for you and opens it.

Or run it yourself:

curl -fsSL https://caprock.dev/linux.sh | sh

Paste in a terminal: it installs Caprock for you, no sudo. Or download the AppImage