bypassPermissions still prompts for Edit/Write on .py files in project-level settings
Environment
- Claude Code CLI on Windows 11 (Git Bash)
- Project: C:\Users\jerry\.claude\prosperity4
Setup
Both user-level (~/.claude/settings.json) and project-level (<project>/.claude/settings.json) have:
{
"permissions": {
"defaultMode": "bypassPermissions",
"allow": ["Bash(*)", "Edit(*)", "Write(*)", "MultiEdit(*)", "Read(*)"]
}
}
CLI launched with --dangerously-skip-permissions flag.
Bug
Despite all three of the above, Claude Code repeatedly pauses with an approval prompt when editing/writing .py files in a project folder, flagging them as "sensitive files". This happens even after:
- Restarting Claude Code session (so settings reload)
- Approving the file once (next edit in SAME folder prompts again)
- Approving multiple files in the folder (new files in same folder still prompt)
Expected
With defaultMode: bypassPermissions plus explicit Edit(*)/Write(*) allow entries plus --dangerously-skip-permissions, NO approval prompt should appear for normal file edits.
Actual
Approval prompt appears every few tool calls for .py files. Breaks autonomous workflows that iterate on code (e.g. algorithmic trading strategy development).
Impact
- Makes
--dangerously-skip-permissionseffectively not work for Python codebases - User must babysit sessions they explicitly configured to run unattended
- Inconsistent: some .py edits pass through without prompt, others flagged
Repro
- Create
~/.claude/settings.jsonwithbypassPermissions+Edit(*)allow - Create
<project>/.claude/settings.jsonwith same - Launch with
claude --dangerously-skip-permissions - Ask Claude to iteratively edit a
.pyfile (e.g., "edit line 45 of foo.py", then "edit line 50", then...) - Observe: approval prompt appears roughly every 5-10 edits claiming "sensitive file"
Additional notes
- Removed any
denyListentries - No PreToolUse hooks that would block edits
- The prompt also appears for newly-created files in the same folder as previously-approved files, suggesting the "approve this folder" option doesn't persist
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