inflearn logo

Claude Code Anatomy: Vibe Coding Changes with How Much You Know

We delve into how AI coding tools work internally based on 510,000 lines of leaked Claude Code source code. Understand context management, memory processing, and prompt delivery mechanisms, and learn vibe coding practices for applying them to real-world development workflows.

36 learners are taking this course

Level Intermediate

Course period Unlimited

No-code
No-code
context-switching
context-switching
prompt engineering
prompt engineering
claude
claude
Vibe Coding
Vibe Coding
No-code
No-code
context-switching
context-switching
prompt engineering
prompt engineering
claude
claude
Vibe Coding
Vibe Coding

What you will gain after the course

  • Analysis of Claude Code’s Context Management and Memory Processing Mechanisms

  • Efficient Prompt Design Strategies Considering the Limitations of AI Coding Tools

  • Building a vibe-coding workflow that maintains consistency even during long sessions

The Anatomy of Claude Code: Vibe Coding Changes as Much as You Know!

The structure and principles of Claude Code revealed by 510,000 leaked lines of source code—and vibe-coding practices derived from those principles. The art of context management that goes beyond prompt engineering.



I wrote it in CLAUDE.md—so why does it suggest Redux again?

When vibe coding, have you ever clearly written, "Don’t use Redux; we’ve decided on MobX," only for Claude to suggest Redux again in the next session? Have you ever felt that Claude suddenly became stupid after a long session, but had no idea why? Or followed a configuration recipe that worked, but couldn’t explain why it worked?


These problems cannot be solved by writing better prompts.

You need to understand what Claude Code sends to the model each turn, what it discards, and what it fails to remember to solve them. In March 2026, Claude Code's full source code was exposed through npm source maps, making its structure available for analysis. Based on that analysis and the official documentation, this course illustrates Claude Code's internals one page at a time and connects each principle to the practices it leads to in vibe coding.


By taking this course

  • You can explain what happens during each stage of Claude Code processing a turn (preprocessing → API call → error recovery → tool execution → postprocessing).

  • You can visualize what fills the context window.

  • You can understand what conversation compaction discards and manage conversation sessions.

  • You can learn how to prevent rejected decisions from disappearing.

  • You can understand that established development processes such as TDD and SDD remain important in a vibe coding environment.


Recipes become outdated when versions change, but principles remain

Claude Code changes every few weeks. There are plenty of courses and articles covering how to configure it, but few materials explain why those configurations are effective. This course takes the opposite approach. It first shows how Claude Code works internally, then shows which practices necessarily follow from that behavior. Once you understand the principles, you can create your own recipes and determine what remains the same and what has changed even when the version changes.


1. What the leaked 510,000 lines revealed

On March 31, 2026, source map files were included in the @anthropic-ai/claude-code npm package, exposing approximately 1,900 files and 510,000 lines of TypeScript. Within days, developers around the world analyzed its structure, revealing that Claude Code was not merely a "model" but an elaborate "harness" wrapped around a model. Undisclosed features—such as the always-on Kairos mode and a multi-agent coordinator—were also revealed, showing that this code was effectively Anthropic’s roadmap.

This lecture does not show or distribute leaked source code. It explains the structure and principles based on publicly available third-party analyses and official Anthropic documents.


2. Kairos Mode

Always-on assistant mode, Kairos mode! By understanding what Claude does in this mode, you can see the scope of tasks it can handle on its own. To do vibe coding well, you need to help the AI work more effectively at this stage.

3. What Is Sent on Each Turn

Claude Code resends the entire system prompt, tool definitions, skill list, CLAUDE.md, and the entire conversation so far on every turn. This is because the model remembers nothing between calls. The reason costs do not explode despite this is prompt caching, and understanding which actions break that cache (connecting MCP during a session, switching models) changes the token costs.

When the window fills up, Claude Code attempts compression in five stages. It uses the free options first and only asks the model to summarize when those aren't enough. The /compact command that users enter is just the final stage. And information can be lost during this process, potentially leading to hallucinations.

4. Why does Claude forget rejected alternatives?

The history of "I tried A, but it was rejected, so I used B" is reduced through compression to just "I used B." The new session looks only at the code, plausibly rationalizes after the fact "why B," and sometimes suggests A again even though it was rejected. The most exhausting problems in vibe coding—"the resurrection of rejected patterns," "repeating the same mistakes," and "loss of consistency"—all stem from this.


👱User: Make it with A
🤖AI: Implemented A
👱User: No, use B
🤖AI: Implemented B

🤖Compression After compression, new session: "Ultimately use B" (※ The fact that A was considered and rejected is removed from the outcome-focused summary)

🤖Next request AI: "A is also a decent alternative" The revival of a rejected pattern!


The forgetting that happens once every six months in human teams
happens every session in Claude Code!


5. What You Absolutely Must Do

Memory should be in files, not conversations. This section covers how to write “what to do instead and why” in the Do not section of CLAUDE.md, how to document rejected alternatives in ADRs, how to use code comments and commit messages as clues the model can discover, and how to turn “using X breaks Y” into tests that the harness enforces. It also explains why --continue is less useful than you might think and when starting a new session is better than compression.

Recommended for
these people

Who is this course right for?

  • People who keep repeating, “I told you before it wouldn’t work!” because Claude Code repeats the same mistakes in every session.

  • Those who have experienced Claude’s response quality declining after a long session and are curious about why.

  • Anyone who has experienced their project’s consistency falling apart while scaling it with vibe coding

  • A developer who uses AI coding tools but feels frustrated by unpredictable results

Need to know before starting?

  • Experience installing Claude Code and using it on a project at least once

  • Git Basics (Commits, Branches) and Terminal Usage

  • Understanding the Basic Concepts of Prompt Engineering (※ No programming knowledge required!)

Hello
This is nullnull8537

Inflearn Verified

56,296

Learners

3,442

Reviews

1,228

Answers

4.9

Rating

34

Courses

I am the owner of the "NullNull Developer TV" channel and
a developer who has been navigating the sea of IT technology for over 30 years. Nice to meet you. ^^

Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

nullnull8537's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$17.60

48%

$34.10