跳到正文
数字商店
原文
Lydia Hallie ✨· @lydiahallie · X·· 2026-10-13AI 评分46
AI 导读

Claude Code 中 PreToolUse hooks 默认返回 "allow" 会让 Claude 认为命令已被批准,从而跳过 auto mode 分类器这一步,这是问题根因,官方正在考虑修改。

正文

Sorted this out over DMs but replying here as well in case anyone else hits this! Root cause was PreToolUse hooks returning "allow" by default, which tells Claude that the command is already approved, so it skips the step where the auto mode classifier would normally run. Easy to miss, we're looking at changing this on our end too.

In the meantime; if you have any deny hooks, make sure they print nothing instead of "allow" when there's nothing to block! That way the command still goes through the classifier. If you want Claude to always ask before deleting files (even in auto mode) add "Bash(rm *)" under permissions.ask

来源:Lydia Hallie ✨ · x.com