Claude Code · September 2026
Is Claude Code open source?
It is not. Here is exactly what it is, which coding agents are, and the open-source stack most people run Claude Code inside.
The plain answer.
Claude Code is not open source. It ships as a native binary — through Anthropic’s installer, Homebrew, apt, and the @anthropic-ai/claude-code npm package — and the source is not published. The npm package’s licence field reads “SEE LICENSE IN README.md”; the anthropics/claude-code repository on GitHub, which holds the issue tracker, changelog, plugins, and examples rather than the CLI’s code, carries a LICENSE.md that says “© Anthropic PBC. All rights reserved. Use is subject to Anthropic’s Commercial Terms of Service.” Anthropic’s legal page adds that the binary must not be modified and that each user has to authenticate with their own credentials.
That is a licence, not a lock. You can run Claude Code anywhere it installs, inside any tool that gives it a shell, on any plan or key you hold. What you cannot do is read how it works or ship a fork. If either of those matters, the agents below are the ones to look at.
The coding agents that are open source.
Licences read from each project’s repository on 2026-09-03; cost models from their READMEs and docs.
| Agent | Licence | Models | How you pay |
|---|---|---|---|
| Codex CLI (OpenAI) | Apache-2.0 | OpenAI models | Sign in with a ChatGPT Plus, Pro, Business, Edu, or Enterprise plan, or use an API key |
| OpenCode | MIT | Any provider you configure; a curated OpenCode Zen list for newcomers | Free software; your own API keys |
| Aider | Apache-2.0 | OpenAI, Anthropic, Gemini, DeepSeek, Bedrock, Vertex, OpenRouter, and local models via Ollama | Free software; your own keys, or a local model |
| Gemini CLI (Google) | Apache-2.0 | Gemini | Free tier with a personal Google account — 60 requests a minute, 1,000 a day — or an API key |
| Goose (Block) | Apache-2.0 | 15+ providers, including Anthropic, OpenAI, Google, Ollama, and Bedrock | Free software; your own keys |
| Cline | Apache-2.0 | Many providers; 200+ models through OpenRouter | Free software; your own keys |
What open source buys you here.
Less than the question implies, and more than nothing. The agent is the cheap part of the stack: a loop that reads files, calls a model, and runs commands. Open source lets you audit that loop, patch it, and keep it running if the vendor loses interest — which is real value for a tool that executes commands on your machine. It does not make the model free; every agent above still meters through an API key, a plan, or a GPU you own. And it does not, on its own, make the agent better. The honest comparisons are on OpenCode vs Aider and the best AI coding agents roundup.
Note the one asymmetry. Anthropic does not permit third parties to offer Claude.ai login inside their own applications, so an open-source agent reaches Claude models through a Console API key at per-token rates, not through a Pro or Max plan. If your plan is the reason you are on Claude, the closed CLI is the only thing that spends it.
The open-source stack around Claude Code.
Most people who search this phrase are not choosing an agent. They run Claude Code and want everything around it to be open — the part they can inspect, self-host, and keep. That stack exists.
tmux
ISC-licensed and older than the agent era by many years. It is what keeps a Claude Code session alive after the SSH connection drops, and the tool the vendor’s own Remote Control docs tell you to start inside on a remote machine.
SSH and Tailscale
OpenSSH is the reach; the Tailscale client, BSD-3-Clause, is how most people get that reach across networks without a port forward. Both are open and well audited, and both need a listener on the host and a key on every device.
git worktrees
The open primitive behind parallel agents: one checkout per session, so three Claude Code runs on one repository do not fight over the working tree. git worktree add is all it takes, and Claude Code’s own --spawn worktree server mode uses the same thing.
spawnd
Open source, MIT/Apache-2.0. One daemon per host you own; it dials out, so nothing listens. Sessions live on the host with their PTY owned by a worker process, so they survive the dropped connection and the laptop lid. Any browser is the console, and your browser talks to each daemon peer-to-peer, end-to-end encrypted — the server that introduces them never sees session content. Claude Code, Codex, OpenCode, and Aider ship as built-in shortcuts, and any CLI can be added.
Why the substrate is the part worth opening.
The closed part of this stack is the part that costs money either way and gets replaced every year. The open part is what holds your keys, carries your sessions, and decides what leaves the machine — and that is the part to be able to read. Run Claude Code as published, on your own hardware, inside a stack you can audit, and the licence question mostly answers itself.
Start
Open source, on every host you own.
curl -fsSL https://spawnd.dev/install.sh | shQuestions
- Is the Claude Code source on GitHub?
- No. The anthropics/claude-code repository holds the issue tracker, changelog, plugins, and examples; the CLI itself ships as a native binary under Anthropic’s terms, and its source is not published.
- Which open-source agent is closest to Claude Code?
- OpenCode is the nearest in shape — a terminal-native agent with a similar interactive loop — and runs any provider through your own keys. Codex CLI is the nearest in arrangement: vendor-built, Apache-2.0, and billed through a ChatGPT plan the way Claude Code bills through a Claude plan.
- Can I use my Claude subscription with an open-source agent?
- Not as Anthropic’s terms stand: third parties may not offer Claude.ai login in their own applications, so open agents reach Claude models through a Console API key at per-token rates. Your Pro or Max plan is spent only by Claude Code itself.