Bug Description
Two related permission bugs when running claude --dangerously-skip-permissions:
Bug A: The --dangerously-skip-permissions CLI flag does not bypass Edit permission prompts. Claude still prompts for Edit approval when editing files in .claude/skills/.
Bug B: Selecting option 2 ("allow all edits during this session") does not persist — subsequent edits to files in different subdirectories prompt again.
Reproduction Steps
- Configure settings at all three levels (user, project, sub-project) with
Edit in the allow list
- Launch:
claude --dangerously-skip-permissions
- Execute a plan that edits multiple files across
.claude/skills/auto/SKILL.md and .claude/skills/_email-common/classification.md
- Observe: Edit permission prompts appear ~10 times despite the flag
Settings Configuration
All three layers explicitly allow Edit:
| Level |
File |
defaultMode |
Edit in allow? |
| User |
~/.claude/settings.json |
"default" |
Yes (bare Edit) |
| Project |
cc/.claude/settings.json |
"default" |
Yes (bare Edit + Edit(.claude/**)) |
| Local sub-project |
cc/aaron/.claude/settings.local.json |
"bypassPermissions" |
Yes (bare Edit) |
User-level settings also has "skipDangerousModePermissionPrompt": true.
Suspected Root Cause
The project-level defaultMode: "default" appears to override the sub-project's defaultMode: "bypassPermissions". The settings merge logic seems to pick the most restrictive defaultMode from the hierarchy rather than the most specific (deepest) one.
Additionally, for Bug B: "Allow all edits in _email-common/" creates a scoped session rule. Subsequent edits to auto/SKILL.md (a different directory) don't match the scope — prompting again. The unscoped "allow all edits during this session" variant should work universally, but both scoped and unscoped options are offered inconsistently.
Workaround
Moving "defaultMode": "bypassPermissions" to the parent project settings (cc/.claude/settings.json) resolves the issue, but this is overly broad — it affects all sub-projects when only one should have bypass enabled.
Expected Behavior
--dangerously-skip-permissions should bypass all tool permission prompts regardless of settings hierarchy
- When
defaultMode: "bypassPermissions" is set at any level in the hierarchy that applies to the current working directory, it should be respected
- "Allow all edits during this session" (option 2) should persist for the entire session regardless of target directory
Environment
- Platform: Windows 11 Pro (win32)
- Shell: bash (Git Bash)
- Claude Code: latest
Bug Description
Two related permission bugs when running
claude --dangerously-skip-permissions:Bug A: The
--dangerously-skip-permissionsCLI flag does not bypass Edit permission prompts. Claude still prompts for Edit approval when editing files in.claude/skills/.Bug B: Selecting option 2 ("allow all edits during this session") does not persist — subsequent edits to files in different subdirectories prompt again.
Reproduction Steps
Editin theallowlistclaude --dangerously-skip-permissions.claude/skills/auto/SKILL.mdand.claude/skills/_email-common/classification.mdSettings Configuration
All three layers explicitly allow
Edit:defaultModeEditin allow?~/.claude/settings.json"default"Edit)cc/.claude/settings.json"default"Edit+Edit(.claude/**))cc/aaron/.claude/settings.local.json"bypassPermissions"Edit)User-level settings also has
"skipDangerousModePermissionPrompt": true.Suspected Root Cause
The project-level
defaultMode: "default"appears to override the sub-project'sdefaultMode: "bypassPermissions". The settings merge logic seems to pick the most restrictivedefaultModefrom the hierarchy rather than the most specific (deepest) one.Additionally, for Bug B: "Allow all edits in
_email-common/" creates a scoped session rule. Subsequent edits toauto/SKILL.md(a different directory) don't match the scope — prompting again. The unscoped "allow all edits during this session" variant should work universally, but both scoped and unscoped options are offered inconsistently.Workaround
Moving
"defaultMode": "bypassPermissions"to the parent project settings (cc/.claude/settings.json) resolves the issue, but this is overly broad — it affects all sub-projects when only one should have bypass enabled.Expected Behavior
--dangerously-skip-permissionsshould bypass all tool permission prompts regardless of settings hierarchydefaultMode: "bypassPermissions"is set at any level in the hierarchy that applies to the current working directory, it should be respectedEnvironment