Ask ten people who use Claude Code daily what stops the agent from editing .env and you get two answers. Half point at their CLAUDE.md . The rest say it has never happened, which is not the same as being protected. Anthropic's documentation says the quiet part out loud: an instruction like “never edit .env ” in CLAUDE.md or a skill is a request, not a guarantee, and a PreToolUse hook that blocks the edit is enforcement. That sentence separates the two features people keep confusing. A subagent is a worker with its own context and judgment. A hook is a script that runs whether the model agrees or not. Neither substitutes for the other. Here is which does what, four ways hooks fail open, and a two-layer gate that costs about a cent per review. The difference in one line A subagent decides. A hook happens. When you write a subagent, you write a description , and Claude decides at runtime whether a task matches it: “Claude uses each subagent's description to decide when to deleg...
Practical reviews, comparisons, and step-by-step guides on AI tools and productivity workflows.