4 ms·
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
by the_mitsuhiko 1y 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-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.
- CuriouslyC 1y agohttps://github.com/anthropics/claude-code 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 1y ago> https://github.com/anthropics/claude-code 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.
- CuriouslyC 1y agoIt's a javascript app that gets installed on your local system...
- the_mitsuhiko 1y agoI'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-bridge https://github.com/badlogic/lemmy/tree/main/apps/claude-brid...
- koakuma-chan 1y agohttps://github.com/dnakov/claude-code https://github.com/dnakov/claude-code :trollface:
- throwaway314155 1y agoThat's been DMCA'd since you posted it. Happen to know where I can find a fork?
- koakuma-chan 1y ago> 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 1y agoGotcha, I misunderstood.
- mlrtime 1y agoJust search dnakov/claude-code mirror and there is a path to the source code, I found it in 2 minutes.
- rbren 1y agoIf you’re looking for an OSS alternative check out OpenHands CLI: https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file