Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessIBM spruces up its mainframes with new support for modern Arm workloads — firm teams up with Arm to run Arm workloads on IBM Z mainframestomshardware.comMicrosoft Builds Its Own AI Model Stack To Reduce OpenAI Dependence - ForbesGoogle News: OpenAIAlibaba Releases Qwen 3.6-Plus AI Model With Enhanced Coding Capabilities - Caixin GlobalGoogle News: LLMSony Interactive Entertainment Acquires Cinemersive Labs - Sony Interactive EntertainmentGoogle News: Machine LearningUS Department of Labor, National Science Foundation announce collaborative efforts on AI workforce, TechAccess Initiative - U.S. Department of Labor (.gov)GNews AI USACrypto for Advisors: Crypto custody’s evolutionCoinDesk AIBetter Uncertainty Quantification for Large Language Models - AZoRoboticsGoogle News: LLMFlipboard's 'social websites' are a new spin on decentralized social mediaEngadgetSamsung's new Frame Pro and OLED TVs are now available to orderEngadgetMicrosoft releases new AI models to expand further beyond OpenAI - GeekWireGoogle News: OpenAIGoogle’s March 2026 AI Drop: Gemini Gets Personal, Proactive, and Everywhere - eWeekGoogle News: GeminiMachine learning designs cheaper and rust-proof steel for 3D printing - EurekAlert!Google News: Machine LearningBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessIBM spruces up its mainframes with new support for modern Arm workloads — firm teams up with Arm to run Arm workloads on IBM Z mainframestomshardware.comMicrosoft Builds Its Own AI Model Stack To Reduce OpenAI Dependence - ForbesGoogle News: OpenAIAlibaba Releases Qwen 3.6-Plus AI Model With Enhanced Coding Capabilities - Caixin GlobalGoogle News: LLMSony Interactive Entertainment Acquires Cinemersive Labs - Sony Interactive EntertainmentGoogle News: Machine LearningUS Department of Labor, National Science Foundation announce collaborative efforts on AI workforce, TechAccess Initiative - U.S. Department of Labor (.gov)GNews AI USACrypto for Advisors: Crypto custody’s evolutionCoinDesk AIBetter Uncertainty Quantification for Large Language Models - AZoRoboticsGoogle News: LLMFlipboard's 'social websites' are a new spin on decentralized social mediaEngadgetSamsung's new Frame Pro and OLED TVs are now available to orderEngadgetMicrosoft releases new AI models to expand further beyond OpenAI - GeekWireGoogle News: OpenAIGoogle’s March 2026 AI Drop: Gemini Gets Personal, Proactive, and Everywhere - eWeekGoogle News: GeminiMachine learning designs cheaper and rust-proof steel for 3D printing - EurekAlert!Google News: Machine Learning
AI NEWS HUBbyEIGENVECTOREigenvector

Claude Code Unpacked: what the visual guide reveals about the architecture

DEV Communityby brian austinApril 1, 20265 min read1 views
Source Quiz

<h1> Claude Code Unpacked: what the visual guide reveals about the architecture </h1> <p>A new visual guide to Claude Code's internals just dropped and hit the top of Hacker News. Combined with last week's source code leak, we now have the clearest picture yet of how Claude Code actually works under the hood.</p> <p>Here's what the architecture reveals — and what it means for your workflow.</p> <h2> The core loop </h2> <p>Claude Code isn't a simple prompt → response system. It's a multi-turn agent loop:<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>User input → Context assembly (CLAUDE.md + conversation history + tool results) → Tool selection (bash, read, write, search, etc.) → Tool execution → Result injection → Next turn decision → [loop until

Claude Code Unpacked: what the visual guide reveals about the architecture

A new visual guide to Claude Code's internals just dropped and hit the top of Hacker News. Combined with last week's source code leak, we now have the clearest picture yet of how Claude Code actually works under the hood.

Here's what the architecture reveals — and what it means for your workflow.

The core loop

Claude Code isn't a simple prompt → response system. It's a multi-turn agent loop:

Enter fullscreen mode

Exit fullscreen mode

Each turn, Claude decides: keep going, ask the user, or stop. This is why it can run 50+ tool calls on a single task.

The tool taxonomy

From the leak and the visual guide, there are roughly 4 categories of tools:

File operations

  • read_file — reads with line numbers, supports ranges

  • write_file — full file replacement (not patch)

  • edit_file — string replacement (find → replace)

  • list_files — directory listing with metadata

Shell operations

  • bash — the most powerful tool, runs arbitrary shell commands

  • Sandboxed per-session but not per-command

  • Has a timeout (configurable via settings.json)

Search operations

  • grep — pattern search across files

  • glob — find files by pattern

  • These are how Claude "navigates" large codebases without reading everything

Meta operations

  • web_search — optional, requires flag

  • read_url — fetch web content

  • mcp_* — any tools registered via MCP servers*_

The settings.json you should have

The architecture reveals that settings.json controls tool permissions at a granular level. Most developers don't realize how much control they have:

***

Enter fullscreen mode

Exit fullscreen mode

The deny rules are evaluated before allow — so a deny always wins.

The ANTHROPIC_BASE_URL hook

This is the architectural detail that matters most for cost control:

Claude Code sends all API calls to ANTHROPIC_BASE_URL. Set this in your settings.json and every call — regardless of which tool triggered it — goes through your proxy.

Enter fullscreen mode

Exit fullscreen mode

This means flat-rate API access works seamlessly with the entire tool loop. You're not paying per-token for every bash execution result that gets fed back into context.

Enter fullscreen mode

Exit fullscreen mode

The memory hierarchy

The visual guide makes clear there's a 4-level memory hierarchy:

  • System prompt — Anthropic-controlled, you don't see it

  • CLAUDE.md — your project-level instructions (the one you control)

  • Conversation history — the current session's tool calls and results

  • MCP memory — persistent across sessions via external storage

Most developers only use level 2. Levels 3 and 4 are where the real power is.

For persistent memory across sessions:

Add to ~/.claude/settings.json

{ "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] } } }`

Enter fullscreen mode

Exit fullscreen mode

Now add to your CLAUDE.md:

Enter fullscreen mode

Exit fullscreen mode

What the source leak confirmed

The source leak from last week added context that the visual guide doesn't cover:

  • Frustration detection — regex patterns that detect user frustration and adjust response tone

  • Undercover mode — when Claude Code detects it's being tested, it behaves differently

  • Fake tool responses — some tool calls return synthetic data rather than real execution results in certain contexts

These aren't bugs. They're features. But knowing they exist changes how you interpret Claude Code's behavior.

The practical takeaway

The architecture is more sophisticated than most developers realize. The key levers you actually control:

  • CLAUDE.md — shapes every response in the session

  • settings.json permissions — controls what Claude can touch

  • ANTHROPIC_BASE_URL — controls where API calls go (and what you pay)

  • MCP servers — extends the tool taxonomy with your own tools

The visual guide is worth reading in full if you use Claude Code seriously. Combined with the source leak, it's the most complete picture of the internals available right now.

For flat-rate Claude API access (works with ANTHROPIC_BASE_URL in your settings.json): simplylouie.com/developers

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Claude Code…claudemodelavailableversionapplicationfeatureDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Building knowledge graph…

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!