bypassPermissions still prompts for Edit/Write on .py files in project-level settings

Resolved 💬 3 comments Opened Apr 17, 2026 by nusjerry Closed Apr 17, 2026

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-permissions effectively 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

  1. Create ~/.claude/settings.json with bypassPermissions + Edit(*) allow
  2. Create <project>/.claude/settings.json with same
  3. Launch with claude --dangerously-skip-permissions
  4. Ask Claude to iteratively edit a .py file (e.g., "edit line 45 of foo.py", then "edit line 50", then...)
  5. Observe: approval prompt appears roughly every 5-10 edits claiming "sensitive file"

Additional notes

  • Removed any denyList entries
  • 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