Claude Code, Codex or Copilot: Which One?
Claude Code vs Codex vs Copilot: what the three coding agents do per their docs, what they cost (as of October 2026), and why I chose Claude Code.
Read the articleOctober 26, 2026 · Updated on October 30, 2026 · 21 min read
The main Claude Code alternatives in October 2026 are Cursor, GitHub Copilot with its CLI, OpenAI's Codex, Google's Gemini CLI, the open-source OpenCode and xAI's Grok Build. Cursor is mainly an editor with an agent and also has a CLI. Copilot CLI is a terminal agent that GitHub lists in all Copilot plans, Copilot Free included; Codex is available in the terminal from ChatGPT Plus or with an API key. Gemini CLI is open source, but for personal Google accounts it was replaced by Antigravity CLI on June 18, 2026. OpenCode works with models from many providers, local ones included, and Grok Build has been in beta since May 2026. If you want to keep Claude Code and only swap the model, that is technically possible through a local server with an Anthropic-compatible API, such as Ollama; Anthropic explicitly does not support it, though. Which alternative fits depends less on the model than on where you work, which subscriptions you already pay for and how much control over approvals you need.
I have used Claude Code every day since its launch, and my AI employees on Claude Code run on it. I regularly use Codex as a reviewer next to Claude Code, I run Pi against a Qwen model locally, and I have tested GitHub Copilot but not used it permanently. I did not test Cursor, Gemini CLI, OpenCode or Grok Build myself for this article. Everything about them comes from the vendors, retrieved on October 26, 2026. Where I have a detailed one-on-one comparison, I link to it instead of repeating it here.
Claude Code is an agent that works in a folder: it reads files, changes them, runs commands, reads your rules from a file like CLAUDE.md and asks before risky steps. An alternative has to run the same loop, otherwise it is a chat with code suggestions. When choosing, I look at five points:
For the "no cloud at all" case, I worked through these criteria in detail in Claude Code Alternative Without Cloud. If you have such agents build programs without reading the code, you are vibe coding. What vibe coding means and where the risks are is covered in a separate article.
| Tool | Where it runs | Models | Access according to the vendor | Status on October 26, 2026 |
|---|---|---|---|---|
| Cursor | editor with an agent, plus CLI and cloud agents | Grok models in the plan, other providers from Premium at API list price | X Subscription plans: Free limited, Plus 8 dollars, Premium 30 dollars a month | Agent SDK generally available since October 20 |
| GitHub Copilot CLI | terminal, plus agent mode in the IDE and a cloud agent | models from several providers, Claude included; local models via Ollama | in all Copilot plans, Copilot Free included | dynamic workflows since October 1, local models since October 7 |
| Codex | terminal (open-source CLI), IDE extension, desktop app, web | OpenAI models | CLI, IDE and web from ChatGPT Plus (20 dollars), or with an API key | CLI version 0.164.0 of October 23 |
| Gemini CLI | terminal, open source | Gemini models | with a Gemini API key, Vertex AI or a Code Assist license; for personal accounts replaced by Antigravity CLI on June 18 | version 0.65.0 of October 20 |
| OpenCode | terminal, desktop app, IDE extension, open source | over 75 providers, local models included | tool is free, models through your own keys or a Copilot or ChatGPT sign-in | version 1.19.4 of October 22 |
| Grok Build | terminal, headless in scripts, via Agent Client Protocol | Grok models, custom models according to the docs | browser sign-in or xAI API key; per the pricing page Free limited, full from Plus | beta since May 2026 |
Cursor is a code editor with a built-in agent and also has a CLI: according to the docs you start it with agent, it supports the same modes as the editor and can hand a running task to a cloud agent. New according to the changelog are remote control of local agents from the iOS app (October 6, 2026) and the Agent SDK, which lets you define an agent as a folder of code, test it with evals and deploy it (October 20, 2026).
The pricing page lists Cursor in the same plans as Grok and X. Free at 0 dollars includes the agent with limited usage. According to Cursor, Plus at 8 dollars a month includes only Grok models. From Premium at 30 dollars, models from other providers are available, at API list price and billed separately. For you as a Claude user, that means Claude in Cursor costs extra on top of the plan. The detailed comparison of models, pricing and data handling is in Claude Code vs Cursor: Which Fits You?.
Next to agent mode in the IDE and the cloud agent on GitHub, there is the Copilot CLI for the terminal. According to GitHub it is available with all Copilot plans, Copilot Free included, where it comes with an allowance of credits and automatic model selection; if you get Copilot through your company, the organization has to enable it. The CLI has a plan mode, programmatic use with -p for scripts, and can be embedded in other programs through the Agent Client Protocol. Since October 1, 2026, dynamic workflows are available in the CLI and the Copilot app, and since October 7, 2026, CLI version 1.0.94-0 and later finds models from a running Ollama instance with /model.
How Copilot and Claude Code differ on models, pricing, agents and data handling is covered in detail in Claude vs Copilot for Coding: Which One?. I won't repeat it here.
Codex is OpenAI's coding agent for the terminal, IDE, desktop app and web. The CLI is open source (Apache 2.0); the current version 0.164.0 came out on October 23, 2026. According to the pricing page, Codex and ChatGPT Work are included in the ChatGPT plans, but Free and Go only with GPT-6 Luna in the desktop app and "subject to rollout". OpenAI lists Codex on the web, in the CLI and in the IDE extension from Plus at 20 dollars a month. Pro comes at 100, 200 and 500 dollars, Business at 20 dollars per user per month on annual billing with at least two users. Alternatively, the CLI runs with an API key, billed at API prices.
For me Codex is not a replacement but the second pair of eyes: Claude Code builds something, Codex checks it with a fresh view, or the other way around. The three-way comparison with Copilot is in Claude Code, Codex or Copilot: Which One?. What the Codex plans give you in usage is covered in my article on Codex pricing. How to install Codex and set it up as a reviewer is in Install Codex.
Gemini CLI is Google's open-source terminal agent (Apache 2.0); the current version 0.65.0 came out on October 20, 2026. For individual users a lot changed in 2026: since June 18, 2026, Google no longer serves Gemini CLI requests for Gemini Code Assist for individuals, Google AI Pro and Google AI Ultra, and Login with Google no longer works for those accounts. Google points to Antigravity CLI instead. For Code Assist Standard and Enterprise, Google names a separate deprecation schedule.
According to the README, Gemini CLI still works with a Gemini API key, through Vertex AI or with a paid Code Assist license from your organization. Google also says itself that Gemini CLI has not been optimized for Gemini 4 Argon and recommends Antigravity for that. How Claude and Gemini differ overall is in Claude vs Gemini 2026: Compared.
OpenCode is an open-source coding agent (MIT license) for the terminal, desktop and IDE; the current version 1.19.4 came out on October 22, 2026. According to OpenCode, it connects to over 75 model providers, local models through Ollama, LM Studio or llama.cpp included, and lets you sign in with a GitHub Copilot or a ChatGPT Plus or Pro account. The tool itself is free and comes with a few free models; according to OpenCode, your data is only stored when you use those free models.
You use Claude models in OpenCode with an API key from the Anthropic Console. The Claude subscription itself is not meant for this: according to Anthropic, OAuth sign-in is intended exclusively for subscribers and "ordinary use of Claude Code and other native Anthropic applications", and third-party developers may not route requests through Free, Pro or Max credentials. OpenCode says in its docs that Anthropic "explicitly prohibits" plugins for Pro and Max; since version 1.3.0, OpenCode no longer bundles those plugins. OpenCode reads project rules from an AGENTS.md. How to configure OpenCode against a local model, and why the context window is the most common trap there, is in Running AI Agents Locally: What Works.
Grok Build is xAI's coding agent; the docs now name the vendor SpaceXSI. It runs as a fullscreen interface in the terminal, headless in scripts (grok -p) and inside other programs through the Agent Client Protocol. According to the release notes it has been in beta since May 2026. You sign in through the browser, or with an xAI API key where no browser is available, and according to the X Subscription pricing page, Grok Build is available in limited form on the Free plan and in full from Plus at 8 dollars a month. Besides Grok models, Grok Build can use custom models through a base_url in its config file, according to the docs.
For companies, the docs list zero data retention at team level and one feature for mixed environments: Grok Build reads part of Claude Code's managed settings, namely permission rules, MCP server allowlists, a few telemetry flags and marketplace restrictions. Grok Build's own policy file takes precedence. I have not tested Grok Build. How Grok and Claude differ overall is in my comparison Grok vs Claude.
Many people look for an alternative because they want to run Claude Code with a different or a local model. Technically that works: through the ANTHROPIC_BASE_URL environment variable, Claude Code talks to a server that mimics Anthropic's API. Ollama documents its own command for this, ollama launch claude, or a manual setup with ANTHROPIC_BASE_URL=http://localhost:11434 and claude --model <model>. For local models, Ollama recommends a context window of 64k or more.
Three things to know first:
CLAUDE_CODE_MAX_CONTEXT_TOKENS to the real value for a model ID that does not start with claude-.The alternatives are more open here: OpenCode and Grok Build connect other models through their configuration, and Copilot CLI finds models from a running Ollama instance by itself. I do not run Claude Code against a local model. Locally I run Pi against Qwen 3.8 on a DGX Spark; how well that works and where it hits limits is in Claude Code Alternative Without Cloud and in Qwen vs Claude: Local Versus Cloud.
The biggest effort in a switch is rarely the tool itself, but your rules and workflows. Rule files, skills and MCP servers are now known across several tools: OpenCode and Codex read an AGENTS.md, and since version 2.1.277 Claude Code does too when there is no CLAUDE.md. Hooks, permission rules and plugins, on the other hand, are built differently in each tool, even when the names are similar. The exception is Grok Build, which reads part of Claude Code's managed settings.
What survives a switch, and how I build my team so it doesn't depend on one tool, is in CLAUDE.md vs AGENTS.md: What Survives. Which components Claude Code means by skill, hook, plugin and mod is explained in Claude Code Extensions: Plugins, Mods, Skills.
To be honest: Claude Code has no free tier. According to Anthropic it is included in all paid plans and shares usage with the chat, with a five-hour window and weekly limits on top. The five-hour window applies to Pro and Max (formerly Max 5x); Ultra (called Max 20x until October 30, 2026) no longer has a five-hour limit for verified accounts, and the weekly limit stays. If you don't want a Claude subscription or already pay for another one, you have good reasons for an alternative. My rules of thumb, without my own tests of most of these tools:
I stay with Claude Code because my team is built on CLAUDE.md, skills, hooks and approvals, and because I want to be asked before every risky step. I still think a second tool as a reviewer next to it makes sense.
There is no single best one. For an editor, Cursor is the obvious choice, for GitHub teams Copilot, for ChatGPT users Codex, for a free choice of model OpenCode. What matters is where you work, which subscriptions you have and how you want to handle approvals.
OpenCode is free and comes with a few free models; for other providers you pay their prices. According to GitHub, Copilot CLI is also included in Copilot Free, with a limited allowance and automatic model selection. Cursor and Grok Build have a limited Free tier in the X Subscription. In ChatGPT Free, Codex is only available in the desktop app with GPT-6 Luna, subject to rollout.
Technically yes, through a server with an Anthropic-compatible API such as Ollama and the ANTHROPIC_BASE_URL variable. Anthropic explicitly does not support it, and Claude Code assumes 200,000 tokens of context for unknown models until you set CLAUDE_CODE_MAX_CONTEXT_TOKENS.
Anthropic states that third-party developers may not route requests through Free, Pro or Max credentials; for their own products, Anthropic points to API keys. According to the OpenCode docs, Anthropic therefore also prohibits plugins that use a Pro or Max subscription in OpenCode. In OpenCode you need an API key for Claude. In Cursor, Claude models run through Cursor's own billing at API list price, not through your Claude subscription.
For personal accounts, meaning the unpaid tier, Google One and Google AI Pro and Ultra, Google replaced Gemini CLI with Antigravity CLI on June 18, 2026. Gemini CLI itself remains open source and runs with a Gemini API key, through Vertex AI or with a Code Assist license from your organization.
Pick the alternative that fits where you work and the subscriptions you already have, then read the matching comparison: Claude Code vs Cursor, Claude vs Copilot for Coding or Claude Code, Codex or Copilot. If the local route appeals to you, start with Running AI Agents Locally: What Works. How others use Claude Code day to day, and when they still add a second tool, is what I show in my community AI Employee Framework.
Claude Code vs Codex vs Copilot: what the three coding agents do per their docs, what they cost (as of October 2026), and why I chose Claude Code.
Read the articleGrok vs Claude (October 2026): subscriptions, API prices, models, agents, privacy and processing location in one table, from a daily Claude user.
Read the article
Kevin Welter
Developer, IT architect, author of technical books (Kubernetes, cloud infrastructures) and speaker. Runs his business with an AI workforce of fifteen AI employees and shows solo business owners in his community how to hire their first AI employee.
Your first AI employee up and running within an hour
Join the community$5/month founding price, first 50 members