Loading video...

Video Failed to Load

Go Home

I wanted to better understand how Claude Code is wired under the hood, so I captured its API requests and pulled out the system prompt and tool definitions. Also posting the full thing as a gist below if you want to dig in!

85,851 views • 1 year ago •via X (Twitter)

10 Comments

Sergey Karayev's profile picture
Sergey Karayev1 year ago

Have fun. Lots to learn in there

Yogesh Kumar's profile picture
Yogesh Kumar1 year ago

Great stuff 🔥 really helpful! P.S. Those subtitles are 🤌 How are you generating them?

thud's profile picture
thud1 year ago

What's with the tell a joke line?

Sergey Karayev's profile picture
Sergey Karayev1 year ago

And if you want to launch dozens of Claude Codes in parallel, check out

angel imaz (AI)'s profile picture
angel imaz (AI)1 year ago

thank you. model is even more impressive if that is what Claude Code is using.

moonbi's profile picture
moonbi1 year ago

@thdxr

arti's profile picture
arti1 year ago

You could just reverse the binary from the release that shipped with the source map like all of the open code type GitHub repos did

Gabriel Paiz's profile picture
Gabriel Paiz1 year ago

Is there a youtube link?

Jeffrey Behnke 💻's profile picture
Jeffrey Behnke 💻1 year ago

Thanks for that. Interesting read

Ahmed's profile picture
Ahmed1 year ago

This is great.

Related Videos

Pi was built when there were already agent harnesses around. Here’s why Mario Zechner(Mario Zechner), found them suboptimal and built Pi, a minimalist self-modifying agent: #1 - Mario initially was a believer in Claude Code: "I was a believer in Claude code because they were the first that packaged agentic search up in a really compelling package. And at the time that fit my workflow really well. Everything around the LLM was kind of nice and tidy and easy to understand. I was super happy. I was proselytising Claude code." #2 - Reverse engineering Claude Code highlighted the degradation that Mario felt as a user: "I personally like simple tools that are stable and that I can rely on. Even if they have non-deterministic parts, all the deterministic parts should be as stable as possible. That was just not the experience with Claude Code around summer 2025. They would take away your control of the context. They would inject stuff behind your back, which is bad. Then, your workflows stopped working because there's now a system reminder that you don't even see in the UI that would modify the behaviour of the model. They would also do this to the system prompt. I built a little service where I can track the progression or evolution of the system, prompt and tool definitions and, with every release, it was messing with stuff. That just messed with my workflows and I don't appreciate that." #3 - PI was built with an appreciation for simple and reliable tools: "If I commit to a development tool, I want it to be a stable, reliable thing like a hammer. I don't want my hammer to break a different spot every day. That's terrible. We need somebody who goes the full velocity kind of way. But I don't want to work with a tool like that."

The Pragmatic Engineer

63,020 views • 4 months ago