A teardown reads the Claude Code source sitting in your node_modules and documents the config fields the official docs skip, with drop-in examples.
Someone went through the @anthropic-ai/claude-code package line by line. The headline find: the auto-approve system is internally the "YOLO Classifier" - you feed it plain-English context ("this is a staging server, destructive ops are acceptable") and it decides what to auto-approve. The bigger gap is hook return values: hooks can return JSON on stdout that rewrites behavior live (PreToolUse can rewrite a tool's input mid-flight; SessionStart can prepend an initial message).
Caveat from the HN thread: some of this is documented but buried, and it's pinned to v2.1.87, which ships weekly. The value is seeing the full config surface of a tool most people run at 10% of its settings.
https://buildingbetter.tech/p/i-read-the-claude-code-source-code
Post #1251
279