[FEATURE] Allow opt-out of .claude/ protected directory prompts via settings.json
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
Problem
Since v2.1.78, all Edit/Write operations to files under .claude/ trigger a permission prompt,
even with bypassPermissions mode, --dangerously-skip-permissions, or explicit allow rules like Edit(.claude/**) in settings.json. The protected directory gate is evaluated before the
permission allow rules, making it impossible to opt out via configuration.
Impact
Workflows that heavily edit .claude/ files (skills, hooks, MCP servers, scripts) are constantly
interrupted by prompts. In my project, ~35% of all edits target .claude/ — every single one
prompts.
Tested on v2.1.81 (Windows 11, CLI):
EditonSoftware/*.py→ no prompt ✓Editon.claude/server.py→ prompt ✗- Adding
Edit(.claude/**)to user settings.json allow rules → still prompts ✗ --dangerously-skip-permissions→ still prompts (confirmed by #35718) ✗
This also appears to cause issues with worktree operations that need to read/write .claude/ state.
Proposed Solution
Add a protectedDirectories override in settings.json (user-level):
{
"protectedDirectories": {
"exempt": [".claude/"]
}
}
### Alternative Solutions
_No response_
### Priority
High - Significant impact on productivity
### Feature Category
File operations
### Use Case Example
I maintain custom MCP servers, hooks, and skills under `.claude/` that I edit frequently (~35% of all edits in my project). Since v2.1.78, every Edit/Write to any `.claude/` file triggers a permission prompt — even with `--dangerously-skip-permissions`, `bypassPermissions` mode, or explicit `Edit(.claude/**)` allow rules in settings.json. I need a way to opt out of protected directory prompts via configuration, e.g. a `protectedDirectories` override in settings.json.
### Additional Context
Context
v2.1.78 changelog: "Fixed .git, .claude protected directories being writable without prompt
in bypassPermissions mode" — this is the change that introduced the current behavior
.claude/skills/ is documented as exempt but isn't (#37157)
The protection makes sense as a default, but power users who manage their own .claude/ files
(custom MCP servers, hooks, skills) need an escape hatch
Related Issues
#35718 — --dangerously-skip-permissions does not bypass .claude/ prompts
#37157 — .claude/skills/ not exempt despite documentation
#36168 — Bypass permissions broken in versions > v2.1.77
#36219 — VS Code Edit prompts despite bypassPermissions
Environment
Claude Code v2.1.81
Windows 11, CLI
User settings.json with "Edit" and "Write" in allow listThis issue has 4 comments on GitHub. Read the full discussion on GitHub ↗