
Claude Code Architecture, Security, and Search

Building Claude Code with Boris Cherny
Topic 7 of 12
Published Mar 4, 2026 · Clip 47:18–55:08 (7:49)
Boris explains Claude Code's simple architecture—a core query loop with a few constantly-experimented-with tools—and its layered Swiss-cheese security model: alignment training against prompt injection, runtime classifiers, and sub-agent summarization of web fetches. He recounts trying RAG with a local vector database and abandoning it due to index drift and permission complexity, finding that agent-driven glob and grep search outperformed everything, inspired by engineers at Instagram searching a global index. He details the permission system, co-designed with founder Ben Mann via human permission prompts, and how few Unix tools are truly safe to auto-allow.