Remix.run Logo
the_mitsuhiko 4 days ago

Unfortunately, Claude Code is not open source, but there are some tools to better figure out how it is working. If you are really interested in how it works, I strongly recommend looking at Claude Trace: https://github.com/badlogic/lemmy/tree/main/apps/claude-trac...

It dumps out a JSON file as well as a very nicely formatted HTML file that shows you every single tool and all the prompts that were used for a session.

rbren 3 days ago | parent | next [-]

If you’re looking for an OSS alternative check out OpenHands CLI: https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file

CuriouslyC 4 days ago | parent | prev [-]

https://github.com/anthropics/claude-code

You can see the system prompts too.

It's all how the base model has been trained to break tasks into discrete steps and work through them patiently, with some robustness to failure cases.

the_mitsuhiko 4 days ago | parent [-]

> https://github.com/anthropics/claude-code

That repository does not contain the code. It's just used for the issue tracker and some example hooks.

koakuma-chan 4 days ago | parent | next [-]

https://github.com/dnakov/claude-code :trollface:

throwaway314155 4 days ago | parent [-]

That's been DMCA'd since you posted it. Happen to know where I can find a fork?

koakuma-chan 4 days ago | parent | next [-]

> That's been DMCA'd since you posted it.

I know, thus the :trollface:

> Happen to know where I can find a fork?

I don't know where you can find a fork, but even if there is a fork somewhere that's still alive, which is unlikely, it would be for a really old version of Claude Code. You would probably be better off reverse engineering the minified JavaScript or whatever that ships with the latest Claude Code.

throwaway314155 4 days ago | parent [-]

Gotcha, I misunderstood.

mlrtime 3 days ago | parent | prev [-]

Just search dnakov/claude-code mirror and there is a path to the source code, I found it in 2 minutes.

CuriouslyC 4 days ago | parent | prev [-]

It's a javascript app that gets installed on your local system...

the_mitsuhiko 4 days ago | parent [-]

I'm aware of how it works since I have been spending a lot of time over the last two months working with Claude's internals. If you have spent some time with it, you know that it is a transpiled and minified mess that is annoyingly hard to detangle. I'm very happy that claude-trace (and claude-bridge [1]) exists because it makes it much easier to work with the internals of Claude than if you have to decompile it yourself.

[1]: https://github.com/badlogic/lemmy/tree/main/apps/claude-brid...