The app for independent voices

Unreal. The entire Claude Code source code just leaked.

Here's what caught my eye as an engineer:

👇

1️⃣ Memory that heals itself.

Claude Code doesn't just dump everything into context. It uses a three-layer memory system. A tiny index file (memory.md) stays loaded at all times. Full details get pulled only when needed. If a write fails, the whole system doesn't break.

That's not a chatbot. That's proper state management.

2️⃣ The model doesn't trust its own memory.

The code tells Claude to treat its memory as a "hint." It has to verify facts against the actual codebase before acting. Skeptical by design.

3️⃣ KAIROS: a background agent mode.

Named after the Greek word for "the right moment". It lets Claude Code keep working while you're idle. There's even a "dream" mode where it consolidates what it learned, removes contradictions, and turns loose observations into concrete facts.

Basically, it studies while you grab coffee.

4️⃣ 44 feature flags. 20 not shipped yet.

Everything from persistent background sessions to multi-agent collaboration to remote control from your phone. All built. Just not turned on.

5️⃣ "Undercover Mode".

A system prompt that tells Claude to hide its identity when contributing to open-source repos. No Anthropic references in commits or PRs.

Make of that what you will.

The real lesson?

The gap between a good AI wrapper and a production-grade coding agent is huge.

Memory architecture, tool orchestration, permission models, staged rollouts behind feature flags.

This leak is basically a free masterclass in how to build serious AI tooling.

What surprised you most about it?

——

♻ Restack to help others find it.

➕ Follow Petar Ivanov + turn on notifications.

Apr 2
at
11:48 AM
Relevant people

Log in or sign up

Join the most interesting and insightful discussions.