←back to thread

469 points samuelstros | 8 comments | | HN request time: 0.452s | source | bottom
Show context
the_mitsuhiko ◴[] No.44998823[source]
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.

replies(2): >>44999150 #>>45001031 #
CuriouslyC ◴[] No.44999150[source]
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.

replies(1): >>44999181 #
1. the_mitsuhiko ◴[] No.44999181[source]
> 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.

replies(2): >>44999205 #>>44999256 #
2. CuriouslyC ◴[] No.44999205[source]
It's a javascript app that gets installed on your local system...
replies(1): >>44999312 #
3. koakuma-chan ◴[] No.44999256[source]
https://github.com/dnakov/claude-code :trollface:
replies(1): >>44999614 #
4. the_mitsuhiko ◴[] No.44999312[source]
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...

5. throwaway314155 ◴[] No.44999614[source]
That's been DMCA'd since you posted it. Happen to know where I can find a fork?
replies(2): >>44999764 #>>45001119 #
6. koakuma-chan ◴[] No.44999764{3}[source]
> 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.

replies(1): >>44999957 #
7. throwaway314155 ◴[] No.44999957{4}[source]
Gotcha, I misunderstood.
8. mlrtime ◴[] No.45001119{3}[source]
Just search dnakov/claude-code mirror and there is a path to the source code, I found it in 2 minutes.