Skip to content
InnovateTechie
Claude Code

Claude Code Source Code: Is It Open Source? The Real Answer

InnovateTechieBy InnovateTechie10 min read
Share
Claude Code source code — proprietary software distributed as a bundled npm package

Part ofWhat Is Claude Code? The Complete Guide

Quick answer

Is the Claude Code source code open source? No, it's proprietary to Anthropic. What the GitHub repo holds, the 2026 sourcemap leak, and how to build on it.

The Claude Code source code is proprietary to Anthropic — it is not open source. The official anthropics/claude-code GitHub repository hosts issues, docs, and the changelog, not the CLI's source, and the tool itself ships as a bundled, minified npm package. A 2026 sourcemap slip briefly exposed the code, but that didn't change its license. If you want to build on Claude Code, the supported path is the Claude Agent SDK, not copied source.

Licensing, repository contents and the supported extension surface verified 31 July 2026 against Anthropic's Claude Agent SDK documentation.

"Where is the Claude Code source code?" is one of the most common questions about the tool, and the honest answer surprises people: you can't just clone it. Claude Code is closed-source software distributed as a compiled npm package. Below is exactly what is public, what happened with the 2026 exposure, and the legitimate ways to read, extend, and build on Claude Code without touching anything you shouldn't. We have walked this exact path in our own terminal, so the guidance here is grounded in doing rather than describing.

Key takeaway

The Claude Code source code is proprietary to Anthropic, not open source — the anthropics/claude-code GitHub repo hosts only issues, docs, and the changelog, the CLI ships as a bundled minified npm package, and the March 31, 2026 sourcemap slip that briefly exposed the code did not change its license.

Is the Claude Code source code open source?

No. Claude Code is proprietary software owned by Anthropic, with no public repository to clone or fork under an open-source licence. Installing it from npm gives you a bundled, minified build artifact — not readable source licensed for reuse.

No. Claude Code is proprietary software owned by Anthropic. There's no public repository you can clone, read in full, and fork under an open-source license. This trips people up because so many developer tools are open source — but Claude Code isn't one of them. It's a commercial product that requires a paid Claude plan or API credits to run — from $20/month for Pro or $100/month for Max, per Anthropic's pricing — and its implementation is not published for reuse. The tool ships updates roughly weekly and currently runs on Anthropic's newest models, including Claude Opus 5.

That distinction matters. "You can install it from npm" is not the same as "the source is open." The package you install is the built artifact — bundled and minified — not the readable, licensed-for-reuse Claude Code source code.

Where the official Claude Code source lives

The anthropics/claude-code repository is the tool's public front door, not its engine room: it hosts the issue tracker, the documentation and the changelog. The CLI implementation itself ships only inside the npm package, in built form.

There is an official GitHub repository at anthropics/claude-code, and it's worth knowing what it actually contains:

On anthropics/claude-codeNot on anthropics/claude-code
Issue tracker and bug reportsThe full CLI implementation
Documentation and guidesThe agent's core logic
The changelog / release notesAnything licensed for reuse

So the official repository is where you file bugs, read release notes, and follow development — not where you read the Claude Code source code line by line. The actual program is delivered through the npm package, in built form. Treat the repo as the tool's public front door, not its engine room.

Claude Code source code — proprietary software shipped as a bundled npm package, not an open repo

The 2026 Claude Code source code exposure

On 31 March 2026 a sourcemap file was accidentally bundled into the published npm package, making the underlying code readable through its sourcesContent field. It was a build mistake rather than a release, and the licence never changed.

Here's the event people are really searching for. On March 31, 2026, the Claude Code source code was briefly exposed through a sourcemap file accidentally bundled into the published npm package. Sourcemaps (.map files) exist to help developers debug minified code — they map the built output back to the original, and they can carry the original source inside a sourcesContent field. When one shipped in the package, the underlying code became readable.

Two things are true about this at once, and both matter:

  1. It was a mistake, not a release. An accidental sourcemap does not change a license. The code remained Anthropic's proprietary property; exposure isn't the same as open-sourcing.
  2. It doesn't make Claude Code "open source." Copies and "de-obfuscated" rebuilds appeared on GitHub afterward, but those are derived from proprietary code without a license to redistribute it — a legal and ethical grey zone at best.

If your goal is to understand how an agentic coding tool works, that's a great instinct — just pursue it through legitimate means, which is what the next section is about.

The supported way to build on Claude Code

Use the Claude Agent SDK, which packages the same agent harness as a library, plus skills for reusable procedures, MCP servers for your own tools and data, and plugins and hooks for behaviour. All licensed, all maintained, all documented.

You don't need the leaked Claude Code source code to build serious things on top of it. Anthropic provides supported, licensed surfaces for exactly that:

  • The Claude Agent SDK (formerly the Claude Code SDK) is Claude Code packaged as a library — the full agent harness with built-in file, bash, and search tools — so you can build your own agents on the same foundation, legitimately.
  • Skills let you add reusable procedures the agent loads on demand.
  • MCP servers connect Claude Code to your own tools and data.
  • Plugins and hooks extend behavior without touching internals.

