Bypass permissions mode still prompts for edits to ~/.claude/settings.json
Bug Description
When running Claude Code with --dangerously-skip-permissions, editing Claude's own config files (e.g. ~/.claude/settings.json) still triggers a permission prompt ("Do you want to make this edit to settings.json?").
This defeats the purpose of the flag — all file operations should be auto-approved in this mode.
Steps to Reproduce
- Launch Claude Code with
claude --dangerously-skip-permissions - Ask Claude to modify a setting (e.g. "set effortLevel to high in settings.json")
- Claude reads
~/.claude/settings.json, then attempts to edit it - A permission prompt appears asking to confirm the edit
Expected Behavior
The edit should proceed automatically without prompting, since --dangerously-skip-permissions is active.
Actual Behavior
Claude shows the diff and asks "Do you want to make this edit to settings.json?" — same as normal permission mode.
Environment
- Claude Code v2.1.81
- Model: Opus 4.6 (1M context), Claude Max
- Platform: macOS (Darwin, ARM64)
~/.claude/settings.jsonalready contains"skipDangerousModePermissionPrompt": true
Screenshot
<img width="1079" height="891" alt="Image" src="https://github.com/user-attachments/assets/4d454928-5b74-4717-827f-c39f90ec016e" />
(Screenshot shows the permission prompt appearing in bypass mode when editing settings.json)
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I have the same issue on Claude Code extension in VSCode. Dangerously Skip Permissions/Bypass Permissions is totally broken.
Amazng how Anthropic can ship such slop that It's F-ing annoyng.
Similar reported bug - https://github.com/anthropics/claude-code/issues/11380#issuecomment-4104350262
Seems to be recent as of the last week or so.
I can confirm this issue is still very valid and happening even more frequently now, even with
--dangerously-skip-permissionstoggled on.This is by design —
~/.claude/is a hardcoded protected directory. Even--dangerously-skip-permissionswon't bypass it, because the self-edit protection is meant to prevent the model from modifying its own hooks and settings (which could disable safety checks).Workaround using PermissionRequest hooks:
Unlike
PreToolUse, thePermissionRequesthook event fires after the built-in protection check, so it can override the prompt:Caveat: This has been reported as not working on some platforms (Windows, certain Claude Code versions). See #37765 for detailed testing by multiple users. If the hook doesn't work for you, please report your version and OS there — it helps narrow down when the built-in check overrides even PermissionRequest.
The cleanest fix would be an official
--allow-self-editflag or subdirectory allowlisting, which multiple users have requested.Claude Code's auto-memory system blocks itself
The hardcoded
.claude/permission check doesn't just affect user-created files — it blocks Claude Code's own features:Auto-memory writes: Claude Code's built-in memory system (the
auto memoryinstructions in the system prompt) tells the model to write files to~/.claude/projects/<project>/memory/using the Write tool. This triggers the hardcoded.claude/permission check every time, requiring manual approval for the model to use its own memory feature.Additional findings from investigation:
.claude/in the path, not just~/.claude/. Moving files to a different.claudedirectory (e.g.C:\Dev\.claude) still triggers the prompt.additionalDirectoriesin settings.json does NOT bypass this check.PermissionRequesthook workaround (suggested in earlier comments) does NOT work on Windows.jq/sed/pythoninstead of Edit/Write — which defeats the purpose of having dedicated file tools.Impact: ~10+ manual permission approvals per day for routine operations (memory writes, CLAUDE.md updates, editing files stored under
~/.claude/). This is on Windows 11, latest Claude Code version.The product is blocking its own feature. Would an allowlist for
~/.claude/projects/(or a--allow-self-editflag) be feasible?Affecting me too
FYI I pegged my Claude Code on version 2.1.77.
Add to
~/.bashrcor~/.zshrc:Then install that specific version:
I haven't had any model regressions or permission errors since doing this. This is why I was confused about recent punted model regressions -- I haven't experienced any.
I'm also clueless as to the updates to CC since I did this 😅
This is a duplicate of #38950, which was fixed as of version 2.1.126.
This issue was not fixed at
2.1.152 (Claude Code), even I have explicit settings, claude still ask forallow bypassPermissions?~/.claude/settings.json
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.