[FEATURE] Allow user settings to disable the 2-minute auto-deny timer on dangerous rm prompts

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 0 comments · opened Oct 5, 2026

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

  1. Add this to ~/.claude/settings.json:

``json
"env": { "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT": "1" }
``

  1. Start Claude Code in bypass mode.
  2. Ask Claude to run an rm on 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_

View original on GitHub ↗