This is the key reframe: the interesting, buildable surface of Claude Code is deliberately open to you through the SDK and its extension points. You get to program the agent's behavior — you just don't get its proprietary internals, and you don't need them.

We can vouch for that reframe from the other side of it. Everything we automate on this site — content drafting, image-generation scripts, SEO audits — runs on the Agent SDK and Claude Code's extension points, and not once have we wished for the proprietary internals. The supported surface turned out to be the whole game: skills for procedures we repeat, MCP for our own data, and the SDK when we need the agent loop inside a script. If you are eyeing the leaked Claude Code source code hoping to build on it, the honest news is that the door you actually want is already open.

The supported ways to build on Claude Code — the Agent SDK, skills, MCP, and hooks

Should you use leaked or decompiled Claude Code source?

No. A rebuilt copy runs unofficial code with access to your files, shell and credentials; it gets no security updates or new-model support; and redistributing proprietary code you were never licensed to use carries real legal exposure.

Short answer: no. Beyond the licensing problem, running a stranger's "rebuilt" or decompiled copy of the Claude Code source code carries real risks:

  • Security. You'd be running unofficial code with access to your files, shell, and credentials. That's a large trust surface to hand to an anonymous fork.
  • No support or updates. You lose Anthropic's update stream, security fixes, and new-model support — the very things that make Claude Code good.
  • Legal exposure. Redistributing or building products on proprietary code you weren't licensed to use is a liability, especially commercially.

If you want the tool, use the real one. If you want to build, use the Agent SDK. Both are better than a leaked copy on every axis that matters.

Why Anthropic keeps it closed

Three reasons: the tool is a commercial product whose prompts and orchestration are competitive assets; an agent that runs shell commands has a large abuse surface; and a closed core lets Anthropic ship weekly without supporting outside forks.

It's fair to ask why a company that publishes so much — model cards, research, an open Agent SDK — keeps the tool itself proprietary. A few reasons explain the whole posture:

  • It's a commercial product. Claude Code drives real revenue and differentiates Anthropic against other coding agents. Its prompts, orchestration logic, and safety scaffolding are competitive assets, not a community project.
  • Safety and abuse. An agentic tool that reads files and runs shell commands has a large surface for misuse. Keeping the internals closed makes it harder to strip out guardrails or repurpose the harness for something harmful.
  • Rapid iteration. Claude Code ships updates weekly. A closed codebase lets Anthropic change models, rewire orchestration, and tune prompts fast, without maintaining backward compatibility for outside forks.

Crucially, "closed source" doesn't mean "closed off." Anthropic deliberately opens the parts you'd actually build on: the Agent SDK exposes the harness, and plugins, skills, MCP, and hooks let you shape behavior. You get the extensibility that matters without the proprietary internals. It's the common pattern for commercial developer tools — a closed core wrapped in a rich, documented extension surface — and it's exactly the model Claude Code follows. The same split runs through Anthropic's wider stack, and our component-by-component breakdown of whether Claude itself is open source shows exactly which pieces are proprietary and which carry a real open-source licence.

So the practical takeaway is simple. If you're hunting for the Claude Code source code hoping to fork it, you'll be disappointed — that door is closed on purpose. But if you're searching because you want to understand it, customize it, or build something like it, every legitimate door is open: file bugs and read the changelog on the official GitHub repo, study the Agent SDK, and extend the tool through its supported hooks. For the wider picture of how it all fits together, our everything Claude Code guide maps the full ecosystem.

Some of that harness ended up public by accident: the Claude leaked code incident was a build slip, not a breach — and your code was never in it.

Frequently Asked Questions

No. Claude Code is proprietary software owned by Anthropic. It's distributed as a bundled npm package, and its source is not published under an open-source license. The anthropics/claude-code GitHub repository holds issues, docs, and the changelog — not the CLI's implementation.

The runnable tool ships as a built, minified npm package rather than readable source. The official anthropics/claude-code repo is for issues and documentation, not the full code. There is no supported way to clone the complete, licensed Claude Code source code.

Briefly, yes. On March 31, 2026, a sourcemap file accidentally bundled into the published npm package exposed the underlying code. It was a mistake, not a release — the code stayed proprietary, and the incident didn't make Claude Code open source.

Yes — through the supported Claude Agent SDK, which packages the agent as a library with built-in tools, plus skills, MCP servers, hooks, and plugins. These are the licensed, updated ways to build on Claude Code without needing or copying its proprietary source.

Generally no. Community rebuilds derived from leaked code run unofficial software with access to your files and credentials, get no official security updates, and sit in a legal grey zone. Use the official Claude Code or the Agent SDK instead.

The Claude Agent SDK (formerly the Claude Code SDK) is Anthropic's supported library for building custom agents on the same harness Claude Code uses — with built-in file, bash, search, and web tools. It's the legitimate way to get Claude Code-style capabilities in your own software — the same models, tools, and agentic loop, minus the proprietary internals and the risk of running a leaked copy.
InnovateTechie

Written by

InnovateTechie

Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.

View all posts →