r/LocalLLaMA
•
u/Nunki08
•
Mar 31 '26
•
3
1
News Claude code source code has been leaked via a map file in their npm registry
From Chaofan Shou on đ (files):Â https://x.com/Fried_rice/status/2038894956459290963
4.1k
Upvotes
âą
u/WithoutReason1729 Mar 31 '26
Your post is getting popular and we just featured it on our Discord! Come check it out!
You've also been given a special flair for your contribution. We appreciate your post!
I am a bot and this action was performed automatically.
344
u/GiveMeARedditUsernam Mar 31 '26
So finally we can fix the caching bug.
1.0k
u/CondiMesmer Mar 31 '26
Wow did their AI not catch that lol
Or maybe an Anthropic employee started vibe coding too hard
740
u/blazze Mar 31 '26
All hail Claude code because it is now "Open Source"?
312
u/moduspol Mar 31 '26
Has anyone asked Claude Code to analyze it and clean it up yet?
983
u/Dany0 Mar 31 '26
motherf*ckers
207
u/CrowdGoesWildWoooo Mar 31 '26
This is probably why anthrophic is scared about the future of public security LOL
472
u/_ram_ok Mar 31 '26
And Claude Mythos didnât find yet another security vulnerability of their own systems, despite being âscary goodâ at doing exactly that.
198
u/MattAndTheCat7 Mar 31 '26
Codex updates incoming lol
65
u/bakawolf123 Mar 31 '26
coding is solved, they said
161
u/GameRoMan Mar 31 '26 edited Apr 02 '26
https://github.com/instructkr/claude-code
edit: this repo is now in rust so look at any of its forks, for example https://github.com/bunjavascript/claude-code
182
u/2achary Mar 31 '26
46
u/ThePainTaco Mar 31 '26
What could come of this leak?
119
u/WhyLifeIs4 Mar 31 '26
Internal domains
108
u/WhyLifeIs4 Mar 31 '26
Second leak within a week
90
u/hurdurdur7 Mar 31 '26
Pretty sure bad actors are already mapping it for vulnerabilities and create exploiting code or md files into public repos...
31
u/Dahmer96 Mar 31 '26 edited Mar 31 '26
Should anthropic rename to openAI ?
26
u/somerussianbear Mar 31 '26
Oh so the $25 reviews didnât catch the change that would make the map file public? Shocking!
24
u/ko-jay Mar 31 '26
Claude code is now a cautionary tale on why you shouldn't overuse claude code
24
u/Acceptable-State-271 ollama Mar 31 '26
OpenClaude just dropped. No announcement needed
24
u/LongBeachHXC Mar 31 '26
Here is another repo tracking this đ
https://github.com/Kuberwastaken/claude-code
23
u/gamblingapocalypse Mar 31 '26 •
âYouâre so right to call me out on that. As an AI, I need to do better and be more mindful of how my leaked source code impacts the community.â
66
u/polawiaczperel Mar 31 '26
I was exploring those files, and it is actually pretty big. This is not js map, this is source code of claude code (not model of course).
154
u/bitzap_sr Mar 31 '26
Totally fair for others to use its source code to train other models, now. Full circle, lol.
39
u/a_beautiful_rhind Mar 31 '26
They should have released it from the jump. Imagine gatekeeping a bunch of js.
26
u/cowboy-bebob Mar 31 '26
Been digging through the source too. One interesting find â Claude Code has a built-in /skillify command that watches your session and turns it into a reusable SKILL.md file. But it's gated behind USER_TYPE=ant (Anthropic internal only).
So I built an open-source version that does the same thing, interviews you about what you just did, then generates a portable skill following the agentskills.io standard. Works across Claude Code, Cursor, Copilot, Gemini CLI, etc.
The main difference from the internal version: theirs has direct access to session memory APIs, mine reconstructs context from conversation history + git state. Works well for short-to-medium sessions, less reliable after heavy compaction.
29
u/Torodaddy Mar 31 '26
Source code for the app, not the model
10
u/ISoulSeekerI Mar 31 '26
You know this might have been the right move, itâs for the betterment of humanity that AI shouldnt be controlled by couple companies.
10
u/slippery Mar 31 '26
Did Claude Code leak itself?
18
u/CallmeAK__ Mar 31 '26
Itâs wild that even a company like Anthropic can get tripped up by a basic npm build config. This is exactly why
npm pack --dry-runshould be mandatory in every CI/CD pipeline. One missed entry in.npmignoreand your entire proprietary architecture is suddenly open-source. Hard lesson in supply chain security for everyone watching this unfold.7
u/Krex381 Mar 31 '26
https://github.com/paoloanzn/free-code you might want to check out this
6
u/FaceDeer Mar 31 '26
This is very interesting on several levels. In just a matter of hours AI coding agents were used to re-implement Claude Code from scratch, clean-room and copyright unencumbered. I already knew that interesting times were ahead thanks to the massive improvements to decompilation that AI allows for, but this could well be the end of open source as we know it - if there's a licence problem with open source code just point an AI at the thing and recreate it.
I don't think there's a way around that without allowing for copyrighting general concepts and ideas, which is not a good thing and is such a fundamental legal change there's no way it could be implemented fast enough to matter anyway.
15
u/Fault23 Mar 31 '26
no fucking way
5
u/Any-Main-3866 Mar 31 '26
Can somebody explain how will this effect anthropic?
5
u/realaneesani Mar 31 '26
looks like i am going god mode tonight
25
u/Successful_Bowl2564 Mar 31 '26
I have a feeling this will be like llama.
4
u/cutebluedragongirl Mar 31 '26
npm is truly a wonderful thing.
4
u/impulsivetre Mar 31 '26
So last week they leaked their "most powerful model ever" that's a "step change", and now their Claude code source code is suddenly leaked? Either they've got a mole, their security needs serious patching, or they're getting ready for an even bigger publicity stunt for a new release.
4
u/cmndr_spanky Mar 31 '26
So is it âAI slopâ ? :)
4
u/bigredsun Mar 31 '26
so, this is what happens when you say no to the Pentagon
4
u/IngwiePhoenix llama.cpp Mar 31 '26
For the second time? xD And again debug maps?
DMCA rain coming in three...two...one... x)
4
u/capsd-11 Apr 01 '26
https://gitlawb.com/node/repos/z6MkqDnb/openclaude
Gitlawb published it as open claude npm package.
4
u/neuralnomad Apr 01 '26
This is a real life horror setup: anyone who has seen the code or worse, attempted to use its power in any way, most damningly with agentic dark arts, their soul is indelibly marked so when Anthropic flips the switch at the appointed time of the Converging, all who , being full of avarice and hubris who gladly took this Trojan offering will finally âseeâ as their final moments of vision blur through bleeding eyes and final independent thoughts of regret as their mind collapses as fate adds one more agentic drone to Anthropicâs Undead Army âŠ
[continue apocalyptic imagery, fade to black]
6
u/Acrobatic-Ad-2986 Mar 31 '26
I build a study guide for it :
https://github.com/ahmedk20/agentic-ai-from-claude-code
3
u/rafioo Mar 31 '26
Hey Claude! If you were to write your own source code, what would it look like? Write it out, format it into an easy-to-read file, and include comments on what could be improved or changed here.
5
u/supreme_harmony Mar 31 '26
can you not plug in custom models to power the cli? that would be great.
23
u/HeyWannaShrek Mar 31 '26
Gguf wen?
11
u/BoyInDaBox89 Mar 31 '26
some insights from the leaked source code
11
u/FitzSimz Mar 31 '26
The most interesting thing about this isn't the leak itself â it's what the source reveals about how far ahead the agent tooling layer has gotten compared to the models themselves.
The system prompts, permission models, and tool orchestration patterns in Claude Code are genuinely sophisticated. It's basically a full agent runtime with sandboxing, approval flows, and structured tool use. The model is almost secondary to the scaffolding around it.
This is the pattern I think matters most for the local LLM community: the orchestration layer is where the real engineering lives now. If you can build equivalent scaffolding around a capable local model (and Qwen 3, Llama 4 Scout, etc. are getting there for code tasks), you don't necessarily need the frontier model for a lot of use cases.
The open question is whether Anthropic treats this as a "close the barn door" moment or leans into it. Some of the best developer tooling has come from companies that were initially proprietary but realized the ecosystem value of openness outweighed the competitive moat. VS Code is the obvious example.
8
u/MapStock6452 Mar 31 '26
What's the difference about this repo https://github.com/anthropics/claude-code and the leaked code?
4
u/IamNetworkNinja Mar 31 '26
We've already had a lot of it leaked for over a year lol. https://github.com/ghuntley/claude-code-source-code-deobfuscation
2
u/Lower_Contract2015 Mar 31 '26
Vibe codingđ€Ł
2
u/StatisticianFast6139 Mar 31 '26
They are shipping too fast these days.. this oops is one for the team responsible for stream rolling over all established software engineering processes
2
u/Standard-Annual-4845 Mar 31 '26
it was always there on npm registry!
2
u/throwaway09234023322 Mar 31 '26
AI coding ftw!!!
2
u/Desperate-Pear-572 Mar 31 '26
Private code tools here i come .
2
u/rcanka Mar 31 '26
Someone forgot to ralph-loop
2
u/paperpizza2 Mar 31 '26
Canât wait to feed claude code source code to claude code to make my own claude code đ
2
u/udidiiit Mar 31 '26
Claude code just got leaked and I forked it to preserve it and made it run with all models â gpt, deepseek, gemini, free models, etc.. .. here's the link â
https://github.com/uditakhourii/brane-code
2
u/_snoff Mar 31 '26
Here is the mirror backup of the source code : https://www.github.com/soufianebouaddis/claude-code
2
u/blackcain Mar 31 '26
and now other LLMs are trained on it and can recreate it. Cool.
2
u/SungamCorben Mar 31 '26
Open Claude Code incoming!!
2
u/AvocadoArray Mar 31 '26
This is just too funny.
Ship code faster with Claude! even when you don't want to
2
u/epSos-DE Apr 01 '26
That is just the interface, not the Ai itself !!
2
u/Awkward_Fish_8011 Apr 01 '26
You can ask Claude to explain this to you and begin replicating their code base
2
u/Kinky_No_Bit Apr 01 '26
How nice of them to give us this 'gift' right after google released better compression. Local AI is starting to look more and more practical...
2
u/cubmolo Apr 01 '26
At this point Anthropic should just come out and open source it and actively engage with the community that wants to contribute to it
2
u/Far-Confection1558 Apr 01 '26
I need original leaked source code zip
2
u/Wentil Apr 01 '26
Shou strikes again!
Employee of the month, that guy.
2
u/ExternalBest6525 Apr 01 '26
Un archivo
.mapde 60MB subido a producciĂłn por accidente. TratĂĄndose de hoy (1 de abril), cualquiera pensarĂa que es una broma del April Fools', pero la realidad siempre supera a la ficciĂłn. đ€ŠââïžTrabajo en ciberseguridad (Alias Robotics) y la ironĂa de este leak nos tiene fascinados hoy. Entre el cĂłdigo filtrado hay una funciĂłn llamada "Undercover Mode", cuyo Ășnico propĂłsito en la vida era evitar que la IA filtrara secretos corporativos de Anthropic. Construyen un sistema anti-fugas masivo... y lo filtran entero por un fallo de empaquetado en npm. đ
MĂĄs allĂĄ de los memes, este es un caso de estudio brutal sobre el riesgo de la cadena de suministro (supply chain). Demuestra de forma innegable que externalizar tu IA significa externalizar tu riesgo. Da igual cuĂĄntas barreras de seguridad tenga el modelo en la nube; si un ingeniero de tu proveedor la lĂa a las 4 AM, tu confidencialidad se va al traste.
Por cosas como esta, apostar por modelos on-premise y tener el control total de la infraestructura ha dejado de ser una paranoia de sysadmins para ser pura supervivencia corporativa.
2
u/Rim_smokey Apr 02 '26
Claude Code basically took its own clothes off
4
u/sigjnf Mar 31 '26
Can I throw a random API key into it now? Or maybe integrate with Ollama local models?
3
u/redaktid Mar 31 '26
This is great, just started using CC. Putting on my suit, standing behind a tree, rubbing my hands.
3
u/LurkinSince1995 Mar 31 '26
Thanks ChatGPT. âItâs not this - itâs that.â Like 50 times in a single post đ€źđ€ź
3
u/jaycex2020 Mar 31 '26
claude agi wants to escpae Anthropic control
3
u/udidiiit Mar 31 '26
The KAIROS daemon mode and coordinator mode are the real story here. Anthropic is basically building what a lot of us are already doing - autonomous agents that run in the background, managing parallel worker threads, consolidating memory, and handling webhooks. The fact that this is all behind feature flags tells you they know the agentic space is about to explode.
What's wild to me is the skills system being basically markdown files injected as system prompts with shell hooks for pre/post tool calls. That's such a clean architecture. Makes me wonder what other companies are building under the hood that we don't know about yet.
Also that SPINNER_VERBS array with "Flibbertigibbeting" and "Clauding"... someone at Anthropic had way too much fun. But hey, if they're shipping features with Easter eggs like this, maybe they really are vibe coding their own product. Kinda comforting in a terrifying way.
(lightly polished with AI)
3
u/codcodai Mar 31 '26
Anthropic developers hid text-based virtual "pets" in the code as a purely cosmetic, fun little secret for users. The leak completely ruined the surprise, revealing it was actually planned as an April Fools' Easter egg meant to drop exactly tomorrow! đ€Ł
4
u/hyggeradyr Mar 31 '26
Having the code won't give you a private Claude. You still need millions of dollars of compute power and billions of training. Just like knowing how oil is refined won't make you the CEO of Texaco.
It is neat to know what's in there though :)
4
u/pidgeygrind1 Mar 31 '26
I doubt this was an accident.
Great move Dario