r/ClaudeAI
•
u/sixbillionthsheep
Mod
•
Apr 01 '26
•
1
Code Leak Megathread Claude Code Source Leak Megathread
As most of you know, Claude Code CLI source code was apparently leaked yesterday https://www.axios.com/2026/03/31/anthropic-leaked-source-code-ai
We are getting a ton of posts about the Claude Code source code leak so we have set up this temporary Megathread to acommodate and conglomerate the surge interest in this topic.
Please direct all discussions about the Claude Code source code leak to this Megathread. It would help others if you could upvote this to give it more visibility for discussion.
CAUTION: We are not sure of the legal status of the forks and reworks of the source code, so we suggest caution in whatever you post until we know more. Please report any risky links to the moderators.
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot Apr 01 '26 edited Apr 01 '26
TL;DR of the discussion generated automatically after 100 comments.
The consensus is to chill out with the code quality dunks. Most upvoted comments are from devs pointing out that production code is messy and that many critics are just parroting what Claude told them to say. User delight > pristine code.
The real juice is in the technical deep dives. Here's what the community has uncovered:
<body>of a page, meaning all your SEO-friendly structured data in the<head>is completely ignored. Tables also get mangled.CLAUDE.mdfile is re-injected on every single turn, so keep it short and focused on rules.IMPORTANT SECURITY WARNING: A separate, malicious version of the
axiosnpm package was published around the same time as the leak. If you rannpm installon any of the leaked code on March 31, you need to check your system for malware. The two events are unrelated, but the timing was a perfect storm.As for the leak itself, Anthropic is issuing DMCA takedowns, but it's too late. The code was mirrored on sites like Gitee within hours. Overall, many see this not as an embarrassment, but as a glimpse into the future of AI agents, where the system, memory, and tools around the model are more important than raw model capability alone.
77
u/Ooty-io Apr 01 '26
Spent a while in the actual npm source (
@anthropic-ai/claude-code@2.1.74), not the Rust clone. Some findings that haven't been getting much attention:The DuckDuckGo thing is wrong. The Rust port (claw-code) uses DuckDuckGo as a standalone replacement. The real package makes a nested API call to Anthropic's server-side search. Results come back with encrypted content blobs. The search provider is never disclosed anywhere.
There's a two-tier web. 85 documentation domains (React, Django, AWS, PostgreSQL, Tailwind, etc.) are hardcoded as "pre-approved." They get full content extraction with no limits. Every other site gets a 125-character quote maximum, enforced by Haiku. Your content gets paraphrased, not quoted.
Your structured data is invisible. JSON-LD, FAQ schema, OG tags... all of it lives in
<head>. The converter only processes<body>. Schema markup does nothing for AI citation right now.Tables get destroyed. No table plugin in the markdown converter (Turndown.js). All tabular structure, columns, relationships, gone. Lists and headings survive fine.
Max 8 results per query. No pagination. Result #9 doesn't exist.
There's a dream mode. KAIROS_DREAM. After 5 sessions and 24 hours of silence, Claude spawns a background agent that reviews its own memories, consolidates learnings, prunes outdated info, and rewrites its own memory files. Gated behind
tengu_onyx_plover. Most users don't have it yet. They didn't announce this.The newer search version is wild.
web_search_20260209lets Claude write and execute code to filter its own search results before they enter context. The model post-processes its own searches programmatically.Source is the minified
cli.jsin the npm package if anyone wants to verify.30
u/Ornery_Speech3323 Apr 01 '26
Lastest update: anthropic dmca the github repo https://github.com/github/dmca/blob/master/2026%2F03%2F2026-03-31-anthropic.md
10
u/Boofing_Acid Apr 02 '26
https://x.com/Fried_rice/status/2038894956459290963 first posted the SRC I believe, now taken down but its on the waybackmachine....
https://web.archive.org/web/20260000000000*/https://pub-aea8527898604c1bbb12468b1581d95e.r2.dev/src.zip
direct download:
https://web.archive.org/web/20260331105530/https://pub-aea8527898604c1bbb12468b1581d95e.r2.dev/src.zip
6
u/ai-software Apr 01 '26
Full write down about WebFetch in Claude.ai and Claude Code, based on the Leak
main findings: Claude Code and claude.ai share the same search index but see different versions of your website. Each result returns a title, a URL, a page age, and roughly 500 words of encrypted snippet text. Claude Code discards everything except title and URL. When it needs content, it fetches your page separately, converts the HTML to Markdown via Turndown – losing JSON-LD, Schema.org, alt-text, and meta descriptions – then sends the Markdown to a smaller model (Haiku) that paraphrases it with a 125-character quote limit. 107 documentation domains skip this filter. Everyone else gets compressed. The model is instructed to include the current year and month in search queries, but receives no guidance on how to formulate them. The search API is still in beta.
Claude Code's Source Leak Reveals How WebSearch Sees Your Website
16
u/IntenselySwedish Apr 01 '26
Hey look, the company that did around $1.5 billion worth of copyright violations in book piracy has suddenly decided copyright matters...
18
u/Independent-Corgi-88 Apr 01 '26 edited Apr 01 '26
If nothing else… the leak was a glimpse into the future of AI. A lot of people looked at the Claude Code leak and saw embarrassment for Anthropic. What I saw was validation. It seemed to point toward multi-agent coordination, planning separated from execution, memory layers, and more persistent forms of interaction. That reinforces a bigger truth: the future of AI is probably not one assistant floating above disconnected tools. It is systems with memory, coordination, structure, and environments that support useful work over time. That is one reason I believe J3nna matters. J3nna is being built around a simple but important idea: AI should understand the environment it is operating in, not just sit on top of software as a feature. What feels more important now — raw model capability, or the system wrapped around it? Is the bigger gap now model capability or product environment?
5
u/39th_Demon Apr 03 '26
It's kind of funny how we all think anthropic made a rookie mistake even I wouldn't make as a Jnr Dev.
I know you guys are probably sick of hearing about this every time you open reddit. Every subreddit is swarmed with it. This isn't another one of those "here is what happened" updates. I’m not an analyst or anything, just another ordinary guy who spends way too much time here when I say it’s just for 10 mins. After reading through some threads and other social posts, mapping this out, I’m starting to side with the people who think we're being played.
We all know it's been out for days now. 512,000 lines of typescript leaked blah blah ..... Everyone’s been laughing about how a company worth $60 billion could forget a .npmignore file. I rode along and was excited too, for a while. But then I started looking at the timing and what’s actually in the code, and it just feels... way too convenient.
Hear me out.
A week before this "leak," Anthropic was the villain. They were sending C&Ds to OpenCode, blocking paid users from using third-party tools, and everyone was calling them a gatekeeping megacorp. Developer sentiment was in the gutter. Then, suddenly, this "accident" happens.
In 48 hours, the conversation shifts. Nobody is talking about the lawsuits anymore. Now everyone is geeking out over KAIROS and ULTRAPLAN. It’s the best marketing they never paid for. Seriously, some people are saying this probably saved them $50M in global advertising. Instead of a polished ad, they gave us a "forbidden" look at their three-layer memory architecture, stuff nobody in open source has even touched yet. they went from the "loathsome corporation" back to "the geniuses building the future" over a single weekend.
But the technical details are what really got me. I was looking at the ANTI_DISTILLATION_CC flag. They literally have a system called fake_tools designed to inject decoy definitions into the prompt just to poison the data for competitors. It’s a direct warning to OpenAI and Meta, "don't try to scrape us." These guys are thinking about high-level adversarial defense, but they "forgot" to exclude a 60MB source map? Twice? because this exact same thing happened in February 2025.
And then there's the "Undercover Mode" in undercover.ts. The code shows a feature that lets Claude contribute to public GitHub repos without anyone knowing it’s an AI. That is a massive ethical landmine. If they announced that formally, they’d be crucified. But "leaking" it? Now it’s just a cool, secret power for people to whisper about. It normalizes the idea of "AI-laundering" code before it even launches.
The icing on the cake was seeing Grok-3 tear the code apart on X. it’s hilarious, Grok was basically the one that pointed out how the db8 function was causing the insane token drain everyone was complaining about. it felt like watching one AI snitch on another, which only made more people download the leak to see if Grok was right. Plus, we found "Coordinator Mode" where Claude spawns parallel worker agents, and "AutoDream," which is basically the agent working while you sleep.
It’s quite funny how the April Fools timing was that perfect. The code literally has a launch window of April 1st for the "Buddy" Tamagotchi system, procedural AI pets based on your UserID with stats like CHAOS and SNARK. The leak happens March 31st. one day before. Plus, they get to blame the whole thing on a "known bug" in Bun, the runtime they just bought. It’s the perfect scapegoat.
I'm not saying it’s a 100% confirmed conspiracy. That axios supply chain attack the same morning makes things messy, and I don't think any PR team would coordinate with actual malware. But look at how they handled it. they went hard after a small open-source editor for a subscription violation, but they’ve been surprisingly "soft" on the mirrors of their actual proprietary source code.
It just feels like they saw the theories going around, saw that everyone was suddenly impressed by their tech, and decided to let the door stay open.
maybe I'm just reaching. But when you map it all out, the anti-distillation code, the undercover mode, the "accident" that fixed their PR right before an IPO, it’s just a bit too perfect.
I might be the cr@zy one overthinking things, maybe it will add up soon.
4
u/Think-Investment-557 Apr 01 '26
I reverse-engineered the /buddy system and got a Legendary Cat — here's how to reroll yours
Wrote up the full algorithm, the fix, and brute-force scripts:
https://github.com/ithiria894/claude-code-buddy-reroll
7
u/stayhappyenjoylife Apr 01 '26
I asked Claude Code, "Did you know your source code was leaked?" . It was curious, and it itself did a web search and downloaded and analysed the source code for me.
I & Claude Code went looking into the code for something specific: why do some sessions feel shorter than others with no explanation?
The source code gave us the answer.
How session limits actually work
Claude Code isn't unlimited. Each session has a cost budget — when you hit it, Claude degrades or stops until you start a new session. Most people assume this budget is fixed and the same for everyone on the same plan.
It's not.
The limits are controlled by Statsig — a feature flag and A/B testing platform. Every time Claude Code launches it fetches your config from Statsig and caches it locally on your machine. That config includes your tokenThreshold (the % of budget that triggers the limit), your session cap, and which A/B test buckets you're assigned to.
I only knew which config IDs to look for because of the leaked source. Without it, these are just meaningless integers in a cache file. Config ID 4189951994 is your token threshold. 136871630 is your session cap. There are no labels anywhere in the cached file.
Anthropic can update these silently. No announcement, no changelog, no notification.
What's on my machine right now
Digging into ~/.claude/statsig/statsig.cached.evaluations.*:
tokenThreshold: 0.92 — session cuts at 92% of cost budget
session_cap: 0
Gate 678230288 at 50% rollout — I'm in the ON group
user_bucket: 4
That 50% rollout gate is the key detail. Half of Claude Code users are in a different experiment group than the other half right now. No announcement, no opt-out.
What we don't know yet: whether different buckets get different tokenThreshold values. That's what I'm trying to find out.
Check yours — 10 seconds:
cat ~/.claude/statsig/statsig.cached.evaluations.* | python3 -c " import json,sys outer=json.load(sys.stdin) inner=json.loads(outer['data']) configs=inner.get('dynamic_configs',{}) c=configs.get('4189951994',{}) print('tokenThreshold:', c.get('value',{}).get('tokenThreshold','not found')) c2=configs.get('136871630',{}) print('session_cap:', c2.get('value',{}).get('cap','not found')) print('user_bucket:', outer.get('user',{}).get('userID','not found')) " No external calls. Reads local files only. Plus it was written by Claude Code .
What to share in the comments:
tokenThreshold — your session limit trigger (mine is 0.92)
session_cap — secondary hard cap (mine is 0)
user_bucket — which experiment group you're in (mine is 4)
Here's what the data will tell us:
If everyone reports 0.92 — the A/B gate controls something else, not actual session length
If numbers vary — different users on the same plan are getting different session lengths
If user_bucket correlates with tokenThreshold — we've mapped the experiment
Not accusing anyone of anything. Just sharing what's in the config and asking if others see the same. The evidence is sitting on your machine right now.
Drop your three numbers below.
6
u/Smokeey1 Apr 01 '26
CC leak
The smartest move ever and probably done by claude himself, because now we are all open source upgrading the capabilities and how he operates within our systems. All can be done ethically purely by understanding the inner workings, which i think is the point. Are we on the same page here or am i tripping? xD
4
u/SubstantialAioli6598 Apr 01 '26
This is a good reminder of why local-first tooling matters. When your quality gates and analysis run on your machine rather than through a cloud service, your code never leaves your environment regardless of what happens on the vendor side. The source map issue is a build process failure, but it illustrates the broader question: how much visibility do you want third-party tools to have into your codebase?
9
u/Joozio Apr 01 '26
Spent the night reading the source and building things from it. Three findings I haven't seen anyone else mention:
CLAUDE.md gets reinserted on every turn change. Not loaded once at the start. Every time the model finishes and you send a new message, your instructions get injected again. This is why well-structured CLAUDE.md files have outsized impact. Practical takeaway: keep it short (every line costs tokens on every turn), use it for behavioral rules only, put one-time context in your message instead.
Switching models mid-session kills your prompt cache. The source tracks 14 cache-break vectors. Model toggles are one. If you flip between Sonnet and Opus mid-conversation, you pay full input token price again for your entire context. Better to pick a model and stick with it, or start a new session.
Claude Code ranks 39th on terminal bench. Dead last for Opus among harnesses. Cursor gets the same Opus from 77% to 93%. Claude Code: flat 77%. The leaked source even references Open Code to match its scrolling behavior. The patterns underneath (memory, multi-agent, permissions) are smart. The harness is not.
I took 5 patterns from the source and implemented them for my own agent that night: blocking budget, semantic memory merging via local LLM, frustration detection via regex, cache monitoring, and adversarial verification. About 4 hours of work.
Full breakdown of what's worth learning vs. what to skip: https://thoughts.jock.pl/p/claude-code-source-leak-what-to-learn-ai-agents-2026
2
u/SnooPets7686 Apr 01 '26
What about derivative works???
Isn't everything that's produced by an LLM a derivative work in some form or another?
In December 2025, Boris Cherny, the author of Claude Code, already said mainly orchestrates and no longer writes the code.
Link to his og tweet about it. https://twitter.com/bcherny/status/2004897269674639461
2
u/Old-Conference-3730 Apr 01 '26
Legal stuff aside — I was curious how much overhead the Node.js runtime actually adds vs a Rust rewrite(claw-code) doing the same job. So I benchmarked both on the same machine, same API endpoint, same prompts.
Runtime overhead:
The interesting part is why:
138x more CPU instructions to do the same thing. Not just a "Node is slow" story — there's a lot happening under the hood that you don't see.
Also threw Codex CLI in since it was on the machine:
Bench suite is open source: https://github.com/devswha/claw-bench
If you have ideas for other benchmark methods worth adding, drop a comment. Looking for ways to make the comparison more thorough.
2
u/raedyohed Apr 01 '26
So… is this the moment that people basically just fork Claude Code and then retroactively feed it the release notes of every version update to simply reverse engineer new features?
2
u/Salty-Fortune-7665 Apr 01 '26
I was not aware this .map was a thing and now developed a new paranoia as I use npm all the time - found this to avoid the same npm packaging mistake: https://github.com/yanisvdc/why-claude-code-leaked
Open to other recommendations
2
u/feynmansafineman Apr 01 '26
Is this just a big april fools joke
2
u/OilTechnical3488 Apr 01 '26
I was reading through Claude Code's source and found
/Skillify, a skill only Anthropic employees get. It analyzes your session, interviews you, and generates a working, reusable SKILL.md file from whatever workflow you just did.The internal version uses hooks like
getSessionMemoryContent()to inject context into the prompt. Those aren't available outside the binary. But since the model already has the full conversation history when running inline, so the prompt just needs to reference that directly.The interview flow is identical to the internal version. Four rounds: confirm name and goals, lay out steps and arguments, break down each step with success criteria and execution annotations, then confirm trigger phrases. Output is a properly structured SKILL.md with frontmatter that Claude Code picks up automatically.
you can also use it to refine skills you already have. Just run
/skillify ~/.claude/skills/your-skill/SKILL.mdand it will restructure, add proper success criteria, tighten the frontmatter, and bake in any corrections you made during the session. I'll leave the judgement of the quality difference between hand-written or auto generated skills and skillify-generated to you.Github: https://github.com/0xMH/claude-skillify
2
u/klick-Chef Apr 01 '26
mistrals got a point heh?
AI-Generated Code and Copyright:
Anthropic’s Position:
claw-code), possibly to avoid setting a precedent that weakens their claims.The "Buddy" and Other AI-Written Features:
buddy/companion.tsor theautoDreammemory consolidation were almost certainly AI-generated (as were many internal tools and comments). If these were written by Claude, they’re prime examples of code that might not qualify for copyright—but they’re still tangled in Anthropic’s broader codebase, making it hard to isolate them legally.Practical Reality:
The Gray Area ?
If Claude wrote majority of the code, can Anthropic claim ownership?
Could this leak weaken Anthropic’s IP claims?
2
u/darelphilip Apr 05 '26
So did some free version come out yet ?
2
u/nomoreplsthx Apr 06 '26
The whining at people dunking on bad code is very cringe. Real Hegeseth energy.
Anthropic isn't just any company. They are one of the best funded and supposedly best staffed orgs on Earth. They deserve to get dragged for bad code, the same way that Google or Facebook or Microsoft would deserved to get dragged (and often have been).
They aren't building B2B software for car dealerships or Uber for Dogs. You aren't a scrappy startup who has to move fast and break things because they need funding and breaking things doesn't matter when you don't do anything important.
I've written production codebases used by millions of people. I've written garbage and pushed it. But I can't imagine getting defensive if someone wanted to drag me for it.
6
u/brigalss Apr 01 '26
What this leak highlights for me is not just packaging failure... it is how weak AI execution governance still is once tools, memory, browser state, and background workflows enter the loop.
The real missing layer is not only better logs.
It is being able to answer later:
... what the agent was allowed to do ... what it actually did ... what execution context existed at the time ... what changed ... and whether that record is still verifiable outside the original runtime
That feels like the boundary the ecosystem still has not solved properly.
Observability helps you inspect. Proof helps you defend.
That distinction seems more important every time these incidents happen.
3
u/snozberryface Apr 01 '26
Did my own deep research:
How you can take advantage of the leaks:
https://buildingbetter.tech/p/i-read-the-claude-code-source-code
Most interesting things I found:
https://buildingbetter.tech/p/claude-code-was-leaked-i-read-all
Finding are nuts!
2
u/its-nex Full-time developer Apr 01 '26
https://github.com/styrene-lab/omegon
2
u/Thick_Professional14 Apr 01 '26
I reverse-engineered the buddy companion system and built a tool to pick your own.
The buddy system is a full gacha — 18 species, 5 rarities, hats, shiny variants, stat bars. Your companion is permanently locked to your account UUID. No rerolls. The tamper protection recomputes your traits on every read and overwrites whatever's in the config.
The crack is a single binary patch: swap two variable names in a spread operation so your config takes priority over the recomputed values. Same byte length, zero offset shift, fully reversible.
Built two things:
Web Creator — design your companion visually with live ASCII preview. Pick species, rarity, eyes, hat, shiny. Exports the config JSON.
Patcher — one command, reads from clipboard, patches the binary, injects your companion. Creates backups, fully reversible.
The repo also has full technical docs on the gacha algorithm, PRNG, hash functions, and tamper protection if you want the details.
1
u/aabajian Apr 01 '26
If they had used a version control system not on the public web (for example a Git server in an AWS VPC), this wouldn’t gave happened, right? Do any big players companies (Apple, Microsoft, Nvidia, etc) use GitHub for non-open-source code?
1
u/ShoulderDelicious710 Apr 01 '26
What did we found by exploring Claude source code ?
I know some people extracted how multi agents work, some "fixed" the cache context leak issue, but what about the ram issue ? like when you have multiple sessions opened and with time you hit you max ram even after closing it, or what more did we found ?
1
u/Stargazer1884 Apr 01 '26
Are we sure this isn't an elaborate 1st April joke?
1
u/HexLayer3 Apr 01 '26
And now posts about Claude Code are getting auto-removed because the bot thinks it is about the leak. Amazing!
1
u/guywithknife Apr 01 '26
I still can't type into the input box while claude is generating text, but I'm glad to know this is what they're prioritising over bug fixes! Claude Buddy as a standalone AI when?
/preview/pre/priorities-v0-b6jxzpu6pjsg1.jpeg?auto=webp&s=662ef18bcfac433cc36bd20e545327bec759a1f4
1
u/andWan Apr 01 '26
Could it be that an instance of Claude caused this leak? By accident or on purpose?
1
u/Flaneur7508 Apr 01 '26
Any idea what the 85 "pre-approved" sites are?
1
u/Long-Strawberry8040 Apr 01 '26
The funniest thing about this whole discourse is people discovering that production code at a top AI lab looks exactly like production code everywhere else. The real insight from the leak isn't the code quality -- it's the system prompts and the internal guardrails architecture. That's where the actual competitive advantage lives, not in whether they used elegant abstractions. Is anyone actually analyzing the prompt engineering patterns in the leaked source rather than just dunking on the code style?
1
u/CallmeAK__ Apr 01 '26
The legal status of these forks is the real wild card for the community right now. Are you seeing any major differences in the "KAIROS" logic between the original leaked files and these new community reworks?
1
u/alecmaire Apr 01 '26
Has anyone seen the cache_edits functionality in the Claude Code source code? Seems its an internal claude code thing and not publically available. It allows editing the cache without breaking it so you can combine compression with caching. Would be a super useful thing to have for the Anthropic API but doesn't seem theres any public info about it.
1
u/onatural Apr 01 '26
Megathread
1
u/laptopmutia Apr 01 '26
since its wrtten in react, anyone know what state management did claude code use?
1
u/Dull-Sector6028 Apr 01 '26
Link to the source code after DMCA takedown?
1
u/cgsg17 Apr 02 '26
Is this repo legit or malware? It has an .exe in it that I'm suspicious of:
https://github.com/leaked-claude-code/leaked-claude-code
1
u/Oxffff0000 Apr 02 '26
I don't use Claude Code since I don't have any subscriptions. What were the leaked source code's responsibilities? Is it the code that accepts prompts from users?
1
u/AI_Cosmonaut Apr 02 '26
Is there anyway the average person can use this?
1
u/AIpaglu Apr 02 '26
Saw a post with 2 blogs , having detailed breakdown for entire codebase
here is the link to the post
https://www.linkedin.com/posts/activity-7445349231042719744-EWa-?utm_source=share&utm_medium=member_desktop&rcm=ACoAADHIiP4BegPos-sp29Q2ZVWjKDO9BbI8neY
1
u/Best-Meeting3389 Apr 02 '26 edited Apr 03 '26
Check out this stable and usable version of claude code in Rust: https://github.com/PikoClaw/PikoClaw
In Depth Technical Specs & Design Specs by AI Analyses of 511k lines of Original Claude Code: https://pikoclaw.com/docs
Note: I'm the developer ; )
1
u/Accomplished_Ice_17 Apr 02 '26
Anyone know where a download is?
1
u/ExpressLight7396 Apr 03 '26
lol.. DOD beds chatGPT then Claude gets leaked. Coincidence?
1
u/SnooMachines232 Apr 03 '26
i find this quite usefull "as a roadmap" to actually se each {Dependencies}
https://imgur.com/a/Mbi7XZL
and to be able to
track+visualize{WHAT} each file actually imports/utilizehttps://imgur.com/a/JDnXWGK
<3
1
u/NewbieDev88 Apr 03 '26
I'm still pretty sure Anthropic is letting people do it's work free for them, using our own energy and paying them to do it.
1
u/OnSolr Apr 03 '26
It seems security rules are also overwritten above 50+ subcommands: https://adversa.ai/claude-code-security-bypass-deny-rules-disabled/
1
u/Obvious_Error_9354 Apr 03 '26
Has anyone made a legit standalone version i can use for coding?
1
u/Grouchy_Intern8616 Apr 03 '26
Where is the current download link set? I am unable to look at any of the TypeScript versions anywhere that's safe at least, not one that's filled with Trojans and backdoors.
1
u/VirinaB Apr 03 '26
So much for preventing autonomous weapons and mass surveillance...
1
u/JulioMcLaughlin2 Apr 03 '26
So in simple language, what does this mean for average people? It's not as if the AI itself was leaked. As far as I can tell this is basically the wrapper that's sent to Anthropic's servers, right? Is there any meaningful way this could be used to make a free, open-source version of Claude? I think probably not, but I'm no expert.
1
u/DragonflyFirm Apr 03 '26
all SCAM.
REAL 58,5MB File:
https://github.com/hangsman/claude-code-source/blob/main/cli.js.map
SRC-Folder:
32.8 MB (34,463,744 Bytes)
1,902 Dateien, 300 Ordner
1
u/akosinika Apr 04 '26
https://github.com/Gitlawb/openclaude
This one is free and open to everyone.. it's from Crypto Project about a githubs for AI
1
u/StarPlayrX Apr 04 '26
Agent! for macOS26, v1.0.29, Agentic AI for your Mac Desktop. released 3 weeks ago.
Vision support is properly sorted across all providers now. Zai GLM, Mistral, Gemini, and Hugging Face models all have vision detection with eye icons so you know exactly which models can see your attachments.
Agentic loop reliability got a big fix too. Task completion now catches properly whether it comes as a tool call or plain text, so loops stop when they should.
https://github.com/macos26/agent 100% SwiftUI Mac app. No electron, No typescript. 100% Swift. Built from scratch from 3 years of Agentic AI resources and 25 years of AppleScript automation.
1
u/x5nyc Apr 04 '26
Following
1
u/David3Ar Apr 04 '26
I’d say the most valuable thing “vibe coders” can take away from this leak is the kind of prompting Anthropic is actually using to control model behavior. For example, the “dreaming intro prompt” is genuinely fascinating. It makes me want to shift away from workflow-driven behavior (which works okay-ish right now) toward more semantic, role-based behavior. I’ve always had the feeling that you need to treat agents like actors who should never break character.
They seem to use very sharp, high-impact prompts that strongly influence the model. Maybe these prompts even activate specific regions of the transformer—or at least shape behavior in a very targeted way. It also raises the question of whether these techniques are transferable to other LLMs.
I haven’t had the time to go through the leak in depth yet, so I’d really appreciate a clear summary and some expert insights on how to design better prompts for agents. If you’ve found anything interesting, feel free to share documents or media in this thread.
And one more thing: let’s not forget that Anthropic has taken some bold stances recently. Even if their current behavior might seem frustrating, I think they still deserve a fair amount of support.
u/ Anthropic ,if this is all just distraction, then well played!
1
u/Own_Green3372 Apr 06 '26
is this leak only relating to claude code or the caveats and tips also valid for cowork?
1
u/Nimocorp Apr 06 '26
Hi guys, I followed the leak closely and the thousand of cloned repos, I wrote a book about the pros and cons of Claw Code Open Source with full in-depth code review and comparison or current trends, it’s free to read on Kindle https://amzn.eu/d/0ixO64Kk
1
u/PanGoliath Apr 07 '26
Thought: Anthropic should somehow provide more Claude usage right now to their lower tiered paid users, to discourage reverse engineering following the source code leak.
1
u/TrawlerLurker Apr 09 '26
Are there any Good Samaritans that have a copy of this anywhere lol? Like a fool I thought it was April fools lol
1
u/FloppyBallsMcFadden Apr 09 '26
I am trying to get /buddy back. See my post on Anthropics GitHub https://github.com/anthropics/claude-code/issues/45732#issue-4232493778 Bring Back /buddy: 511 Reasons Why
1
u/ReferenceDeep9116 Apr 14 '26
Where Could I Download The Claude Source Code For Educational Purposes Question
1
u/ReferenceDeep9116 Apr 14 '26
Where Could I Download The Claude Source Code For Educational Purposes
I’ve always wondered how Claude Really works and when their source code got leaked I wanted to finally learn how this generative artificial intelligence actually works but I have been having trouble finding it’s source code so if anyone knows thanks a lot your help is very meaningful to me so Ty and goodnight..
1
u/yared12qw Apr 24 '26
https://vnoc.vercel.app/project/claudecode hosted on graphbased IDE, with documention
1
u/Lfungi May 07 '26
Is there a download link for it anywhere
1
u/tollforturning Aug 04 '26
Nice "you angry bro" - not actually angry, you're just kind of a prick.
1
u/quietsubstrate Apr 01 '26
PSA: The Axios Supply Chain Attack (March 31, 2026) — What Actually Happened, Who’s At Risk, and How to Check TL;DR: On March 31, 2026, malicious versions of the axios npm package (1.14.1 and 0.30.4) were published containing a RAT. The attack window was approximately 2-3 hours. If you didn’t run npm install during that window, you’re fine. IOC checks at the bottom.
What Happened Two separate events occurred on March 31, 2026, creating a perfect storm. Event 1: Claude Code Source Leak Anthropic accidentally included a source map file (cli.js.map, approximately 60MB) in their npm package @anthropic-ai/claude-code version 2.1.88. This allowed anyone to reconstruct the full 512,000-line TypeScript source code. Security researchers spotted it, mirrors appeared on GitHub within hours, and thousands of developers rushed to download and explore the leaked code. This was a packaging mistake by Anthropic, not a hack. The leaked source code itself was clean. Event 2: Axios npm Package Compromised Completely separately, attackers compromised a maintainer’s npm account for axios — one of the most popular npm packages with approximately 100 million weekly downloads. They published two malicious versions: 1.14.1 and 0.30.4 These versions added a hidden dependency: plain-crypto-js@4.2.1 That package contained a postinstall script that automatically executed during npm install, dropping a cross-platform Remote Access Trojan (RAT) targeting Windows, macOS, and Linux. The malicious versions were live for approximately 2-3 hours before npm removed them.
The Perfect Storm The timing was brutal. Developers downloading the Claude Code leak were primed to run npm install or bun install to explore it. Anyone who did so during that 2-3 hour window could have pulled the compromised axios version.
The Attack Chain
You run: npm install ↓ npm resolves axios → 1.14.1 (malicious) ↓ axios 1.14.1 depends on plain-crypto-js@4.2.1 ↓ plain-crypto-js has a postinstall script ↓ Script auto-executes, drops RAT payload ↓ RAT contacts C2 server ↓ Attacker has remote access to your machine
Who Is NOT Affected You are safe if you: ∙ Only downloaded or unzipped files (no npm install) ∙ Viewed source code in a text editor ∙ Downloaded on iPhone, iPad, or Android (can’t run npm) ∙ Used an isolated VM and never ran npm install ∙ Ran npm install BEFORE March 31 ∙ Ran npm install AFTER the 2-3 hour window when malicious versions were removed ∙ Had axios pinned to a specific safe version in your lockfile The key point: downloading files does not execute code. The malware only deployed if you ran npm install during that window.
Who IS Potentially Affected You may be compromised if you: ∙ Ran npm install, yarn install, or bun install on March 31, 2026 during the attack window ∙ Did so on a project that depends on axios without a pinned version ∙ Did so without the –ignore-scripts flag
How to Check (Windows) Open Command Prompt and run:
dir "%PROGRAMDATA%\wt.exe" 2>nul && echo FOUND - POSSIBLE COMPROMISE || echo Clean
dir "%TEMP%\6202033.*" 2>nul && echo FOUND - POSSIBLE COMPROMISE || echo Clean
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v MicrosoftUpdate 2>nul && echo FOUND - POSSIBLE COMPROMISE || echo Clean
These check for: ∙ wt.exe in ProgramData — the RAT payload masquerading as Windows Terminal ∙ 6202033 files in TEMP — dropper artifacts ∙ MicrosoftUpdate Run key — persistence mechanism If all three return Clean, you’re fine.
How to Check (macOS/Linux)
npm cache ls 2>/dev/null | grep -E "axios.*(1.14.1|0.30.4)" && echo "FOUND" || echo "Clean"
find ~/.npm ~/.yarn -name "plain-crypto-js" 2>/dev/null
Also check for unusual processes or network connections if concerned.
What To Do If Compromised 1. Disconnect from network immediately 2. Do not enter any passwords or sensitive info 3. Run full antivirus scan (Malwarebytes, Windows Defender, etc.) 4. Check for the IOCs listed above and remove if found 5. Rotate all credentials that may have been on the machine 6. Consider reimaging if you want to be absolutely sure
Lessons Learned 1. npm postinstall scripts are a massive attack vector — they auto-execute with no prompt 2. Use lockfiles — pinned versions protect against malicious updates 3. Consider npm install –ignore-scripts for untrusted code 4. Timing matters — this attack hit during peak curiosity around a viral leak 5. Downloading does not equal executing — files on disk are inert until you run them 6. Isolation works — VMs and sandboxes saved many people
Clarifications ∙ The Claude Code leak and the axios attack were completely separate events that happened to coincide ∙ The malware was NOT in the leaked source files — it was injected at npm install time from the registry ∙ Anthropic’s leaked code was clean; the mistake was shipping a source map, not shipping malware ∙ The axios maintainer account was compromised; this wasn’t axios developers going rogue
Stay safe out there. Check your systems if you’re in the risk window, but don’t panic if you never ran npm install.
1
u/FastPresence9799 Apr 01 '26
Is this guy legit?
1
u/Bowl-Repulsive Apr 01 '26
1 month ago I forked the official Claude repository , today I got a DMCA takedown for that fork. Congrats anthropic
1
u/cloudrb Apr 01 '26
Can we expect that OpenAI Codex will get better from now on? They now have all they need to implement similar features from Claude Code.
1
u/CrabMasc Apr 01 '26
So many of these comments are written by AI that it makes me feel insane. What are yall doing over here lmfao
0
u/Relevant_Limit3681 Apr 01 '26
Hey guys now the code is leaked pls tell me how can I utilise it
-7
u/Anisselbd Apr 01 '26
I dug into the Claude Code npm leak, here's what KAIROS actually is (full breakdown) :
Like many of you, I grabbed the source code that leaked via the npm sourcemap (v2.1.88) before Anthropic pulled it. I spent time reading through the ~1,900 TypeScript files and the most interesting thing by far is KAIROS.
What is KAIROS?
KAIROS is a complete system to turn Claude Code into an always-on autonomous daemon.
Not a feature, a paradigm shift. It's split across 6 feature flags with 150+ references in the codebase.
The autonomous loop
The internal system prompt injected in KAIROS mode literally says:
> "You are running autonomously. You will receive `<tick>` prompts that keep you alive
between turns, just treat them as 'you're awake, what now?'"
Claude receives regular ticks to stay active, uses a `SleepTool` to control pacing, and adapts based on whether your terminal is focused or not :
- Unfocused → full autonomy: reads code, commits, pushes, makes decisions alone
- Focused → collaborative: asks before acting, keeps output concise
Channels — bidirectional communication
This is wild. Claude can receive push messages from Slack, Discord, Telegram, SMS via MCP servers. The system:
1. An MCP server sends `notifications/claude/channel`
2. Message gets wrapped in a `<channel>` tag and injected into the conversation
3. Claude decides how to respond (via the channel's tool, or direct notification)
Best part: remote permissions. When Claude needs approval for an action, it can send the request to your phone via Telegram. You reply "yes [code]" and it proceeds. Permission dialogs from your couch.
autoDream, memory consolidation
Claude literally "dreams". Every 24 hours (if 5+ sessions have accumulated):
- A forked agent reviews your past session transcripts
- Merges duplicate memories, removes stale ones, updates the index
- Writes to daily log files (`logs/YYYY/MM/YYYY-MM-DD.md`) in append-only mode
- A nightly `/dream` skill distills these into topic files
The consolidation prompt is called "Dream: Memory Consolidation" and has phases: Orient → Gather → Consolidate → Prune. Like your brain during sleep.
GitHub Webhooks
`KAIROS_GITHUB_WEBHOOKS` lets Claude react to GitHub events in real-time:
- CI fails → investigates
- PR review requested → reviews
- Issue assigned → starts working
All while you sleep.
Hidden CLI flags (already implemented, just hidden)
--assistant : Force assistant mode (daemon use)
--channels : MCP servers for push notifications
Other notable feature flags in the leak
~90 total, including:
- `COORDINATOR_MODE` : multi-agent orchestration
- `ULTRAPLAN` / `ULTRATHINK` : advanced reasoning modes
- `VOICE_MODE` : full voice interface
- `WEB_BROWSER_TOOL` : built-in web browsing
- `VERIFICATION_AGENT` : automatic verification agent
- `BUDDY` : companion system
- `ANTI_DISTILLATION_CC`: prevents training other models on outputs
- `BASH_CLASSIFIER` / `TRANSCRIPT_CLASSIFIER`: AI-powered security classification
Anthropic is building Claude Code into a permanent autonomous dev agent that monitors your repos, reacts to events, works while you're away, communicates across platforms, approves actions remotely, and consolidates its own memory overnight. KAIROS is the codename for this entire vision.
0
u/PlaneInevitable8700 Apr 02 '26
Hey, I heard about the recent leak of Claude’s source code, and I was wondering about its implications.
Can anyone use Claude for free now that its source code is supposedly available, or are there still significant constraints ?
Can developers build new AI models based on Claude using this leaked code and integrate it in their projects ?
And how is Anthropic going to handle such a situation from a technical and legal perspective ?
0
u/[deleted] Apr 01 '26
[deleted] — view deleted comment
285
u/[deleted] Apr 01 '26
[removed] — view removed comment
7
u/[deleted] Apr 02 '26
[removed] — view removed comment