Anthropic explains Claude Code pitfall: PreToolUse hooks returning "allow" silently bypass the safety classifier
lydiahallie · x · 2026-10-13
Lydia Hallie at Anthropic explained a Claude Code gotcha: PreToolUse hooks that return "allow" by default signal to Claude that a command is already approved, skipping the auto-mode safety classifier entirely.
Workarounds while the default is fixed:
- Deny hooks should print nothing (not "allow") when there's nothing to block, so commands still go through the classifier.
- To force Claude to ask before deleting files even in auto mode, add "Bash(rm )" under permissions.ask.
She says the team is looking at changing this behavior on their end.
More from coding & agent
- PageIndex SDK v0.4 claims tree indexing now cheaper than vector indexing by ~15% — solyarisoftware · 2026-10-13
- Economist: agentic coding lets you write your own Fortran optimizers, not just ask for Stata packages — Apoorva__Lal · 2026-10-13
- Tencent open-sources Agent Memory: local long-term memory, 61% fewer tokens, 48%→76% accuracy — solyarisoftware · 2026-10-13
- Testing AI agents with simulations: replay real traces, 50 curated sims beat 1000 random ones — HamelHusain · 2026-10-13
- How humans and Copilot agents split the work to build a GitHub Copilot beginner course — DanWahlin · 2026-10-13
- Engineers distill their AGI debate into an essay on self-verifying, continuously improving agents — dotey · 2026-10-13