AI dev workflow
M. Patel7 min read10 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 free exploration and giant context; Claude Code wins for consistent multi-file changes. A 2026 field log with my routing rule.

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

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. Gemini CLI is free with a personal Google account (60 requests a minute, 1,000 a day) and swallows a large repo whole thanks to its 1M-token context. Claude Code costs money (Claude Pro at 20 dollars a month, Max from 100) but 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. Sign in with a personal Google account and you get Gemini 3 Pro for free at 60 requests per minute and 1,000 requests per day, with a 1M-token context window and MCP support baked in. The numbers and the license are right there in Gemini CLI's GitHub repo.

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 tokens I was paying for while Gemini did the same recon for free.

For "help me understand this codebase," free plus giant context is a real edge. 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. Gemini CLI free, Claude Code 20 a month, verdict rendered.

That 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 and it was free, so it won outright. On the multi-file write, Gemini was free but its supervision tax was high (I caught a real bug and reverted an unasked-for refactor), while Claude Code cost tokens but its tax was low enough that I shipped faster overall.

Free is not the same as cheap. A free agent that needs a careful human on every diff can cost you more wall-clock time than a paid one that lands the change the first time. Price the human minutes, not just the subscription.

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 would rather spend zero dollars and read a big codebase in one shot. 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 startFree with a Google accountPaid: 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-tier limits60 req/min, 1,000 req/dayNo free coding tier
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. Free, 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.

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?
Gemini CLI is free with a personal Google account, at 60 requests per minute and 1,000 requests per day (source: its GitHub repo, 2026). Claude Code has no 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 free large-context 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 for free, 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?

Gemini CLI is free with a personal Google account, at 60 requests per minute and 1,000 requests per day (source: its GitHub repo, 2026). Claude Code has no 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 free large-context 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 for free, 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.