01 02 03 04 05

Claude Code
Deep Dive

What actually happens behind the scenes when you type a message in Claude Code?
Agent Loop, 53+ tools, multi-agent orchestration, hidden features — mapped directly from the source.

1,900+
Files
519K+
Lines of code
53+
Built-in tools
95+
Commands
Start exploring ↓
01

Agent Loop

Trace the source-level execution flow step by step, from keystroke to rendered response.

1
Input
2
Message
3
Append
4
Assemble
5
API
6
Parse
7
Tool?
8
Loop
9
Render
10
Hooks
11
Wait
1

User enters a message

src/components/TextInput.tsx

The user types a message in the terminal or passes it through stdin. Keyboard input comes from Ink’s TextInput component.

claude-code
$

Keyboard input is handled through Ink’s TextInput component.Ctrl+C interrupts gracefully without losing conversation history.

1 | 11
02

Architecture Explorer

Claude Code’s source structure. Click to explore its internal parts.

Tools and commands
Core processing
UI layer
Infrastructure
Support and utilities
Personality and UX
src
utils/584 Files
commands/189 Files
tools/184 Files
services/136 Files
components/120 Files
core/95 Files
personality/60 Files
03

Tool System

Every built-in tool Claude Code can call, grouped by function.

File operations
6 tools
FileReadFileEditFileWrite GlobGrepNotebookEdit
Execution
3 tools
BashPowerShellREPL
Search and retrieval
4 tools
WebBrowser🔬 WebFetchWebSearchToolSearch
Agents and tasks
11 tools
AgentSendMessageTaskCreate TaskGetTaskListTaskUpdate TaskStopTaskOutputTeamCreate TeamDeleteListPeers🔬
Planning
5 tools
EnterPlanModeExitPlanModeEnterWorktree ExitWorktreeVerifyPlanEx…🔬
MCP
4 tools
mcpListMcpResources ReadMcpResourceMcpAuth
System
11 tools
AskUserQuestionTodoWriteSkill ConfigRemoteTrigger🔬 CronCreate🔬CronDelete🔬 CronList🔬Snip🔬 Workflow🔬TerminalCapt…🔬
Experimental
8 tools
Sleep🔬SendUserMessage🔬 StructuredOu…🔬LSP🔬 SendUserFile🔬PushNotifica…🔬 Monitor🔬SubscribePR🔬

🔬 = experimental / not officially released yet

04

Command Catalog

All available slash commands in Claude Code, grouped by function.

Settings and configuration
12
/init/login/logout /config/permissions/model /theme/terminal-setup/doctor /onboarding/mcp/hooks
Daily workflows
24
/compact/memory/context /plan/resume/session /files/add-dir/copy /export/summary/clear /brief/output-style 🔬 /color/vim/keybindings /skills/tasks/agents /fast/effort/extra-usage /rate-limit-options
Code review and Git
13
/review/commit/commit-push-pr /diff/pr_comments/branch /issue/security-review/autofix-pr 🔬 /share/install-github-app 🔬 /install-slack-app 🔬 /tag
Debugging and diagnostics
23
/status/stats/cost /usage/version/feedback /think-back/thinkback-play/rewind /ctx_viz/debug-tool-call/perf-issue /heapdump/ant-trace /backfill-sessions 🔬 /break-cache 🔬 /bridge-kick 🔬 /mock-limits 🔬 /oauth-refresh 🔬 /reset-limits 🔬 /env/bughunter 🔬 /passes 🔬
Advanced and experimental
23
/advisor 🔬 /ultraplan 🔬 /remote-control 🔬 /teleport /voice 🔬 /desktop 🔬 /chrome 🔬 /mobile 🔬 /sandbox/plugin /reload-plugins/remote-env /ide/stickers /good-claude/btw /upgrade/release-notes /privacy-settings/help /exit/rename /web-setup
05

Hidden Features

Features already in the source but not officially released yet: feature-flagged, env-gated, or simply commented out.

Buddy

A virtual pet living in your terminal. Species and rarity are determined by your account ID.

Kairos

Persistent mode with automatic memory consolidation between sessions and autonomous background behavior.

UltraPlan

Long-running planning sessions using an Opus-class model, with an execution window of up to 30 minutes.

Coordinator Mode

A lead agent breaks down tasks, spawns parallel workers in separate Git worktrees, and collects the results.

Bridge

Control Claude Code from a phone or browser. Pull remote sessions with permission approval.

Daemon Mode

Run sessions in the background with --bg; underneath it uses tmux

UDS Inbox

Sessions communicate with each other through Unix domain sockets.

Auto-Dream

Between sessions, the AI automatically reviews what happened and consolidates what it learned.

💬 Join the 808 AI Workshop LINE community to learn and exchange AI ideas together 🟢 Join community