Four terminal coding agents matter right now: Anthropic's Claude Code, OpenAI's Codex CLI, Google's Gemini CLI and the open source opencode. All four read your repo, edit files, run commands and connect to MCP servers. The differences are in who pays whom, which models you get, and how much control you have.
We have all four installed on the Mac this is written on, and we use Claude Code and Codex daily across about 30 projects. Prices, versions and limits below were checked on official pages on September 26, 2026. The biggest change since most comparisons were written: Gemini CLI no longer has a free tier for personal accounts.
- Best overall agent: Claude Code. Strongest at long, multi-step changes, with the richest skills, hooks and plugin system. Needs Claude Pro ($20/month) or API credit.
- Best if you already pay for ChatGPT: Codex. Included from ChatGPT Plus, open source CLI, strong sandboxing, a cloud version and GPT-6 models.
- Best for model freedom and cost: opencode. MIT licensed, works with 75+ providers, free models on its Zen gateway, or a $10/month Go plan.
- Gemini CLI is now for Google Cloud customers only. Free and Google AI Pro/Ultra users were moved to Antigravity CLI on June 18, 2026.
- Want free? Start with opencode plus free models, or Antigravity CLI. See our free AI coding agents guide.
The four at a glance
| Claude Code | Codex CLI | Gemini CLI | opencode | |
|---|---|---|---|---|
| Made by | Anthropic | OpenAI | Anomaly (formerly SST) | |
| Licence | Proprietary | Apache-2.0 | Apache-2.0 | MIT |
| GitHub stars | ~148k | ~127k | ~107k | ~210k |
| Latest version | 2.1.283 (Sept 25) | 0.157.1 (Sept 26) | 0.61.0 (Sept 23) | 1.18.32 (Sept 21) |
| Default models | Claude Opus 5.5, Sonnet 5 | GPT-6 Sol, Astra, Luna | Gemini 3.x (auto routing) | Any: 75+ providers |
| Context window | 1M tokens | About 1M tokens | 1M tokens | Depends on model |
| Cheapest way in | Claude Pro, $20/mo | ChatGPT Plus, $20/mo | Code Assist Standard licence or paid API key | Free (bring a model) |
| Free tier | No | Desktop app only, limited | No (since June 18, 2026) | Yes, free models on Zen |
| Instructions file | CLAUDE.md (reads AGENTS.md too) | AGENTS.md | GEMINI.md | AGENTS.md, falls back to CLAUDE.md |
| MCP, skills, hooks | Yes, yes, yes | Yes, yes, yes | Yes, yes, yes | Yes, yes, plugins |
| Cloud / web version | Yes | Yes | No | No |
Stars are rounded GitHub counts. opencode's lead partly reflects that it is fully open source and model-neutral, so the whole BYOK crowd lands there.
How we scored: each agent gets a score out of 10 from daily use across about 30 of our own repos, weighing the quality of results first, then price and free access, then the extension ecosystem. Scores reflect September 2026 and will change as the tools do.
Claude Code
Pros
- Best results we have seen on long, multi-file changes
- Deepest extension system: skills, plugins, hooks, subagents, MCP
- Permission modes from ask-everything to a classifier-based auto mode, plus a Bash sandbox
- Runs in the terminal, VS Code, JetBrains, a desktop app, the web and Slack
- Reads AGENTS.md natively since 2.1.277, so shared repos just work
Cons
- Not open source
- No free tier: the free Claude plan does not include Claude Code
- Heavy Opus use burns through Pro limits fast; Max plans start at $100/month
- Locked to Claude models unless you point it at a gateway
Claude Code is the agent we reach for when a change touches ten files and needs a plan. Since version 2.1.280, Opus 5.5 is the default model on every paid plan and the API, with a native 1 million token context. The ecosystem is its real edge: skills and plugins let you teach it your workflow once, hooks run your scripts on events, and the official plugin marketplace has over 300 entries.
Pricing: Claude Pro is $20 a month ($17 billed yearly). Max starts at $100 a month for five times the Pro usage, with a higher 20x tier. Team plans are $25 per seat (Standard) or $125 (Premium). You can also pay per token with an API key.
Install: curl -fsSL https://claude.ai/install.sh | bash, or brew install --cask claude-code.
Can you run it cheaper? Yes. Claude Code talks to any Anthropic-compatible endpoint, so you can use Claude Code for free with OpenRouter models. Quality drops, but the tooling stays.
Claude Code
Best overall agent. The strongest results on long, multi-file changes and the deepest skills and plugin ecosystem. Worth the $20 if you code most days.
Codex CLI
Pros
- Open source (Apache-2.0) and written in Rust: fast to start
- Included with ChatGPT Plus, so many people already pay for it
- Clear sandbox levels: read-only, workspace-write, full access
- Same account covers the CLI, IDE extension, desktop app and Codex cloud
- codex exec and an SDK for CI and scripts
Cons
- CLI needs ChatGPT Plus or higher; the free plan only gets the desktop app
- Plus limits on GPT-6 Sol are tight for heavy days
- Smaller skills and plugin ecosystem than Claude Code
- GPT-5.5 leaves Codex on October 14, 2026, so pinned configs need updating
Codex has become a genuine rival over the past year. The CLI is open source, very fast, and ships new versions almost daily (0.157.1 landed the morning we checked). Version 0.157.0 added the GPT-6 Sol and Luna models: Sol is OpenAI's recommended pick for complex coding, Luna the cheap fast option, and Astra the most capable.
The sandbox model is the clearest of the four. You choose read-only, workspace-write or full access, then an approval policy on top. For teams nervous about an agent running shell commands, that is easy to explain to security.
Pricing: included with ChatGPT Plus ($20 a month), with usage limits per 5-hour window. Pro starts at $100 a month with five times the usage. Business is $25 per user. An API key also works, but without the cloud features. ChatGPT Free and Go users get limited GPT-6 Luna access in the Codex desktop app only.
Install: npm install -g @openai/codex or brew install --cask codex.
Codex CLI
Best value if you already pay for ChatGPT. Open source, fast, clear sandboxing, and one account covers the CLI, IDE, desktop and cloud.
Gemini CLI (and Antigravity CLI)
On June 18, 2026, Google stopped serving Gemini CLI and the Gemini Code Assist IDE extensions for free users and for Google AI Pro and Ultra subscribers. Those users were moved to Antigravity CLI. Gemini CLI still works with a Gemini Code Assist Standard or Enterprise licence, or a paid API key. The "1,000 free requests a day" line you still see in its README and in many articles is out of date.
Pros
- Open source (Apache-2.0), with a large extension ecosystem
- 1 million token context
- Daily quotas of 1,500 (Standard) or 2,000 (Enterprise) requests on business licences
- Good fit if your company already runs on Google Cloud
Cons
- No longer usable for free with a personal Google account
- Consumers are pushed to a different tool, Antigravity CLI
- Its docs still reference older models and the old free quotas
- Code Assist for GitHub stopped taking new installs in June
Gemini CLI was the default "free AI coding agent" for most of 2025. That is over. It is now effectively an enterprise tool: good if your company buys Gemini Code Assist, not a sensible choice for a side project.
Antigravity CLI (agy) is Google's replacement for everyone else. It keeps the skills, hooks, subagents and extensions from Gemini CLI, and its free individual tier offers Gemini 3.x Flash, Gemini 3.1 Pro and some Claude and GPT-OSS models under weekly rate limits. It is newer (version 1.2.11 at the time of writing), closed licence, and a much smaller community so far. We cover it in our free AI coding agents guide.
Gemini CLI
Still a capable open source agent, but enterprise only since June 2026. Personal users should look at Antigravity CLI or opencode instead.
opencode
Pros
- MIT licensed and fully model-neutral: 75+ providers, local models included
- Free models on its Zen gateway, or a $10/month Go plan with generous open-model limits
- Reads CLAUDE.md and ~/.claude/skills, so a Claude Code setup mostly carries over
- Polished terminal UI, desktop app and a GitHub integration
- Can log in with GitHub Copilot or ChatGPT Plus accounts
Cons
- Results depend entirely on the model you pick
- Cannot use a Claude Pro or Max subscription (Anthropic prohibits it); Claude needs an API key
- Free Zen models rotate and are marked limited time
- No hosted cloud agent
opencode is the one to pick if you care about freedom or cost. It does not sell a model of its own. Instead it connects to whatever you bring: an Anthropic or OpenAI key, OpenRouter, a local Ollama model, or its own gateways. Zen is pay-as-you-go at provider rates with a rotating set of free models. Go is $10 a month and covers open models like GLM, Kimi, Qwen and DeepSeek up to per-model monthly limits.
We keep it installed as the "any model" agent: when a new open model launches, opencode is usually the fastest way to try it on real code.
Install: curl -fsSL https://opencode.ai/install | bash, or brew install anomalyco/tap/opencode.
opencode
Best for model freedom and cost. MIT licensed, 75+ providers, free models on Zen. Only as good as the model you pick.
Feature comparison
| Feature | Claude Code | Codex CLI | Gemini CLI | opencode |
|---|---|---|---|---|
| Subagents | Yes | Yes | Yes | Yes |
| Skills (SKILL.md) | Yes | Yes | Yes | Yes |
| Hooks | Yes | Yes | Yes | Via plugins |
| Plugins / extensions | Plugin marketplace | Plugins | Extensions | Plugins |
| MCP servers | Yes | Yes | Yes | Yes |
| Headless / CI mode | claude -p | codex exec | Headless with JSON output | opencode run |
| GitHub integration | claude-code-action | Codex GitHub Action | run-gemini-cli action | opencode github install |
| IDE extensions | VS Code, JetBrains | VS Code and forks | Code Assist extensions | IDE integration |
| Sandbox | Bash sandbox + permission modes | read-only / workspace / full | Sandbox + trusted folders | Per-tool allow, ask, deny |
On features the four have mostly converged. Every one now supports MCP and SKILL.md skills, which means an MCP server you add to any of these agents or a skill you write once works across all of them. The differences that remain are the model quality and the price.
Which one should you use?
- You want the best results and will pay $20+ a month: Claude Code. It is the most capable agent we have used for real multi-file work.
- You already pay for ChatGPT Plus: Codex. You are already paying for it, and it is very good.
- You want open source and model choice: opencode. Pair it with a cheap open model or the Go plan.
- You are on a zero budget: opencode with free Zen or OpenRouter models, or Google's Antigravity CLI free tier.
- Your company is on Google Cloud with Code Assist licences: Gemini CLI.
Many developers, us included, run two: a premium agent for hard work and opencode for experiments and cheap bulk tasks. The same AGENTS.md file serves both. See our AGENTS.md and CLAUDE.md examples for how to set that up.
Is Claude Code better than Codex?
What is the difference between Gemini CLI and Antigravity CLI?
Which AI coding CLI is open source?
Can I use my Claude Pro subscription in opencode?
Do these agents share the same config files?

Sumit
ContributorHi, I'm Sumit, Being an introvert I have always been obsessed with technology-computers and reading dozens of posts to learn, find answers out of my curiosity. I love to write as I explore more.






