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
- AI agents solve 909 open math problems in 2 days on 18-year-old's Left to Solve site — julianibarz · 2026-11-29
- 'Verification is AI's next trillion-dollar category' — proof checkers, evals, agents auditing agents — McDonaghMatthew · 2026-11-29
- Vibe-codevember day 28: 'Hive', a Three.js creative coding demo built with AI — thespite · 2026-11-29
- 'End user programming!': a three-word verdict on what LLM coding really unlocks — round · 2026-11-29
- Founder claims LLMs aren't even the right ML approach for writing programs — jfischoff · 2026-11-29
- Gmail's official MCP only drafts, never sends: devs slam over-cautious agent design — steipete · 2026-11-29