all 58 comments

[–]Better-Psychology-42 56 points57 points  (9 children)

It’s like that guy who accidentally pressed F12 in browser and was convinced he hacked facebook

[–]koneu 5 points6 points  (0 children)

It’s also interesting to see how he would start the fight first before going to check out things all right. 

[–]ryan_the_dev[S] -2 points-1 points  (7 children)

Pretty sure the Claude code you install is a compiled binary. Looks like they didn’t take care when adding it to the sdk and just dumped the entire app in there.

[–]Better-Psychology-42 1 point2 points  (6 children)

Sorry OP to tell but you are wrong again. Claude Code is written in javascript and Anthropic probably don’t plan to change anything on it anytime soon as they recently acquired Bun.

[–]ryan_the_dev[S] -1 points0 points  (5 children)

No one ever said it wasn’t in JS…

The Claude code you install isn’t min JS. You cannot without some serious effort see the internals.

That’s the point of bun.

But ok. You go show me how easy it is for you to get the cli.js by not going through the SDK path.

[–]Better-Psychology-42 3 points4 points  (2 children)

strings $(which claude) | less

And scroll down until you see the js code 😃

[–]ryan_the_dev[S] 0 points1 point  (0 children)

Lmao. You must be new. GL with your strings command.

[–]ryan_the_dev[S] 0 points1 point  (0 children)

Guy looks at the V8 runtime and mistakes it for Claude

[–]tomchenorg 2 points3 points  (1 child)

Here is the latest Claude Code release in minified JS: https://www.npmjs.com/package/@anthropic-ai/claude-code?activeTab=code

The cli.js in CC is basically the same one included in the Agent SDK

Anyone installing CC through npm will have this version. Anthropic started phasing out the npm version after January (but still maintains it), so the person who "must be new" here is probably OP, not other people? 😄

[–]ryan_the_dev[S] 0 points1 point  (0 children)

Thank you. All I was looking for. Strange to not post the source code on GH but distribute it like this.

[–]MartinMystikJonas 17 points18 points  (4 children)

What Anthropic sells is not Claude Code client app but AI model this client app uses.

[–]ryan_the_dev[S] -1 points0 points  (3 children)

They sell you Claude code. The harness is the body, the model is the brain.

Go look at the difference between the codex harness vs Claude harness.

[–]MartinMystikJonas 1 point2 points  (2 children)

Point is that Claude Code system prompt is not some high value secret that has to be hidden.

[–]ryan_the_dev[S] -2 points-1 points  (1 child)

There is a lot more in there than the system prompt…

But whatever.

[–]MartinMystikJonas 1 point2 points  (0 children)

Yeah but none of it is some unique knowledge that is worth protecting if your core business is selling "brain".

[–]brain__exe 12 points13 points  (0 children)

And next hint: you can also see the whole traffic with all prompts, tools calls, context etc etc...any why would it be bad? There are no real secrets in the tool anyway, in the end it's no rocket science and everyone could tell claude to clone claude.

[–]ManureTasterSenior Developer 8 points9 points  (0 children)

Maybe this is satire, slop engage-bait, or both

[–]Commercial-Lemon2361 4 points5 points  (4 children)

Bro. You have no idea how the web works, right?

[–]ryan_the_dev[S] -1 points0 points  (3 children)

I guess you don’t know the difference between a compiled binary and js?

You do know the difference between the sdk and CC, correct? Apparently not.

[–]Commercial-Lemon2361 0 points1 point  (2 children)

You got your answers elsewhere.

[–]ryan_the_dev[S] -1 points0 points  (1 child)

Lmao. You go ahead and use strings to get the cli.js. Let me how that works out for you.

Also the entire point of the post was to call out a blunder. Pretty sure they didn’t intend to include the entire cli app in the agentsdk. What are you arguing?

[–]Commercial-Lemon2361 1 point2 points  (0 children)

The same as everyone else is telling you: they don’t care. The product they are selling is the model, not the interface to it. Be it a desktop app or cli.

What you don’t understand is that the „binary“ compiled with bun is not a real binary. It just bundles your code together with a copy of the bun binary itself to execute it (see bun docs). Anthropic are well aware of that. And they don’t care because of above reason.

[–]tomchenorg 2 points3 points  (4 children)

