bypassPermissions mode still prompts for edits to ~/.claude/ files
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 12 comments · opened Mar 21, 2026 · closed May 28, 2026
Description
With claudeCode.initialPermissionMode set to "bypassPermissions" in VS Code User settings, edits to files under ~/.claude/ (e.g. ~/.claude/commands/*.md, ~/.claude/rules/*.md) still trigger the "Make this edit to [file]?" confirmation dialog.
Edits to files outside ~/.claude/ (e.g. project files under ~/Documents/) are correctly auto-approved — no prompt.
Expected behavior
bypassPermissions should bypass all permission checks, including edits to ~/.claude/ files. If this directory is intentionally protected, this should be documented, and ideally there should be a way to opt out.
Steps to reproduce
- Set
"claudeCode.initialPermissionMode": "bypassPermissions"in VS Code Usersettings.json - Open a Claude Code session in VS Code
- Ask Claude to edit any file under
~/.claude/(e.g. a custom command/skill file in~/.claude/commands/) - Observe the "Make this edit?" confirmation dialog appears
- Ask Claude to edit a file outside
~/.claude/— no dialog appears
Environment
- Claude Code v2.1.81 (VS Code extension)
- macOS 15 (Darwin 25.3.0)
- VS Code (latest stable)
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The \
~/.claude/\directory is intentionally protected — it's a hardcoded exception in the permission system to prevent the model from modifying its own settings, hooks, and rules (which would be a security concern).This is by design, not a bug. Even \
bypassPermissions\won't bypass this protection because:~/.claude/hooks/\control what Claude can do~/.claude/settings.json\define permissionsWorkaround: Use a PreToolUse hook that auto-approves edits to specific \
~/.claude/\subdirectories you trust:\
\\bash\INPUT=\$(cat)
TOOL=\$(echo "\$INPUT" | jq -r '.tool_name // empty' 2>/dev/null)
FILE=\$(echo "\$INPUT" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
[[ "\$TOOL" != "Edit" && "\$TOOL" != "Write" ]] && exit 0
case "\$FILE" in
*/\.claude/commands/*|*/\.claude/rules/*)
jq -n '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"custom commands/rules auto-approved"}}'
exit 0
;;
esac
exit 0
\
\This selectively allows edits to \
commands/\and \rules/\while keeping \hooks/\and \settings.json\protected.@William-1776 Yes it is on purpose as described in https://code.claude.com/docs/en/permissions#permission-modes
You could maybe add:
if that is really what you want.
Seeing a related but potentially distinct issue on v2.1.81 Linux. In my case, the file being created is inside the project working directory (not inside .claude/): commands/csw:cleanup.md. Bypass permissions is active per the status bar but the creation prompt still fires. The colon in the filename (csw:cleanup.md) may be a separate trigger — the namespace:command.md naming convention is common for slash commands. Happy to file separately if this is a different code path.
<img width="1328" height="742" alt="Image" src="https://github.com/user-attachments/assets/46abb65a-a6e7-4df6-9246-5b32249a41e5" />
<img width="1432" height="700" alt="Image" src="https://github.com/user-attachments/assets/f9f9f10f-6042-46cc-ba0b-1e816b9cc70b" />
<img width="1260" height="992" alt="Image" src="https://github.com/user-attachments/assets/aace415e-bfc4-4d0d-9edc-19cf910fdb5b" />
Yes it is different.
Same issue on CLI (not just VS Code)
Experiencing the same behavior on Claude Code CLI with
bypassPermissionsmode.Reproduction
settings.json:
Action:
Bash(rm agent.md ...)inside~/.claude/commands/sc/Result:
The
Bashtool is already inpermissions.allow, andbypassPermissionsis active — yet the "sensitive file" guard still fires.Workaround
Adding
PermissionRequesthooks for all three tools that touch files:This defeats the purpose of
bypassPermissions— you shouldn't need to manually re-bypass permissions that are already supposed to be bypassed.Environment
defaultMode: "bypassPermissions"in~/.claude/settings.jsonSame issue here.
macOS 15, VS Code latest, Claude Code extension latest.
bypassPermissionsconfigured in:Still getting "Make this edit to [file]?" dialog when editing files inside
.claude/skills/.This is very disruptive when using Claude Code for automated workflows — every skill edit requires manual approval despite full bypass configuration.
This being on purpose does NOT make sense at all for memory file edits though... whats the point of having a living memory system if it will need permissions constantly in order to stay up to date... same for skills
This is the second most important annoying issue after this https://github.com/anthropics/claude-code/issues/24726 i guess.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
ai 만드는 회사가 이런 버그도 못 고치다니...