An unofficial 46-page paper reconstructs Claude Code’s design from its TypeScript source. Its main finding: the core is a simple loop (call the model, run tools, repeat), and the real engineering is the harness around it: permissions, context management, extensions, subagents and session persistence.
Takeaways
- Users approve about 93% of permission prompts, so the design relies less on asking and more on boundaries: seven safety layers, from deny-first rules to sandboxing.
- Context is treated as the main bottleneck: a five-stage compaction pipeline, plus lazy loading of instructions, rules and tool definitions.
- Extensions are split by job: MCP for tools, plugins for packaging, skills for instructions, hooks for lifecycle events. Subagents are isolated workers, not extra prompts in the same thread.
Read the full article →
Have a system that needs a second opinion?