Both are current, actively shipping terminal coding agents, and the decision is not about which writes better code — it is about which escape hatch you need. GitHub Copilot CLI documents a BYOK path with three provider types — openai, which covers any OpenAI Chat Completions-compatible endpoint, plus azure and anthropic — and that path drops the GitHub account requirement, at the cost of three GitHub-hosted features. Claude Code speaks only Anthropic-shaped formats, with no OpenAI-compatible path, and Anthropic writes that it does not support routing Claude Code to non-Claude models through any gateway. Everything else in this comparison follows from that asymmetry.
Version anchors, checked September 18, 2026. Copilot CLI's latest stable release is v1.0.86, published September 17, 2026, distributed on npm as @github/copilot with a copilot binary. Claude Code's npm latest was 2.1.276 and stable 2.1.267, with node >= 22 required.
First, make sure you are comparing the live product
Most writing that ranks for “Copilot CLI” describes a different, dead tool. The gh copilot extension — officially “GitHub Copilot in the CLI” — was deprecated on October 25, 2025 in favour of GitHub Copilot CLI, and its repository is archived. It offered gh copilot suggest and gh copilot explain and nothing else: no agent loop, no model choice, no custom endpoint. If a page tells you to run gh extension install github/gh-copilot, it is about the retired product and none of its pricing or configuration applies.
The mirror-image mistake on the Claude side is treating Claude Code as a terminal tool. Anthropic's overview says it runs on the terminal, IDE extensions, a desktop app and the web, sharing the same CLAUDE.md files, settings and MCP servers across them. The CLI is one surface. Note also that the documentation moved: docs.claude.com/en/docs/claude-code/* now redirects to code.claude.com/docs/en/*.
Who should pick which
Pick GitHub Copilot CLI if your work is already on GitHub and you want the server-side features — /delegate to the cloud coding agent, the GitHub MCP server, GitHub Code Search — or if you need one agent to run models from several labs. Its BYOK path is protocol-wide: three provider types, with openai covering any OpenAI Chat Completions-compatible endpoint. Both tools can be run without an account at the company that makes them — Copilot CLI under BYOK, Claude Code with a gateway credential — so that is not the thing that separates them; the protocol breadth is.
Pick Claude Code if you want Claude models and want the agent itself intact wherever the tokens come from. Pointing it at a gateway leaves the agent, the tools, the permission model and the instruction files unchanged. What it does cost is listed below: the claude.ai-identity features, plus the defaults Anthropic documents as different behind a custom base URL — fine-grained tool streaming and gateway model discovery are both off unless you turn them on. If you work across an IDE, a desktop app and the terminal on the same repo, the shared-surface design is a real advantage that no feature table captures.
On execution model, both run locally and both gate tools. Copilot CLI's programmatic reference documents --allow-tool, --deny-tool, --allow-all-tools, -p to run a prompt non-interactively, and --fleet for parallel subagents; the config-dir reference documents the sandbox settings, and the command reference names standard, plan and autopilot modes. The Copilot CLI concept page documents ACP, the Agent Client Protocol, as an open standard that lets you use Copilot CLI as an agent in third-party tools, IDEs and automation systems that support it. Nothing in the programmatic reference makes --allow-all-tools a requirement of -p: it lists them as independent options. The warning lives on the concept page instead — with an automatic approval option such as --allow-all-tools, Copilot has the same access to your files as you do and can run any shell command you can, without asking first.
On migration cost, the asymmetry favours leaving Claude Code. Copilot CLI's custom-instructions reference lists CLAUDE.md as a discovered instruction file and reads .claude/CLAUDE.md too, and its changelog records hook config files gaining support for Claude Code's nested matcher/hooks structure. Your repo conventions port almost for free in that direction.
Side by side
| GitHub Copilot CLI | Claude Code | |
|---|---|---|
| Made by | GitHub | Anthropic |
| Install | npm @github/copilot, Homebrew cask, WinGet, or an install script | npm @anthropic-ai/claude-code |
| Surfaces | Terminal (plus a separate cloud coding agent via /delegate) | Terminal, VS Code, JetBrains, desktop, web/mobile |
| Model selection | /model, --model or COPILOT_MODEL; no default named on the GitHub pages checked here | Claude, selectable in /model |
| Custom endpoint | COPILOT_PROVIDER_BASE_URL + COPILOT_MODEL | ANTHROPIC_BASE_URL + a credential variable |
| Protocols it accepts | OpenAI Chat Completions, Azure OpenAI, Anthropic | Anthropic Messages, Bedrock InvokeModel, Agent Platform rawPredict |
| Account needed on that path | None — GitHub auth is not required under BYOK | None for the gateway credential itself |
| Billed as | Seat price + GitHub AI Credits, metered by tokens | Subscription with a usage window, or per-token API billing |
Two bills with different shapes
Copilot's billing changed: it is no longer “one premium request per prompt”. The Copilot CLI concept page says AI credits are consumed based on the number of tokens processed, and the plans page puts 1 AI credit at $0.01 USD. Credits do not carry over: unused ones are forfeited and the allowance resets at 00:00:00 UTC on the first of each month. The plan prices and credit allowances below are from GitHub's plans documentation, which is also where the base/flex split comes from. That page prints only a per-user total for Business and Enterprise; that those credits are pooled at the billing entity level, and that usage past the allowance continues at the published per-credit rate, come from the organization billing page instead.
| GitHub Copilot plan | Published price | AI credits per user per month |
|---|---|---|
| Free | $0 | An allowance; the plans table prints no number |
| Pro | $10 USD / month | 1,000 base + 500 flex = 1,500 |
| Pro+ | $39 USD / month | 3,900 base + 3,100 flex = 7,000 |
| Max | $100 USD / month | 10,000 base + 10,000 flex = 20,000 |
| Business | $19 USD per granted seat / month | 1,900, pooled; overage at $0.01 per credit |
| Enterprise | $39 USD per granted seat / month | 3,900, pooled; overage at $0.01 per credit |
Claude's side, from claude.com/pricing: Free $0, Pro $17 per month on annual billing ($200 up front) or $20 monthly, Max From $100 per month, Team standard seats $20 annually or $25 monthly, Team premium seats $100 annually or $125 monthly, Enterprise US$20 per seat per month billed annually plus usage at API rates. The page prints no figure for the Max 20x tier, so this guide does not state one — check the amount in your own checkout. Plan-window mechanics are in Claude Pro and Max limits.
What a session costs per token
GitHub's models-and-pricing rate card matched Anthropic's own list prices exactly on the four models below when both were checked on September 18, 2026. That is the fact that makes this comparison tractable: on those four, Copilot resells Claude at list with a seat price in front rather than at a markup. Per million tokens, input / output:
| Model | GitHub published rate = Anthropic list | Kunavo catalog |
|---|---|---|
| Claude Haiku 4.5 | $1.00 / $5.00 | $0.40 / $2.00 |
| Claude Sonnet 4.6 | $3.00 / $15.00 | $1.20 / $6.00 |
| Claude Sonnet 5 | $2.00 / $10.00 | $2.00 / $10.00 |
| Claude Opus 5 | $5.00 / $25.00 | $2.00 / $10.00 |
Read the row for the model you actually run rather than the table as a whole. Claude Sonnet 5 is the counter-example that keeps this honest: its Kunavo rate is the same as the list rate, so on that model there is nothing to save on price alone. Anthropic also states that the $2/$10 Sonnet 5 rate is now standard and that the increase scheduled for September 1, 2026 will not occur.
An illustrative estimate, not a measurement. Assume one session on Claude Sonnet 4.6 processes 600,000 uncached input tokens and 40,000 output tokens, with no cache reads and no cache writes. At the published list rate that is $2.40, which is 240 GitHub AI Credits drawn from the monthly allowance. At Kunavo's live catalog rate the same token arithmetic gives $0.96. Those are products of assumed token counts and published rates — not a measured task, not a bill ceiling, and not a claim about which finishes the work in fewer tokens. Cached input, retries and tool calls all move the real figure.
Two caveats on either side. Copilot credits expire monthly, so unused allowance is cash already spent; a prepaid balance is not on a clock the same way. And on Claude Code, the cost documentation notes the prompt-cache lifetime is an hour on a subscription but five minutes on usage credits or an API key, which changes the real cost of an idle session. Anthropic's published aggregate of around $13 per developer per active day is its own enterprise reporting; GitHub publishes no equivalent, so the two cannot be placed side by side.
The BYOK boundary, which is the real difference
GitHub's BYOK reference requires exactly two variables, COPILOT_PROVIDER_BASE_URL and COPILOT_MODEL. COPILOT_PROVIDER_TYPE defaults to openai, which the page describes as covering OpenAI, Ollama, vLLM, Foundry Local and any other OpenAI Chat Completions API-compatible endpoint; the other two values are azure and anthropic. GitHub states that models must support tool calling and streaming, and recommends a context window of at least 128k tokens for best results.
Claude Code's gateway protocol page is the mirror image: the base URL is an origin and the client appends /v1/messages itself, anthropic-version and anthropic-beta must be forwarded verbatim, the stream must not be buffered (on an ANTHROPIC_BASE_URL connection Claude Code counts every byte relayed, SSE ping events included, and aborts a stream that goes silent for 300 seconds by default), and cache_control must pass through or every turn quietly bills as uncached. The credential rule is on the gateway connect page rather than the protocol one: ANTHROPIC_AUTH_TOKEN sends Authorization: Bearer and ANTHROPIC_API_KEY sends x-api-key, and a credential in the wrong variable arrives in a header the gateway does not read, so the request fails with a 401.
# Claude Code — documented, and the shape Kunavo's own setup page uses.
export ANTHROPIC_BASE_URL=https://api.kunavo.com # origin, no /v1
export ANTHROPIC_AUTH_TOKEN=sk-kn-...
# GitHub Copilot CLI — the variable NAMES are from GitHub's BYOK reference.
# Only BASE_URL and MODEL are required; COPILOT_PROVIDER_TYPE defaults to openai.
export COPILOT_PROVIDER_TYPE=anthropic # or: openai | azure
export COPILOT_PROVIDER_BASE_URL=... # see the note below: unverified
export COPILOT_PROVIDER_API_KEY=...
export COPILOT_MODEL=... # the PROVIDER's model idWhat each path costs you. GitHub's authentication page says that under BYOK, GitHub authentication is not required and the CLI connects directly to your configured provider, and it names three features that are then unavailable: /delegate, the GitHub MCP server, and GitHub Code Search. The BYOK page documents COPILOT_OFFLINE=true as the offline-mode variable. You can also combine BYOK with a GitHub login to keep both. On the Claude Code side, the gateway connect page says a gateway credential replaces the claude.ai login so the subscription is not used and the traffic bills to whoever owns the credential; Remote Control and voice dictation become unavailable, Console analytics stops receiving usage metrics, and managed settings with forceLoginMethod or forceLoginOrgUUID cannot coexist with a gateway credential at all.
Two traps worth knowing before you debug. GitHub's config-dir reference documents ~/.copilot/providers.json and says that when it declares any provider or model it takes precedence over the COPILOT_PROVIDER_* environment variables, which it calls legacy — while the BYOK how-to never mentions the file. A leftoverproviders.json therefore silently wins over your exports. The reference describes the file only as a JSON object with providers and models keys and publishes no full schema, so no example of it is invented here. Second, model-id spelling: the BYOK example passes the provider's own spelling with dashes (claude-opus-4-5), while GitHub's own model list writes the same family with dots. Under BYOK you pass what your provider expects, not what GitHub's list shows.
Unverified, deliberately. GitHub does not document which URL path Copilot CLI appends per provider type — its OpenAI example base URL already carries /v1 while its Ollama example does not — so this guide does not assert a Copilot CLI base URL for any endpoint, including Kunavo's. Whether Copilot CLI's Anthropic BYOK path forwards cache_control, beta headers or a specific anthropic-version is also undocumented, so cache-dependent cost estimates through that path cannot be made.
Where GitHub's own sources disagree
The github/copilot-cli README contradicts GitHub's documentation on three points, all of them things buyers search for. The README lists an active Copilot subscription as a prerequisite, while the plans documentation and the plans page put Copilot CLI on every plan including Free. The README describes billing as a premium-request quota reduced by one per prompt, while the docs describe token-metered AI credits. And the README states that copilot uses Claude Sonnet 4.5 by default, a model the supported-AI-models page does not list for Copilot CLI at all. Where they conflict, prefer the docs — and confirm the plan and billing behaviour your own account actually shows.
On the default model specifically, no GitHub documentation page checked here names one. The programmatic reference gives the resolution order — a custom agent definition, then --model, then COPILOT_MODEL, then the settings file, then “the CLI's default model” — without saying which model that is, and GitHub's auto model selection page lists Copilot CLI among the clients where an automatic selection routes each task to a model for you. Treat the available model list as plan-dependent and moving, and read it from /model in the product rather than from any article, this one included.
What this page did not test
No runtime test of either CLI was performed for this guide. Nothing here is a compatibility result, a benchmark, or a claim that either tool works with Kunavo — every protocol statement above is read from the vendors' documentation. On the Claude Code side there is a published Kunavo setup guide, which is a documented configuration and still not a substitute for running your own task. For Copilot CLI there is no Kunavo setup guide, which is exactly why the base-URL question above is left open rather than answered.
If the Claude Code route is the one you want, it is two environment variables — the base URL is the origin with no /v1, a detail covered in ANTHROPIC_BASE_URL — and billing is per token from a prepaid balance with a $10 minimum top-up and no subscription. Create a Kunavo account to try it on one real task and compare the recorded charge against your current plan. Deeper cost breakdowns live in Claude Code pricing and the best API for Claude Code.
FAQ
Is GitHub Copilot CLI free?
GitHub's plans documentation says "All plans include Copilot CLI and Copilot app", and the Copilot plans page lists Copilot CLI inside the Free tier's included features (checked September 18, 2026). Note that the github/copilot-cli README still lists an active Copilot subscription as a prerequisite, which contradicts both of those pages — trust the docs over the README, and confirm what your own account shows. Separately, GitHub documents that BYOK removes GitHub authentication entirely, so a Copilot plan is not required on that path at all.
Can Copilot CLI use Claude models?
Yes, on both paths. GitHub's supported-AI-models page lists Claude Haiku 4.5, Claude Sonnet 4.6, Claude Sonnet 5 and Claude Opus 5 among the models available in Copilot CLI, billed in GitHub AI Credits. Separately, BYOK supports a provider type of anthropic with your own key and base URL, and the documented example passes Anthropic's own model-id spelling with dashes, as in claude-opus-4-5. None of the GitHub pages checked for this guide name the model the CLI falls back to when you select none; the programmatic reference refers only to "the CLI's default model" without naming it, so check it with /model in the product.
Can Claude Code use GPT or Gemini models through a gateway?
No. Claude Code's only client-selectable API formats are Anthropic Messages, Amazon Bedrock InvokeModel and Google Cloud Agent Platform rawPredict — there is no OpenAI-compatible path — and Anthropic's gateway documentation states plainly that it does not support routing Claude Code to non-Claude models through any gateway. If running several model families inside one terminal agent is the requirement, Copilot CLI's openai provider type is the structural fit, not Claude Code.
Does Copilot CLI need a GitHub account?
Not on the BYOK path. GitHub's authentication page states that if you configure Copilot CLI to use your own LLM provider API keys, GitHub authentication is not required and the CLI can connect directly to your configured provider without a GitHub account or token. Three features are unavailable without it: /delegate, the GitHub MCP server, and GitHub Code Search. You can also combine BYOK with a GitHub login to keep those. Separately, the BYOK page documents COPILOT_OFFLINE=true as the offline-mode variable.
How much does Claude Code cost per month?
Claude's pricing page prints Pro at $17 per month on annual billing ($200 up front) or $20 monthly, Max as From $100 per month, Team standard seats at $20 annually or $25 monthly, and Enterprise at US$20 per seat per month billed annually plus usage at API rates (checked September 18, 2026). The page does not print a figure for the Max 20x tier, so this guide does not state one. On per-token billing there is no subscription: you pay for the tokens a session consumes.
Which is cheaper, Copilot CLI or Claude Code?
Neither is cheaper as a product, because the two bills have different shapes. A paid Copilot plan charges a seat price with a monthly AI-credit allowance that expires and does not roll over, with GitHub documenting 1 AI credit at $0.01 USD and usage past the allowance continuing at that published rate. Claude Code charges either a subscription with a usage window or straight per-token API billing. The honest comparison is per model: on the four Claude models in this guide's table, GitHub's published per-token rate matched Anthropic's list price exactly on September 18, 2026, so on those four Copilot resells Claude at list with a subscription in front of it rather than at a markup.
How hard is it to switch from Claude Code to Copilot CLI?
Lower than most tool migrations, because GitHub built for it. Copilot CLI's custom-instructions reference lists CLAUDE.md as a discovered instruction file and says it also reads .claude/CLAUDE.md, and its changelog records that hook config files now support Claude Code's nested matcher/hooks structure. Your repo conventions therefore travel with you. What does not travel is the agent's own behaviour and your permission setup, which each tool configures its own way.
Official documentation, release metadata, npm registry data and plan prices checked September 18, 2026 against github.com, docs.github.com, code.claude.com, platform.claude.com, claude.com/pricing and registry.npmjs.org. Kunavo rates are read from the live catalog; worked totals are illustrative token arithmetic.