RSS Amplifier

Harper Carroll AI · Apr 2, 2026

More Details on Anthropic’s Leaked Code — PART 1

0
Sign in to vote or save

Harper Carroll AI · Harper Carroll AI

First, the breaking news announcement in 45 seconds:

Now, more details, as promised.

Due to a human misstep during publishing, a file inside Anthropic’s shared code update contained internal source code.

~512,000 lines of code

~1,900 TypeScript files

Not a hack, just a packaging error – resulting in publicizing the IP of one of the greatest AI technologies ever made.

What we already knew & what the leaked code reveals about how Claude Code works.

Claude doesn’t just generate text; it uses built-in abilities called “tools” to take action.

AI agents aren’t magic. Claude repeats a loop:

  1. Receives your prompt

  2. Analyzes prompt to determine best tool(s)

  3. Runs those tools

  4. Injects results from tool use into the conversation history (“context window”), so the model can see/reference it

  5. Repeat until no more tools are needed

An AI agent is:

a large language model + tools

in a loop that keeps going until it determines that the task is done

The “intelligence” is Claude.

The “agent” part is the loop.

The large language models themselves (there are multiple Claude models) – weren’t leaked, just the tools. The weights, architectures, training data & training pipelines of these neural networks are still secret.

And good thing. Those cost hundreds of millions of dollars of compute to create.

(Pop quiz: what are open vs. closed-source models? Comment below!)

Leave a comment

The loop itself isn’t the whole story; in fact, that’s been public. What the leaked code reveals is just how much additional, complex scaffolding goes into making that loop reliable at scale, like:

  • system prompt engineering

  • context compaction to stay in token limits

  • how tools are designed & sandboxed

  • permission modeling

& much more.

We’ll cover more in the next post.

Did you learn anything? Have any questions? What should I cover next? Let me know in the comments!

Share

No posts

Read the original on harpercarrollai.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.