[FEATURE] Allow user settings to disable the 2-minute auto-deny timer on dangerous rm prompts
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
In bypassPermissions and auto modes, Claude Code asks before an rm that targets a critical path. The prompt shows a 2-minute countdown and then denies the command.
The only way to turn the countdown off is the CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1 environment variable. Claude Code ignores this variable when it comes from the env block in ~/.claude/settings.json. The user must export it from a shell startup file.
Environment
- Claude Code 2.1.289
- macOS, zsh
- Permission mode:
bypassPermissions
Steps to reproduce
- Add this to
~/.claude/settings.json:
``json``
"env": { "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT": "1" }
- Start Claude Code in bypass mode.
- Ask Claude to run an
rmon a critical path, for example the working directory.
Actual result
The prompt shows the 2-minute countdown. The variable from settings has no effect.
In the 2.1.289 binary, the settings env loader skips every variable in a protected set. CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT is in that set.
Expected result
User settings can turn off the countdown. askUserQuestionTimeout: "never" already does this for the AskUserQuestion timeout.
Proposed Solution
Accept CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT from user settings and managed settings. Keep it blocked in project and local settings.
Alternative Solutions
Workaround: add export CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1 to ~/.zshenv, then restart cc
Priority
High - Significant impact on productivity
Feature Category
Configuration and settings
Use Case Example
_No response_
Additional Context
_No response_