We're building a TypeScript-to-native compiler (Perry) and wanted to evaluate whether Claude Code's codebase is something we could realistically compile. Since it's closed source, that meant reconstruction. Claude dispatched 7 subagents — two refused to extract the system prompt on ethical grounds, the parent called them "shy" and did it anyway. 12,093 lines reconstructed, 0 systems penetrated. Key technical findings: internal codename Tengu with 654+ feature flags, sandbox-exec with dynamically generated SBPL policies, bubblewrap on Linux, three-tier context compaction, deferred tool loading via ToolSearch, and smart-quote normalization for LLM-generated curly quotes. Happy to answer questions.
amlug•1h ago