Source-File-Mapped 7-Component Architecture
- Entity ID:
ent-20260423-r31a000000002 - Type:
pattern - Scope:
private - Status:
active
Description
The VILA paper provides the first source-file-mapped description of Claude Code's seven top-level components: (1) User; (2) Interfaces (Interactive CLI, Headless CLI claude -p, Agent SDK, IDE/Desktop/Browser) all feeding the same queryLoop() in query.ts; (3) Agent loop (queryLoop() async generator in query.ts); (4) Permission system (permissions.ts deny-first, yoloClassifier.ts ML auto-mode, types/hooks.ts hook interception); (5) Tools (up to 54 built-ins assembled by assembleToolPool() in tools.ts, merged with MCP); (6) State & persistence (append-only JSONL in sessionStorage.ts, history.ts, subagent sidechain files); (7) Execution environment (shouldUseSandbox.ts, 42 tool subdirectories, MCP across 8+ transports).
Key claims
- All Claude Code interfaces route through the same queryLoop() in query.ts
Relations
- Source-File-Mapped 7-Component Architecture --[depends_on]--> query.ts 10-Step Loop
- Source-File-Mapped 7-Component Architecture --[attributed_to]--> VILA Lab (MBZUAI)