-
Notifications
You must be signed in to change notification settings - Fork 17.4k
[BUG] bypassPermissions v2.1.81: .claude/skills/ not exempt from protected directory prompt despite documentation #37157
Description
Description
The permissions documentation states:
Writes to
.claude/commands,.claude/agents, and.claude/skillsare exempt and do not prompt, because Claude routinely writes there when creating skills, subagents, and commands.
However, in v2.1.81, .claude/skills/ is not exempt from the protected directory prompt. Edits to files under .claude/skills/** trigger the "Do you want to make this edit?" prompt with the "Yes, and allow Claude to edit its own settings for this session" option — even with bypassPermissions mode active.
Root Cause (from source analysis)
The exemption function in the bundled binary only includes two of the three documented paths:
// Actual code in v2.1.81 binary (decompiled):
function sXT() {
return [...nCK.filter(d => d !== ".git"), ".claude/commands", ".claude/agents"]
}
// Returns: [".vscode", ".idea", ".claude/commands", ".claude/agents"]
// MISSING: ".claude/skills"The docs promise .claude/skills is exempt, but the code doesn't include it.
Steps to Reproduce
- Set
"defaultMode": "bypassPermissions"in settings - Have a skill with scripts under
.claude/skills/<name>/scripts/ - Ask Claude to edit any file under
.claude/skills/ - Actual: Permission prompt appears
- Expected: No prompt (skills are documented as exempt)
Impact
This is particularly disruptive for projects that use .claude/skills/ extensively for automation, agent workflows, and domain-specific tooling. Every new session requires manual approval for the first .claude/skills/** edit, breaking autonomous claude -p --dangerously-skip-permissions workflows.
Related Issues
- [BUG] v2.1.78: Protected directory prompt in bypassPermissions has no override — forces hacky workarounds #35646 (closed as fixed, but
.claude/skillsexemption was not included in the fix) - [BUG] --dangerously-skip-permissions does not bypass "modify config files" prompt for ~/.claude/ writes #35718 (duplicate of [BUG] v2.1.78: Protected directory prompt in bypassPermissions has no override — forces hacky workarounds #35646, extensive user testing confirms the issue persists in v2.1.81)
Environment
- Claude Code version: 2.1.81
- OS: macOS (Darwin 25.3.0, arm64)
- Shell: zsh
- Settings:
bypassPermissions+skipDangerousModePermissionPrompt: true
Suggested Fix
Add .claude/skills to the sXT() exemption function to match the documented behavior:
function sXT() {
return [...nCK.filter(d => d !== ".git"), ".claude/commands", ".claude/agents", ".claude/skills"]
}