Register and share your invite link to earn from video plays and referrals.

Akshay ๐Ÿš€
@akshay_pachaar
Simplifying LLMs, AI Agents, RAG, and Machine Learning for you! โ€ข Co-founder @dailydoseofds_โ€ข BITS Pilani โ€ข 3 Patents โ€ข ex-AI Engineer @ LightningAI
Joined July 2012
485 Following    271.6K Followers
Claude Code's architecture, mapped. Calude Code is one of the most powerful agent harnessed out there, it's a lot more than "a CLI that calls claude." the actual system has six layers, and the model is just one node inside the loop. the diagram breaks down every component: ๐—œ๐—ป๐—ฝ๐˜‚๐˜ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ handles session management, permission gating, and YAML-based trust tiers before anything reaches the model. ๐—ž๐—ป๐—ผ๐˜„๐—น๐—ฒ๐—ฑ๐—ด๐—ฒ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ holds the skill registry, context compressor (3-layer, 92% threshold), task graph, and cross-session memory store. this is where harness intelligence lives outside the weights. ๐—˜๐˜…๐—ฒ๐—ฐ๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ runs tool dispatch through a typed registry with one handler per tool. bash, read, write, grep, glob, revert. streaming runtime handles parallel execution. prompt cache reuses stable prefixes at 10% cost. ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ connects the MCP runtime to external servers. filesystem, git, custom. tools register inward, memory writes outward to agent_memory. md. ๐— ๐˜‚๐—น๐˜๐—ถ-๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ is the most underappreciated piece. subagent spawner, teammate mailboxes over redis pub/sub, FSM protocol (IDLEโ†’REQUESTโ†’WAITโ†’RESPOND), autonomous board with atomic locks, and worktree isolation with per-task branches and conflict detection on merge. ๐—ข๐—ฏ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ wraps everything. event bus with lifecycle hooks, background executor running daemon threads non-blocking. the master agent loop sits at the center. perception โ†’ action โ†’ observation. it's deliberately simple. a "dumb loop" where the model reasons and the harness mediates. this is the architecture behind what feels like magic when you use claude code. it's not magic. it's harness engineering. the article below is a deep-dive covering how Anthropic, OpenAI, LangChain, and others build this pattern from the ground up.
Show more
0
29
705
151
Forward to community