AI dev workflow
M. Patel10 min read167 views

Gemini CLI vs Claude Code: One Feature, Both Ways (2026 Field Log)

I ran the same webhook-handler feature through Gemini CLI and Claude Code on one repo. Gemini CLI wins for large-repo exploration and giant context; Claude Code wins for consistent multi-file changes. A 2026 field log with my routing rule, corrected after Google withdrew Gemini CLI's free individual tier.

Updated on August 23, 2026

Two minimalist terminal windows on a dark navy desk, one glowing blue-violet for Gemini CLI and one glowing terracotta for Claude Code, separated by a lime-green line
Two minimalist terminal windows on a dark navy desk, one glowing blue-violet for Gemini CLI and one glowing terracotta for Claude Code, separated by a lime-green line
On this page

Correction, August 23, 2026. This post was published on August 7, 2026 on a premise that was already false: that Gemini CLI is free with a personal Google account at 60 requests a minute and 1,000 a day. Google announced on May 19, 2026 that on June 18, 2026 Gemini CLI and the Gemini Code Assist IDE extensions would stop serving requests for Google AI Pro and Ultra users and for anyone using it free of charge through Gemini Code Assist for individuals. That date had passed seven weeks before I wrote this. Gemini CLI now needs a paid Gemini Code Assist Standard or Enterprise licence, or paid Gemini and Gemini Enterprise Agent Platform API keys; Google's replacement for individuals is Antigravity CLI, which it says is available to everyone. I have corrected every pricing claim below and re-derived the routing rule, because the old one rested on a free tier that did not exist. The hands-on results, the bug Gemini wrote, and the supervision-tax argument are unchanged: those never depended on the price.

Quick answer (2026): Gemini CLI and Claude Code are both terminal-first AI coding agents, and on raw model quality they are close enough in 2026 that the benchmark argument is a distraction. I gave both the same job on one repo: build a webhook handler end to end. Both cost money in 2026: Gemini CLI lost its free individual tier on June 18, 2026 and now runs on a paid Gemini Code Assist licence or paid Gemini API keys, and Claude Code needs a paid Claude plan (Pro at 20 dollars a month, Max from 100). Gemini CLI swallows a large repo whole thanks to its 1M-token context. Claude Code stayed more consistent across the multi-file change and needed less babysitting. My rule after a week: reach for Gemini CLI to explore, reach for Claude Code to ship.

I keep seeing the same thread. Someone asks why Gemini CLI is not as good as Claude Code, a hundred people nod, and nobody says what "good" means for the thing they are actually doing.

So I stopped reading and ran both on one repo.

Gemini logo Gemini CLI and Claude logo Claude Code got the exact same task on the same afternoon: add a Stripe-style webhook handler to a small Node service. New route, signature verification, a couple of event branches, and tests. Multi-file, but boxed. The kind of chore I do for real.

Here is what actually happened.

What each one is, in one line (2026)

Gemini logo Gemini CLI is Google's open-source (Apache 2.0) terminal agent, with a 1M-token context window and MCP support baked in. The license is right there in Gemini CLI's GitHub repo. What is not in the repo README is the part that matters for pricing: individual free access ended on June 18, 2026, so running it today means a paid Gemini Code Assist Standard or Enterprise licence, or paid Gemini and Gemini Enterprise Agent Platform API keys.

Claude logo Claude Code is Anthropic's terminal agent (it also runs in your IDE, desktop app, and browser now). It needs a paid Claude plan (Pro at 20 dollars a month, or 17 billed annually; Max from 100) or Console pay-as-you-go, and it ships plan mode, subagents, hooks, skills, a CLAUDE.md memory file, and /rewind checkpoints. All documented in Claude Code's docs.

Both read about a million tokens of context. Both take MCP servers. On public 2026 coding benchmarks they land within a point of each other, which is exactly why I quit staring at the leaderboard.

Round 1: reading the repo

This round went to Gemini CLI, and it was not close.

I pointed both at the repo cold and asked "where does an inbound request get authenticated, and where would a new webhook route fit." Gemini CLI pulled the whole thing into context and answered with the right files on the first try. The 1M window means it just reads everything instead of guessing which three files matter.

