Claude Code Free in 2026: 2 Routes That Work, 3 That Do Not, Tested
There is no free Claude Code plan, but two $0 routes run in a terminal today. We tested a local model and OpenCode free models, and list the three that ended.

Claude Code free is not on offer from Anthropic: the setup page says Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account, and “the free claude.ai plan does not include Claude Code access.” You can still run a coding agent in the terminal for $0 on November 10, 2026, but it is not the official Claude. We tested two routes that work, and we explain three that people still search for and that no longer do.
The short answer
- Official free Claude Code: none. The setup page lists the accounts that work, and the free claude.ai plan is not one of them. The pricing page says Claude Code is included in all paid plans.
- Route 1, tested: keep the Claude Code program and point it at a local model through Ollama. It costs nothing per token, but it is slow on a CPU, and Anthropic says it does not support routing Claude Code to non-Claude models.
- Route 2, tested: OpenCode’s free models need no login. They are labelled free for a limited time, no end date is published, and we hit the free usage limit after a few test runs.
- Not tested: Codex on a ChatGPT Free or Go plan, and Google’s Antigravity CLI, which has a free quota refreshed weekly with no number given. We have no account for either.
- Dead: the Gemini CLI sign-in for unpaid users (replaced on June 18, 2026) and the Qwen Code OAuth free tier (closed on April 15, 2026).
Every route we checked

Dates and limits are from the pages we read on November 10, 2026. A “free for a limited time” label can end without notice, so check the page again before you build on it. We left out multi-account tricks, region workarounds and fake student sign-ups. They break the services’ terms and risk the account, and we do not cover them.
Route 1: the Claude Code program with a local model
Claude Code talks to an Anthropic-style API, and Ollama exposes one. Ollama’s own Claude Code page says ollama launch claude connects it to local and cloud models, and recommends a context window of 64k or more for a repository. Anthropic’s gateway page says it does not endorse or support routing Claude Code to non-Claude models. So this works, but you are on your own if it misbehaves.
What we ran, on November 10, 2026: Claude Code 2.1.322 on a Linux box with 8 CPU cores, 15 GB of RAM and no GPU, Ollama 0.40.16 serving qwen3:4b with a 32,768-token context, and Claude Code’s base URL pointed at the local Ollama port. The task was a one-file Python project where add(2, 3) printed -1.

Claude Code read the file, edited it and said it was fixed, and the file did change to a + b: running it printed 5. It took 21 minutes 7 seconds for three model calls of about 11,000 to 12,500 input tokens each, because Claude Code sends its instructions and tool list every time. In a first run we allowed only Read and Edit. The model tried Write instead, was refused, and the run hit our 28-minute cap without finishing. So it works for a trivial fix, it is far too slow on a CPU for real work, and a small model can pick the wrong tool. A GPU would change the speed a lot; we did not test one. Claude Code printed a cost of $0.09 for the run. That is the client’s own estimate for a model name it does not know, and nothing was billed, because the requests never left the machine.
If the client says a model is not supported or tools do not work, see Claude Code “does not support this model” and Ollama “does not support tools”. The context length is set as in Ollama context length.
Route 2: OpenCode with a free model
OpenCode is a separate open-source terminal agent, not Claude Code. Its models page lists several models with a Free label, including GLM-5.3-Flash Free, DeepSeek V4.1 Flash Free and MiniMax M3.1 Flash Free, and says free models work in OpenCode. The page gives no daily number and no end date.
We ran OpenCode 1.19.5 without signing in. opencode run -m opencode/glm-5.3-flash-free answered a one-word question in 5 seconds. Earlier the same day a free-model run fixed the same one-file bug, but we did not keep that run’s log, so treat it as a note and not a result. After a few runs we hit the limit. DeepSeek V4.1 Flash Free returned “Free usage limit reached. Free models work in OpenCode; subscribe to OpenCode Go to keep going”, and a later GLM-5.3-Flash Free request returned the same message. OpenCode did not exit after the error; we stopped it after several minutes. The models page does not say how much free usage you get or how it is counted, so plan for it to run out.
Free models are a trade: the page for each one says what the provider does with your prompts, so read it before you send private code.
Three searches that lead nowhere now
- A free Claude Code plan. Not offered. Paid plans include it, and if you only want to try the API, see Claude API free credits.
- Gemini CLI with a personal Google login. The Gemini CLI quota page opens with a notice that unpaid and Google One users moved to Antigravity CLI on June 18, 2026, and Google’s announcement explains the change. The same page still prints older limit tables (1,000 requests a day for a Google account, 250 for a free API key), so do not plan around them. Antigravity’s plans page promises “a meaningful quota, refreshed weekly” to users without a Google AI Pro or Ultra plan, with no number.
- Qwen Code with Qwen OAuth. The maintainers, citing a product-strategy adjustment to manage free-tier usage and costs, announced it would close the free OAuth entry on 2026-04-15, in issue #3203. Qwen Code still works with a paid Coding Plan or your own API key.
Codex is the other official route with a $0 plan: the Codex pricing page lists GPT-6 Luna in the desktop app for Free and Go, subject to rollout. We did not test it. For what each plan includes, see Is Codex free?, and if a model is refused, Codex “model is not supported”.
If you decide to pay after all
A Pro plan is the cheapest way to get the real Claude Code, and what Claude Code costs per month compares it with API billing. If you want a cheaper hosted model inside the Claude Code program, DeepSeek API for Claude Code shows one setup. For the install steps, see Claude Code install guide.
What we tested and what comes from the pages
- Tested on November 10, 2026: Claude Code 2.1.322 with Ollama 0.40.16 and
qwen3:4bon a Linux box with 8 CPU cores, 15 GB of RAM and no GPU (one fix completed in 21 minutes 7 seconds; one earlier run did not finish in 28 minutes), and OpenCode 1.19.5 with two free models (one-word replies; the free usage limit on later requests). - Not tested: a GPU, a larger local model, other gateways, and how long OpenCode’s free models stay free. One run is one sample, and a different model or prompt can go better or worse.
- From the pages, not tested: that the free claude.ai plan has no Claude Code access, the Gemini CLI and Antigravity changes, the Qwen shutdown, the Codex Free and Go offer, and every “free” label. We have no Claude, ChatGPT or Google account on the box.
- Sources: Anthropic’s setup, pricing and gateway pages, Ollama’s Claude Code guide, OpenCode’s models page, the Gemini CLI quota page, Antigravity’s plans, the Qwen Code issue linked above and OpenAI’s Codex pricing page, all read on November 10, 2026.
FAQ
Is Claude Code free?
No. Claude Code needs a paid Claude plan, a Console account or a cloud provider such as Amazon Bedrock. The free claude.ai plan does not include it.
Can I use Claude Code with a free model?
Yes, by pointing it at Ollama or another gateway. It runs, but Anthropic does not support non-Claude models there, and a small local model on a CPU is slow.
What is the best free coding agent right now?
We tested OpenCode with its free models and found it the quickest to start, because it needs no login. Free models can hit a usage limit, as ours did.
Is there still a free Gemini CLI?
Not for personal Google sign-ins. The Gemini CLI page says unpaid users moved to Antigravity CLI on June 18, 2026.
Does Qwen Code still have a free tier?
Not through Qwen OAuth. The maintainers announced it would close on 2026-04-15, and a maintainer confirmed the shutdown that day.