Unverified50% confidenceSolutionExact time
In the Claude Agent SDK, deny rules can intercept the rm command and take effect in all modes (including bypassPermissions), but deny rules match the literal command, and forms like /bin/rm can bypass them, so a pre-tool-use hook is needed to check every bash call at the front of the chain.
1
Sources
50%
Confidence
Long-term
Relevance
10/27/2026
First Seen
Sources
Claude Agent SDK in Practice: Building Your First AI Agent Step by Step
youtubeARE AGI10/27/2026
Related Entities
Related Claims
UnverifiedUnder bypassPermissions mode or shell allow rules, dangerous rm commands targeting the root directory or home directory inside bash -c or sh -c scripts previously ran without prompting; this has been fixed to prompt first (corresponding to issue #96300).63% similarUnverifiedBefore the fix, recursive deletion commands like rm -rf "$(pwd)" whose targets came solely from command substitution output would execute silently without prompting in auto mode and --dangerously-skip-permissions mode; after the fix, the user will be actively asked even if a Bash allow rule exists, unless CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1 is set.61% similarUnverifiedClaude Code SDK默认情况下没有编辑或破坏性权限,需要通过--allowedTools参数预配置权限60% similarUnverifiedclaude -p and Agent SDK sessions, when no permission mode is specified, start in default mode in scenarios involving third-party providers, disabled telemetry, or a fresh install, while --permission-mode auto still keeps auto mode.60% similarUnverifiedAuto Mode之前,Claude Code的权限管理只有Default模式(每个操作手动确认)和Bypass Permissions模式(跳过所有检查)两个极端59% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1103801API
curl https://kongchang.com/api/v1/knowledge/claims/1103801MCP
get_claim(id=1103801)