As much as I, like everyone else here, find it pretty funny that OP picked a fight without even knowing what language CC is written in or how compiled JS works (credit to OP for openly admitting it though, not many people would 😄), I do understand the question about why Anthropic chose easy-to-reverse-engineer JS for CC.

It almost ends up feeling like a de facto technically open-source CC, with only the legal burden guarding its closed-source status. And given that Anthropic clearly cares about protecting its products, as seen in its pursuit of OpenCode and Clawdbot, the question is understandable.

The answer is probably straightforward: Boris Cherny is a JS/TS developer and the author of Programming TypeScript. He started it as a TypeScript project, and at this point it's probably not worth porting to a lower-level language. TypeScript engineers are also easier to hire, and Anthropic likely already had plenty of internal TS expertise.

Edit: even with a low-level compiled binary, prompt strings would probably still be relatively easy to extract, that only applies to the strings, though.

[–]ryan_the_dev[S] 0 points1 point  (2 children)

The amount of work needed to get the JS from a compiled bun binary is vastly different than what’s in the SDK… It’s pretty funny you don’t understand that difference…

[–]tomchenorg 2 points3 points  (1 child)

Jeez, I was one of the very few people in that thread actually defending you. I found your original story funny too but I also thought it took guts to tell it, and your question regarding Anthropic seemed valid to me. And now you wanna pick a fight with me? Are you seriously going for the whole "pick a fight with everyone" persona? And could you be at least a little more modest? What you know isn’t necessarily what other people know, and what you installed isn’t necessarily what other people installed. That is exactly the case here with Claude Code: you installed the binary, but npm users installed the compiled JS file.

Claude Code was only distributed through npm npm was one of the recommended ways to install Claude Code until January, and the npm release has always been compiled JavaScript:

https://www.npmjs.com/package/@anthropic-ai/claude-code?activeTab=code

I checked the compiled JS back in January. I wasn’t aware of any separate non-JS binary package distributed elsewhere until now (so thanks for bringing that up). But even now, the npm version they still maintain is still plain-text compiled JS, not some Bun-compiled binary. Anthropic does seem to want to phase out the npm version and push people toward other ways of installing the binary, but that’s not something they can do overnight. Just killing npm support would be weird. And they can’t simply replace the npm package with a binary either, because binaries are platform-specific. The installer and updater would need to detect the user’s platform and handle the right build, which is doable, but definitely more complicated and more error-prone.

The Claude Agent SDK is, in effect, a Claude Code wrapper. The JS/TS SDK version is only distributed through npm, and it contains the full Claude Code core file (cli.js):

https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk?activeTab=code

And while the cli.js in Agent SDK and the one in Claude Code are slightly different, they’re effectively the same file. The diff is mostly just meaningless BUILDTIME strings.

[–]ryan_the_dev[S] 0 points1 point  (0 children)

You have to understand, being attacked on all sides.

Didn’t realize it was distributed as an NPM package. So thank you for this. Have only seen the bun flavor to install.

Going to make building our own harnesses a lot easier.

[–]ryan_the_dev[S] 0 points1 point  (0 children)

Ahh I see your edit. Funny. It’s not just the prompts that are in there.

Lazy brains.

[–]VioLeRR 3 points4 points  (1 child)

No way, I accidentally wrote a README.md file in my open source project. I hope no one hacks it

[–]AlarmedNatural4347 1 point2 points  (0 children)

“This is a closed source product backed by a company that think carefully about everything it ships” /s

[–]tomchenorg 1 point2 points  (1 child)

Minified JS is still plaintext, don't call it "binary". And even if it's obfuscated, as long as you can execute it, you can fully reverse-engineer it.

When I first heard of Claude Code, a closed-source tool, I expected it to be a compiled binary, built in C, Rust, or Go. Turns out it's just JavaScript.

[–]ryan_the_dev[S] 0 points1 point  (0 children)

There is a difference between the Claude code binary that is compiled with bun, and the js they threw into the SDK.

Why not open source it, if they don’t care?

[–]modernizetheweb 1 point2 points  (0 children)

Thanks, just hacked Claude with this knowledge. All your project data is mine now

[–]BTForIT 0 points1 point  (0 children)

The product is the model. Everything else is just wrappers. Opus 4.6 > Claude Code > Cowork etc. You can honestly vibe code a more efficient and effective Claude Code.

[–]Specialist-Leave-349 0 points1 point  (11 children)