Claude Code got there too, but it explored in steps, opening files, running a grep, opening more. Smart, a little slower, and it burned more tokens getting to the same map.

For "help me understand this codebase," a window big enough to hold the whole repo is a real edge, and it is a capability edge rather than a price one. Do not let the Reddit consensus talk you out of it.

Round 2: writing the handler

This round flipped hard to Claude Code.

The webhook handler touches four files: the route, a signature util, an events module, and the test file. Claude Code's plan mode laid out those four edits before it wrote anything, I nudged one detail, and it executed the whole change coherently. The signature check it wrote was the boring correct version:

javascript
function verifySignature(rawBody, header, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(rawBody, 'utf8')
    .digest('hex');
  // timing-safe compare so we don't leak the secret byte by byte
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(header)
  );
}

Gemini CLI wrote a working handler faster, but it drifted. It verified the signature against a parsed JSON body instead of the raw bytes, which quietly breaks real Stripe signatures, and it wandered into refactoring my error middleware that I never asked it to touch. Good code, wrong scope, and a bug I only caught because I know this failure mode.

That is the split in one feature. Gemini generates quickly and confidently; Claude Code stays inside the lines of a multi-file change.

Round 3: the second pass

Tests were a wash on correctness. Both wrote reasonable coverage.

The difference was steering. When I said "the raw body matters here, redo the verification," Claude Code narrated what it was about to change and let me interrupt. Gemini CLI applied a broader edit and I had to re-read more of the diff to trust it. On a boxed chore that is fine. On a change I care about, being able to stay in the loop is worth money, which is an odd thing to say about the tool that costs money.

The axis nobody prices: the supervision tax

Every comparison I read stops at the sticker price. I did it too, in the first version of this post: Gemini CLI free, Claude Code 20 a month, verdict rendered. That line was wrong twice over: wrong as a fact, because the free tier had already been withdrawn, and wrong as a method even if the fact had held.

The sticker price is the wrong ledger.

The number I actually care about is cost per accepted diff, and the hidden term in it is the supervision tax: how many minutes I spend reading, correcting, and re-prompting before I trust the change. On the recon round, Gemini's tax was near zero, so it won on the metric that matters. On the multi-file write, its supervision tax was high (I caught a real bug and reverted an unasked-for refactor), while Claude Code's was low enough that I shipped faster overall.

Cheap is not the same as cheap. An agent that needs a careful human on every diff can cost you more wall-clock time than a dearer one that lands the change the first time. Price the human minutes, not just the subscription. That held when I thought one side was free, and it holds now that neither is, which is the tell that it was the right axis and the price was never it.

So which is better? The honest answer

The r/GeminiCLI thread that keeps circulating is not wrong that Claude Code is more consistent on hard multi-file work. It is wrong that this settles it.

Gemini CLI is genuinely the better call when the job is exploration, large-repo reconnaissance, one-off scripts, or any throwaway spike where you want to read a big codebase in one shot instead of hunting through it file by file. Claude Code is the better call when you are landing a real feature across several files and you want plan mode, tight scope, and the ability to steer mid-change.

They are not the same tool wearing different hats. They fail differently, and you route by the failure you would rather manage.

Gemini CLI vs Claude Code, side by side (2026)

Scroll to see more

AxisGemini CLIClaude Code
Price to startPaid: Gemini Code Assist licence or Gemini API keysPaid: Pro 20/mo (17 annual), Max from 100, or API
LicenseOpen source (Apache 2.0)Proprietary
Default modelGemini 3 ProClaude (Sonnet / Opus / Haiku)
Context window~1M tokens~1M tokens
Free individual tierWithdrawn June 18, 2026Never had one
Repo reconnaissanceExcellent (reads everything)Good, more stepwise
Multi-file consistencyDrifts, wider scopeStays in scope, plan mode
Steering mid-changeCoarserFine, interruptible
MCP supportYesYes
Best forExplore, scripts, spikesShip real features

My routing rule

Here is the rule I wrote on a sticky note after this week.