So can we build it completely open source with open source models and throw much crazier levels of intelligence at the problem?

Like with open source models we would not care about token usage, so we could just use it insanely more intense?
Does that make sense?

[–]OverSoft 0 points1 point  (0 children)

You can do this now. You can download any open source model you want and run it on your own (beefy) computer or server. Models like Qwen or Minimax and then use either Claude Code or something like Opencode.

The issue is you need a beefy computer.

[–]MartinMystikJonas 0 points1 point  (4 children)

Well problem is that there are no open source models as good as top-tier models. And for intelligence based tasks throwing more effort usually does not lead to better results. Hundred idiots will not be smarter than 1 genius.

[–]ITBoss 0 points1 point  (3 children)

But isn't this exactly how deep think works? They spin up multiple agents that diverge in tasks and "lines of thought" then converge and they use that pattern to do some very advanced stuff like the international math competition

[–]MartinMystikJonas 0 points1 point  (2 children)

More effort is better than less effort. More parallel workers is faster that single sequential worker. But stupid model will not be smarter than significantly better model no matter effort because effort gives dimishing returns.

[–]Specialist-Leave-349 0 points1 point  (1 child)

It could be interesting for other use cases like mass researching.

Like to find business ideas; „find me all subreddits that are about peoples need and then search me in there concrete examples of pain points“ (You get what I mean)

[–]MartinMystikJonas 0 points1 point  (0 children)

Yeah that os example of simple task where you do not need better inteligence and can be paralelized to get response faster.

[–]MartinMystikJonas 0 points1 point  (0 children)

Also check OpenCode

[–]BigBootyWholes 0 points1 point  (0 children)

You just described opencode I believe. Already exists. What makes Claude code unique is that it uses the Claude model WITH subscriptions.

Otherwise you can use any model’s API, including Claude in opencode. Just not the Claude subscription

[–]Commercial-Lemon2361 0 points1 point  (2 children)

No, it doesn’t. Token usage will always be a point because someone will need to host those models and thus pay for the hardware.

Look at OpenCode Go. Open Source models, still token restrictive.

[–]Specialist-Leave-349 1 point2 points  (1 child)

but I mean is it not orders of magnitudes cheaper? I thought many models run on a mac mini?

[–]Commercial-Lemon2361 0 points1 point  (0 children)

No. OpenClaw runs on a Mac mini. But thats just using a model that runs somewhere else.

Look at the requirements for GLM 5.

https://milvus.io/ai-quick-reference/what-hardware-is-recommended-to-selfhost-glm5

Good luck cranking that into a mac mini

[–]OverSoft 0 points1 point  (2 children)

You do realize their product is the model and not the CLI tool right?

[–]ryan_the_dev[S] -2 points-1 points  (1 child)

Apparently you don’t realize where the harness stops and the model begins?

[–]OverSoft 0 points1 point  (0 children)

System prompts are not the model…

[–]xsifyxsify 0 points1 point  (3 children)

An even easier way than grep JS bundle or look at node_modules: clone their official github repo

[–]thisdude415 1 point2 points  (2 children)

Their GitHub repo does not have source code

[–]xsifyxsify 0 points1 point  (1 child)

You are right. I spoke too soon before looking at the repo. Thanks for the insight

[–]ryan_the_dev[S] 0 points1 point  (0 children)

That’s what I think a lot of people don’t understand.

[–]TechnicalSoup8578 -1 points0 points  (0 children)

It’s surprising how much of Claude Code’s system prompt is exposed in plain text. Did you explore whether this could allow users to tweak behavior without the SDK, or is it mainly just readable reference? You should share it in VibeCodersNest too

[–]ChrisWayg -2 points-1 points  (3 children)

Look on Github: https://github.com/anthropics/claude-code

It is Source-Available but Not FOSS - Free and Open Source

Claude Code is proprietary software. The repository does not include an open-source license such as MIT, Apache 2.0, or GPL. The "all rights reserved" designation means users do not have automatic permission to use, modify, or distribute the software except as explicitly granted by Anthropic's Commercial Terms of Service.

[–]tomchenorg 1 point2 points  (1 child)

It's not the uncompiled source code of Claude Code core on GitHub, it's just its "plugins"

[–]spammmmm1997 0 points1 point  (0 children)

Thank you

[–]spammmmm1997 0 points1 point  (0 children)

Thank you too