If I am trying to understand something, or the work is disposable, Gemini CLI. Huge context, fast enough, and the drift does not matter when I am going to throw the output away anyway.

If I am trying to land something real across more than two files, Claude Code. I pay for the plan and the plan mode earns it back in diffs I do not have to babysit.

Most weeks I use both, in that order: Gemini to map the territory, Claude Code to build on it. If you have only tried one, try the other on the task it is actually good at before you repeat the thread everyone else is repeating.

If you want the same test on other agents, I did this with Codex and Claude Code and with Cursor and Claude Code too.

One update worth knowing if you are weighing Google's agents specifically: Gemini CLI is not Google's only shot at this. Antigravity, its agent platform, lets you select Claude Sonnet 4.6 and Claude Opus 4.6 directly, free tier included, which turns the whole Google-versus-Anthropic framing on its head.

Field note, not a benchmark. n = 1 repo, one afternoon. Your repo and your tolerance for babysitting will move the verdict.

Frequently asked questions

Is Gemini CLI free and is Claude Code free in 2026?
Neither is. Gemini CLI's free individual tier ended on June 18, 2026; it now needs a paid Gemini Code Assist Standard or Enterprise licence, or paid Gemini and Gemini Enterprise Agent Platform API keys. Claude Code has never had a free coding tier; it needs a Claude Pro plan at 20 dollars a month (17 billed annually), a Max plan from 100 dollars, or Console pay-as-you-go.

Does Gemini CLI have subagents and plan mode like Claude Code?
Claude Code ships plan mode, subagents, hooks, and skills as first-class features in 2026. Gemini CLI is scriptable and supports MCP servers, but its multi-agent and planning story is thinner, which showed up as looser scope on my multi-file change.

Which has the bigger context window?
Both advertise roughly a 1M-token context window in 2026, so on raw capacity they are comparable. In practice Gemini CLI leaned on that window harder for whole-repo reading.

Is Gemini CLI actually worse than Claude Code?
For consistent multi-file feature work, Claude Code was more reliable in my test. For repo exploration, one-off scripts, and wide single-pass reading, Gemini CLI was the better tool. "Worse" depends entirely on the job.

Can I use both together?
Yes, and I do. Gemini CLI to explore and map an unfamiliar codebase in one pass, then Claude Code to implement the change with plan mode and tighter scope.

Do both support MCP servers?
Yes. Both Gemini CLI and Claude Code support the Model Context Protocol in 2026, so custom tool integrations work on either.

M

Written by

M. Patel

Frequently asked questions

Is Gemini CLI free and is Claude Code free in 2026?

Neither is. Gemini CLI's free individual tier ended on June 18, 2026; it now needs a paid Gemini Code Assist Standard or Enterprise licence, or paid Gemini and Gemini Enterprise Agent Platform API keys. Claude Code has never had a free coding tier; it needs a Claude Pro plan at 20 dollars a month (17 billed annually), a Max plan from 100 dollars, or Console pay-as-you-go.

Does Gemini CLI have subagents and plan mode like Claude Code?

Claude Code ships plan mode, subagents, hooks, and skills as first-class features in 2026. Gemini CLI is scriptable and supports MCP servers, but its multi-agent and planning story is thinner, which showed up as looser scope on my multi-file change.

Which has the bigger context window, Gemini CLI or Claude Code?

Both advertise roughly a 1M-token context window in 2026, so on raw capacity they are comparable. In practice Gemini CLI leaned on that window harder for whole-repo reading.

Is Gemini CLI actually worse than Claude Code?

For consistent multi-file feature work, Claude Code was more reliable in my test. For repo exploration, one-off scripts, and wide single-pass reading, Gemini CLI was the better tool. Worse depends entirely on the job.

Can I use Gemini CLI and Claude Code together?

Yes, and I do. Gemini CLI to explore and map an unfamiliar codebase in one pass, then Claude Code to implement the change with plan mode and tighter scope.

Do both Gemini CLI and Claude Code support MCP servers?

Yes. Both Gemini CLI and Claude Code support the Model Context Protocol in 2026, so custom tool integrations work on either.